Token Dai Stablecoin

Overview ERC20

Price
$0.00 @ 0.000000 GLMR
Fully Diluted Market Cap
Total Supply:
711,249.627768 DAI

Holders:
1,180 addresses
Balance
0 DAI

Value
$0.00
0x2372aa79d0f35310e3cd3525ecff352922bdaf7c
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

OVERVIEW

Bridged DAI Token of Nomad.

Market

Volume (24H):$198,677,485.00
Market Capitalization:$5,294,269,408.00
Circulating Supply:5,284,124,490.00 DAI
Market Data Source: Coinmarketcap


Update? Click here to update the token ICO / general information
# Exchange Pair Price  24H Volume % Volume
1
BitMart
BTC-DAI$0.9999
0.0000354 Btc
$14,742,333.00
520.821 BTC
0.0003%
2
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48$1.006
0.0000356 Btc
$14,352,211.00
14,265,046.980 0X6B175474E89094C44DA98B954EEDEAC495271D0F
7.8500%
3
Kraken
DAI-EUR$0.9993
0.0000353 Btc
$13,194,895.00
13,203,834.701 DAI
7.2660%
4
Kraken
DAI-USDT$1.009
0.0000356 Btc
$12,368,386.00
12,259,537.283 DAI
6.7464%
5
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2$1.005
0.0000356 Btc
$11,710,581.00
11,620,010.045 0X6B175474E89094C44DA98B954EEDEAC495271D0F
6.3944%
6
Kraken
DAI-USD$0.9994
0.0000353 Btc
$11,024,852.00
11,031,471.335 DAI
6.0706%
7
BKEX
ETH-DAI$0.9999
0.0000353 Btc
$6,210,128.00
3,451.587 ETH
0.0019%
8
Binance
ETH-DAI$0.9999
0.0000352 Btc
$5,553,370.00
3,058.498 ETH
0.0017%
9
BitMart
ETH-DAI$0.9999
0.0000354 Btc
$5,264,635.00
2,897.021 ETH
0.0016%
10
OKX
ETH-DAI$0.9999
0.0000354 Btc
$4,621,721.00
2,592.916 ETH
0.0014%
11
Balancer (v2)
0XAE37D54AE477268B9997D4161B96B8200755935C-0X6B175474E89094C44DA98B954EEDEAC495271D0F$0.9999
0.0000354 Btc
$4,475,267.00
4,464,522.955 0XAE37D54AE477268B9997D4161B96B8200755935C
2.4568%
12
Binance
BTC-DAI$0.9998
0.0000352 Btc
$3,874,367.00
136.972 BTC
0.0001%
13
Binance
USDT-DAI$0.9999
0.0000352 Btc
$3,587,040.00
3,579,881.143 USDT
1.9700%
14
BKEX
USDT-DAI$0.9999
0.0000354 Btc
$3,567,115.00
3,556,453.755 USDT
1.9571%
15
BKEX
BTC-DAI$0.9999
0.0000354 Btc
$3,455,359.00
123.470 BTC
0.0001%
16
Cryptology
BTC-DAI$0.9999
0.0000354 Btc
$3,070,869.00
109.232 BTC
0.0001%
17
OKX
BTC-DAI$0.9999
0.0000354 Btc
$2,848,884.00
102.704 BTC
0.0001%
18
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2$1.005
0.0000356 Btc
$2,723,861.00
2,683,162.347 0X6B175474E89094C44DA98B954EEDEAC495271D0F
1.4765%
19
Kyberswap Elastic (Arbitrum)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFF970A61A04B1CA14834A43F5DE4533EBDDB5CC8$1.005
0.0000356 Btc
$2,619,647.00
2,607,172.023 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
1.4347%
20
XT.COM
BTC-DAI$0.9999
0.0000354 Btc
$2,330,419.00
84.013 BTC
0.0000%
21
Uniswap (Arbitrum One)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFF970A61A04B1CA14834A43F5DE4533EBDDB5CC8$1.004
0.0000356 Btc
$2,139,026.00
2,130,960.024 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
1.1727%
22
Uniswap (Arbitrum One)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFF970A61A04B1CA14834A43F5DE4533EBDDB5CC8$1.004
0.0000356 Btc
$1,685,532.00
1,679,386.503 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.9242%
23
Kyberswap Elastic (Arbitrum)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFD086BC7CD5C481DCC9C85EBE478A1C0B69FCBB9$1.011
0.0000358 Btc
$1,557,900.00
1,540,206.048 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.8476%
24
Balancer (v2)
0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48-DAI$0.9995
0.0000354 Btc
$1,534,296.00
1,524,196.610 0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48
0.8388%
25
Balancer (v2)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-USDC$1.005
0.0000356 Btc
$1,533,252.00
1,526,170.618 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.8398%
26
Bitrue
DAI-USDT$1.009
0.0000356 Btc
$1,442,557.00
1,430,277.100 DAI
0.7871%
27
Beethoven X
0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E-USDC$1.006
0.0000356 Btc
$1,127,974.00
1,120,850.691 0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E
0.6168%
28
Beethoven X
0X04068DA6C83AFCFA0E13BA15A6696662335D5B75-DAI$1.005
0.0000356 Btc
$1,126,056.00
1,120,614.673 0X04068DA6C83AFCFA0E13BA15A6696662335D5B75
0.6167%
29
Uniswap (Polygon)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.006
0.0000356 Btc
$1,125,942.00
1,118,537.005 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.6155%
30
Uniswap (Optimism)
0X7F5C764CBC14F9669B88837CA1490CCA17C31607-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.004
0.0000356 Btc
$953,766.00
950,019.793 0X7F5C764CBC14F9669B88837CA1490CCA17C31607
0.5228%
31
Coinbase Exchange
DAI-USD$0.9999
0.0000353 Btc
$884,776.00
884,864.821 DAI
0.4869%
32
Uniswap (Arbitrum One)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFD086BC7CD5C481DCC9C85EBE478A1C0B69FCBB9$1.004
0.0000356 Btc
$858,712.00
855,104.773 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.4706%
33
Binance
BUSD-DAI$0.9999
0.0000352 Btc
$827,362.00
827,031.222 BUSD
0.4551%
34
XT.COM
ETH-DAI$0.9999
0.0000354 Btc
$808,237.00
453.997 ETH
0.0002%
35
Kyberswap Elastic (Polygon)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.006
0.0000356 Btc
$758,789.00
753,890.851 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.4149%
36
Kyberswap Elastic (Optimism)
0X7F5C764CBC14F9669B88837CA1490CCA17C31607-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.006
0.0000356 Btc
$654,318.00
650,180.536 0X7F5C764CBC14F9669B88837CA1490CCA17C31607
0.3578%
37
KuCoin
USDT-DAI$0.9999
0.0000354 Btc
$648,067.00
645,292.270 USDT
0.3551%
38
BitMart
DAI-USDT$1.003
0.0000355 Btc
$625,523.00
623,822.180 DAI
0.3433%
39
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XDAC17F958D2EE523A2206206994597C13D831EC7$1.012
0.0000359 Btc
$546,831.00
540,474.542 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.2974%
40
Bybit
DAI-USDT$1.002
0.0000355 Btc
$539,790.00
538,526.020 DAI
0.2963%
41
Equalizer
0X21BE370D5312F44CB42CE377BC9B8A0CEF1A4C83-0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E$1.005
0.0000356 Btc
$467,901.00
959,358.434 0X21BE370D5312F44CB42CE377BC9B8A0CEF1A4C83
0.5279%
42
Bitget
DAI-USDT$1.005
0.0000356 Btc
$460,709.00
458,643.000 DAI
0.2524%
43
Uniswap (Optimism)
0X4200000000000000000000000000000000000006-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.008
0.0000357 Btc
$428,417.00
236.991 0X4200000000000000000000000000000000000006
0.0001%
44
SpookySwap
0X21BE370D5312F44CB42CE377BC9B8A0CEF1A4C83-0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E$1.002
0.0000355 Btc
$400,270.00
822,206.751 0X21BE370D5312F44CB42CE377BC9B8A0CEF1A4C83
0.4525%
45
Azbit
DAI-USDT$1.002
0.0000355 Btc
$318,684.00
317,913.074 DAI
0.1749%
46
Bybit
BIT-DAI$0.9999
0.0000354 Btc
$310,580.00
587,944.680 BIT
0.3235%
47
Uniswap (Optimism)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0X4200000000000000000000000000000000000006$1.008
0.0000357 Btc
$306,606.00
300,792.952 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.1655%
48
BitMart
DAI-USDC$1.007
0.0000357 Btc
$288,854.00
286,981.600 DAI
0.1579%
49
PancakeSwap (v2)
0X1AF3F329E8BE154074D8769D1FFA4EE058B1DBC3-BUSD$0.9948
0.0000352 Btc
$275,570.00
277,063.650 0X1AF3F329E8BE154074D8769D1FFA4EE058B1DBC3
0.1525%
50
Balancer (v2)
0X64AA3364F17A4D01C6F1751FD97C2BD3D7E7F1D5-DAI$0.9999
0.0000354 Btc
$262,056.00
25,454.316 0X64AA3364F17A4D01C6F1751FD97C2BD3D7E7F1D5
0.0140%
51
Quickswap (v3)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.006
0.0000356 Btc
$248,034.00
246,441.436 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.1356%
52
Balancer (v2)
0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2-DAI$0.9995
0.0000354 Btc
$217,219.00
120.135 0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2
0.0001%
53
Equalizer
0X049D68029688EABF473097A2FC38EF61633A3C7A-0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E$1.007
0.0000357 Btc
$203,144.00
201,286.204 0X049D68029688EABF473097A2FC38EF61633A3C7A
0.1108%
54
Sushiswap
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2$1.007
0.0000357 Btc
$200,840.00
197,541.838 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.1087%
55
Balancer (v2)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-ETH$1.007
0.0000357 Btc
$200,354.00
199,001.799 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.1095%
56
Osmosis
IBC/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7-UOSMO$1.004
0.0000356 Btc
$187,395.00
186,613.894 IBC/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7
0.1027%
57
Bitget
DAI-USDC$1.004
0.0000356 Btc
$179,072.00
178,339.000 DAI
0.0981%
58
Equalizer
0X04068DA6C83AFCFA0E13BA15A6696662335D5B75-0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E$1.006
0.0000356 Btc
$161,977.00
160,898.128 0X04068DA6C83AFCFA0E13BA15A6696662335D5B75
0.0885%
59
Velodrome Finance
0X7F5C764CBC14F9669B88837CA1490CCA17C31607-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.006
0.0000356 Btc
$160,740.00
159,766.509 0X7F5C764CBC14F9669B88837CA1490CCA17C31607
0.0879%
60
MEXC Global
DAI-USDT$1.005
0.0000356 Btc
$154,383.00
153,580.510 DAI
0.0845%
61
Huobi
DAI-USDT$1.006
0.0000356 Btc
$137,458.00
136,842.107 DAI
0.0753%
62
Tokpie
DAI-USDC$1.006
0.0000356 Btc
$128,756.00
127,937.310 DAI
0.0704%
63
ApeSwap (Polygon)
0X0D500B1D8E8EF31E21C99D1DB9A6444D3ADF1270-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.007
0.0000357 Btc
$121,646.00
107,672.586 0X0D500B1D8E8EF31E21C99D1DB9A6444D3ADF1270
0.0593%
64
Kraken
BTC-DAI$0.9968
0.0000353 Btc
$117,239.00
4.152 BTC
0.0000%
65
Binance
BNB-DAI$0.9999
0.0000352 Btc
$105,650.00
320.184 BNB
0.0002%
66
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XDAC17F958D2EE523A2206206994597C13D831EC7$1.012
0.0000358 Btc
$102,780.00
101,576.738 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.0559%
67
Gemini
DAI-USD$0.9993
0.0000353 Btc
$99,093.00
99,162.194 DAI
0.0546%
68
Uniswap (v2)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XB53ECF1345CABEE6EA1A65100EBB153CEBCAC40F$0.9998
0.0000352 Btc
$95,738.00
96,997.287 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.0534%
69
Uniswap (Polygon)
0XA3FA99A148FA48D14ED51D610C367C61876997F1-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.006
0.0000356 Btc
$87,476.00
86,965.773 0XA3FA99A148FA48D14ED51D610C367C61876997F1
0.0479%
70
Camelot
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFF970A61A04B1CA14834A43F5DE4533EBDDB5CC8$1.007
0.0000357 Btc
$87,218.00
86,675.333 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.0477%
71
DigiFinex
DAI-USDT$1.009
0.0000356 Btc
$83,708.00
82,978.338 DAI
0.0457%
72
FameEX
DAI-USDT$1.003
0.0000355 Btc
$83,703.00
83,550.850 DAI
0.0460%
73
KuCoin
ETH-DAI$0.9999
0.0000354 Btc
$76,223.00
41.925 ETH
0.0000%
74
Uniswap (Arbitrum One)
0X18C11FD286C5EC11C3B683CAA813B77F5163A122-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$0.9915
0.0000351 Btc
$62,959.00
7,983.280 0X18C11FD286C5EC11C3B683CAA813B77F5163A122
0.0044%
75
XT.COM
DAI-USDT$1.006
0.0000356 Btc
$57,263.00
56,999.550 DAI
0.0314%
76
Biswap
0X1AF3F329E8BE154074D8769D1FFA4EE058B1DBC3-0X55D398326F99059FF775485246999027B3197955$1.002
0.0000355 Btc
$55,926.00
55,925.779 0X1AF3F329E8BE154074D8769D1FFA4EE058B1DBC3
0.0308%
77
Uniswap (v3)
0X419D0D8BDD9AF5E606AE2232ED285AFF190E711B-0X6B175474E89094C44DA98B954EEDEAC495271D0F$1.005
0.0000356 Btc
$49,786.00
7,193,213.067 0X419D0D8BDD9AF5E606AE2232ED285AFF190E711B
3.9584%
78
Équilibre
0X765277EEBECA2E31912C9946EAE1021199B39C61-0XFA9343C3897324496A05FC75ABED6BAC29F8A40F$1.008
0.0000356 Btc
$48,338.00
48,002.649 0X765277EEBECA2E31912C9946EAE1021199B39C61
0.0264%
79
Bitfinex
DAI-USD$0.997
0.0000353 Btc
$46,711.00
46,851.193 DAI
0.0258%
80
WhiteBIT
DAI-USDT$1.008
0.0000356 Btc
$37,579.00
37,262.870 DAI
0.0205%
81
Gate.io
DAI-USDT$1.007
0.0000355 Btc
$33,929.00
33,666.636 DAI
0.0185%
82
Quickswap
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.007
0.0000357 Btc
$33,149.00
32,805.045 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.0181%
83
Uniswap (v2)
0X4F08705FB8F33AFFC231ED66E626B40E84A71870-0X6B175474E89094C44DA98B954EEDEAC495271D0F$0.9998
0.0000352 Btc
$32,339.00
67,515,656.317 0X4F08705FB8F33AFFC231ED66E626B40E84A71870
37.1536%
84
Balancer (Polygon)
0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063-USDC$1.006
0.0000356 Btc
$30,713.00
30,523.477 0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063
0.0168%
85
Balancer (Polygon)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-DAI$1.002
0.0000355 Btc
$30,599.00
30,519.068 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.0168%
86
Sushiswap (Polygon POS)
0X7CEB23FD6BC0ADD59E62AC25578270CFF1B9F619-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.012
0.0000358 Btc
$28,211.00
15.538 0X7CEB23FD6BC0ADD59E62AC25578270CFF1B9F619
0.0000%
87
CoinEx
DAI-USDT$1.003
0.0000355 Btc
$23,158.00
23,101.800 DAI
0.0127%
88
Balancer (Polygon)
0XC2132D05D31C914A87C6611C10748AEB04B58E8F-DAI$1.006
0.0000356 Btc
$22,104.00
21,911.618 0XC2132D05D31C914A87C6611C10748AEB04B58E8F
0.0121%
89
Balancer (Polygon)
0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063-USDT$1.002
0.0000355 Btc
$22,033.00
21,983.208 0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063
0.0121%
90
Kraken
ETH-DAI$0.9999
0.0000353 Btc
$21,373.00
11.823 ETH
0.0000%
91
Bancor (V2)
DAI-BNT$0.9947
0.0000352 Btc
$14,953.30
15,033.554 DAI
0.0083%
92
Platypus Finance
0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E-0XD586E7F844CEA2F87F50152665BCBC2C279D8D70$1.007
0.0000357 Btc
$14,073.29
13,980.654 0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E
0.0077%
93
Platypus Finance
0XD586E7F844CEA2F87F50152665BCBC2C279D8D70-0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E$1.007
0.0000357 Btc
$14,070.41
13,976.463 0XD586E7F844CEA2F87F50152665BCBC2C279D8D70
0.0077%
94
SolidLizard
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFD086BC7CD5C481DCC9C85EBE478A1C0B69FCBB9$1.008
0.0000356 Btc
$13,736.30
13,635.253 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.0075%
95
Platypus Finance
0X9702230A8EA53601F5CD2DC00FDBC13D4DF4A8C7-0XD586E7F844CEA2F87F50152665BCBC2C279D8D70$1.003
0.0000355 Btc
$7,967.63
7,928.478 0X9702230A8EA53601F5CD2DC00FDBC13D4DF4A8C7
0.0044%
96
Bitso
DAI-MXN$0.9994
0.0000353 Btc
$7,462.85
7,467.428 DAI
0.0041%
97
Uniswap (v2)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XBE56AB825FD35678A32DC35BC4EB17E238E1404F$0.9998
0.0000352 Btc
$5,364.84
5,427.595 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.0030%
98
ApeSwap (Polygon)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.007
0.0000357 Btc
$3,808.53
3,784.566 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.0021%
99
Bitstamp
DAI-USD$0.9987
0.0000353 Btc
$3,499.67
3,504.152 DAI
0.0019%
100
Bitvavo
DAI-EUR$0.9914
0.0000351 Btc
$3,172.38
3,199.771 DAI
0.0018%

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x30D2a9F5FDf90ACe8c17952cbb4eE48a55D916A7

Contract Name:
UpgradeBeaconProxy

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 2 : UpgradeBeaconProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

// ============ External Imports ============
import {Address} from "@openzeppelin/contracts/utils/Address.sol";

/**
 * @title UpgradeBeaconProxy
 * @notice
 * Proxy contract which delegates all logic, including initialization,
 * to an implementation contract.
 * The implementation contract is stored within an Upgrade Beacon contract;
 * the implementation contract can be changed by performing an upgrade on the Upgrade Beacon contract.
 * The Upgrade Beacon contract for this Proxy is immutably specified at deployment.
 * @dev This implementation combines the gas savings of keeping the UpgradeBeacon address outside of contract storage
 * found in 0age's implementation:
 * https://github.com/dharma-eng/dharma-smart-wallet/blob/master/contracts/proxies/smart-wallet/UpgradeBeaconProxyV1.sol
 * With the added safety checks that the UpgradeBeacon and implementation are contracts at time of deployment
 * found in OpenZeppelin's implementation:
 * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/beacon/BeaconProxy.sol
 */
contract UpgradeBeaconProxy {
    // ============ Immutables ============

    // Upgrade Beacon address is immutable (therefore not kept in contract storage)
    address private immutable upgradeBeacon;

    // ============ Constructor ============

    /**
     * @notice Validate that the Upgrade Beacon is a contract, then set its
     * address immutably within this contract.
     * Validate that the implementation is also a contract,
     * Then call the initialization function defined at the implementation.
     * The deployment will revert and pass along the
     * revert reason if the initialization function reverts.
     * @param _upgradeBeacon Address of the Upgrade Beacon to be stored immutably in the contract
     * @param _initializationCalldata Calldata supplied when calling the initialization function
     */
    constructor(address _upgradeBeacon, bytes memory _initializationCalldata)
        payable
    {
        // Validate the Upgrade Beacon is a contract
        require(Address.isContract(_upgradeBeacon), "beacon !contract");
        // set the Upgrade Beacon
        upgradeBeacon = _upgradeBeacon;
        // Validate the implementation is a contract
        address _implementation = _getImplementation(_upgradeBeacon);
        require(
            Address.isContract(_implementation),
            "beacon implementation !contract"
        );
        // Call the initialization function on the implementation
        if (_initializationCalldata.length > 0) {
            _initialize(_implementation, _initializationCalldata);
        }
    }

    // ============ External Functions ============

    /**
     * @notice Forwards all calls with data to _fallback()
     * No public functions are declared on the contract, so all calls hit fallback
     */
    fallback() external payable {
        _fallback();
    }

    /**
     * @notice Forwards all calls with no data to _fallback()
     */
    receive() external payable {
        _fallback();
    }

    // ============ Private Functions ============

    /**
     * @notice Call the initialization function on the implementation
     * Used at deployment to initialize the proxy
     * based on the logic for initialization defined at the implementation
     * @param _implementation - Contract to which the initalization is delegated
     * @param _initializationCalldata - Calldata supplied when calling the initialization function
     */
    function _initialize(
        address _implementation,
        bytes memory _initializationCalldata
    ) private {
        // Delegatecall into the implementation, supplying initialization calldata.
        (bool _ok, ) = _implementation.delegatecall(_initializationCalldata);
        // Revert and include revert data if delegatecall to implementation reverts.
        if (!_ok) {
            assembly {
                returndatacopy(0, 0, returndatasize())
                revert(0, returndatasize())
            }
        }
    }

    /**
     * @notice Delegates function calls to the implementation contract returned by the Upgrade Beacon
     */
    function _fallback() private {
        _delegate(_getImplementation());
    }

    /**
     * @notice Delegate function execution to the implementation contract
     * @dev This is a low level function that doesn't return to its internal
     * call site. It will return whatever is returned by the implementation to the
     * external caller, reverting and returning the revert data if implementation
     * reverts.
     * @param _implementation - Address to which the function execution is delegated
     */
    function _delegate(address _implementation) private {
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())
            // Delegatecall to the implementation, supplying calldata and gas.
            // Out and outsize are set to zero - instead, use the return buffer.
            let result := delegatecall(
                gas(),
                _implementation,
                0,
                calldatasize(),
                0,
                0
            )
            // Copy the returned data from the return buffer.
            returndatacopy(0, 0, returndatasize())
            switch result
            // Delegatecall returns 0 on error.
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @notice Call the Upgrade Beacon to get the current implementation contract address
     * @return _implementation Address of the current implementation.
     */
    function _getImplementation()
        private
        view
        returns (address _implementation)
    {
        _implementation = _getImplementation(upgradeBeacon);
    }

    /**
     * @notice Call the Upgrade Beacon to get the current implementation contract address
     * @dev _upgradeBeacon is passed as a parameter so that
     * we can also use this function in the constructor,
     * where we can't access immutable variables.
     * @param _upgradeBeacon Address of the UpgradeBeacon storing the current implementation
     * @return _implementation Address of the current implementation.
     */
    function _getImplementation(address _upgradeBeacon)
        private
        view
        returns (address _implementation)
    {
        // Get the current implementation address from the upgrade beacon.
        (bool _ok, bytes memory _returnData) = _upgradeBeacon.staticcall("");
        // Revert and pass along revert message if call to upgrade beacon reverts.
        require(_ok, string(_returnData));
        // Set the implementation to the address returned from the upgrade beacon.
        _implementation = abi.decode(_returnData, (address));
    }
}

File 2 of 2 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_upgradeBeacon","type":"address"},{"internalType":"bytes","name":"_initializationCalldata","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

60a060405260405161058b38038061058b8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b506040525050506100f0826101d060201b6100291760201c565b610134576040805162461bcd60e51b815260206004820152601060248201526f18995858dbdb880858dbdb9d1c9858dd60821b604482015290519081900360640190fd5b6001600160601b0319606083901b166080526000610151836101d6565b9050610166816101d060201b6100291760201c565b6101b7576040805162461bcd60e51b815260206004820152601f60248201527f626561636f6e20696d706c656d656e746174696f6e2021636f6e747261637400604482015290519081900360640190fd5b8151156101c8576101c881836102d6565b50505061038f565b3b151590565b604051600090819081906001600160a01b0385169082818181855afa9150503d8060008114610221576040519150601f19603f3d011682016040523d82523d6000602084013e610226565b606091505b50915091508181906102b65760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561027b578181015183820152602001610263565b50505050905090810190601f1680156102a85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508080602001905160208110156102cc57600080fd5b5051949350505050565b6000826001600160a01b0316826040518082805190602001908083835b602083106103125780518252601f1990920191602091820191016102f3565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610372576040519150601f19603f3d011682016040523d82523d6000602084013e610377565b606091505b505090508061038a573d6000803e3d6000fd5b505050565b60805160601c6101e06103ab60003980603652506101e06000f3fe60806040523661001357610011610017565b005b6100115b61002761002261002f565b61005f565b565b3b151590565b600061005a7f0000000000000000000000000000000000000000000000000000000000000000610083565b905090565b3660008037600080366000845af43d6000803e80801561007e573d6000f35b3d6000fd5b6040516000908190819073ffffffffffffffffffffffffffffffffffffffff85169082818181855afa9150503d80600081146100db576040519150601f19603f3d011682016040523d82523d6000602084013e6100e0565b606091505b509150915081819061018a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508080602001905160208110156101a057600080fd5b505194935050505056fea26469706673582212207a913a499405f220fe73d6c33af6d31fa3d6dd38aef5fe5d043818455b8bd55c64736f6c63430007060033000000000000000000000000969d515486ba6133400ac9c73298586426a090f500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000

Loading