Token Dai Stablecoin

Overview ERC20

Price
$0.00 @ 0.000000 GLMR
Fully Diluted Market Cap
Total Supply:
4,123,544.73268 DAI

Holders:
1,128 addresses
Balance
0 DAI

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

OVERVIEW

Bridged DAI Token of Nomad.

Market

Volume (24H):$197,953,386.00
Market Capitalization:$5,186,358,983.00
Circulating Supply:5,183,479,546.00 DAI
Market Data Source: Coinmarketcap


Update? Click here to update the token ICO / general information
# Exchange Pair Price  24H Volume % Volume
1
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48$0.9973
0.0000587 Btc
$31,913,531.00
32,000,867.959 0X6B175474E89094C44DA98B954EEDEAC495271D0F
47.2029%
2
OKX
ETH-DAI$1.00
0.0000589 Btc
$22,896,185.00
18,176.115 ETH
0.0268%
3
BitMart
BTC-DAI$1.00
0.0000589 Btc
$14,053,238.00
827.657 BTC
0.0012%
4
XT.COM
BTC-DAI$1.00
0.0000589 Btc
$5,625,367.00
331.207 BTC
0.0005%
5
Sushiswap
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2$1.001
0.0000589 Btc
$4,786,324.00
2,886,899.609 0X6B175474E89094C44DA98B954EEDEAC495271D0F
4.2583%
6
Kraken
DAI-EUR$0.9995
0.0000589 Btc
$4,198,058.00
4,200,111.244 DAI
6.1954%
7
Kraken
DAI-USD$0.9998
0.0000589 Btc
$3,634,810.00
3,635,609.619 DAI
5.3627%
8
Binance
BUSD-DAI$1.00
0.0000589 Btc
$2,815,525.00
2,813,887.250 BUSD
4.1506%
9
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2$1.003
0.0000590 Btc
$2,116,185.00
2,122,838.662 0X6B175474E89094C44DA98B954EEDEAC495271D0F
3.1313%
10
Coinbase Exchange
DAI-USD$0.9998
0.0000589 Btc
$2,051,137.00
2,051,547.338 DAI
3.0261%
11
Kraken
DAI-USDT$1.00
0.0000589 Btc
$1,628,198.00
1,627,403.744 DAI
2.4005%
12
BKEX
USDT-DAI$1.00
0.0000589 Btc
$1,596,697.00
1,595,413.355 USDT
2.3533%
13
Binance
USDT-DAI$1.00
0.0000589 Btc
$1,548,660.00
1,547,294.458 USDT
2.2823%
14
LBank
DAI-USDT$1.001
0.0000589 Btc
$1,497,657.00
1,496,849.770 DAI
2.2079%
15
WhiteBIT
DAI-USDT$1.00
0.0000589 Btc
$1,350,403.00
1,350,095.360 DAI
1.9915%
16
OKX
BTC-DAI$1.00
0.0000589 Btc
$1,320,758.00
77.633 BTC
0.0001%
17
Binance
BTC-DAI$1.00
0.0000589 Btc
$1,269,452.00
74.715 BTC
0.0001%
18
Binance
ETH-DAI$1.00
0.0000589 Btc
$1,057,484.00
844.006 ETH
0.0012%
19
BitMart
ETH-DAI$1.00
0.0000589 Btc
$1,017,664.00
811.986 ETH
0.0012%
20
XT.COM
ETH-DAI$1.00
0.0000589 Btc
$923,580.00
732.829 ETH
0.0011%
21
BitMart
DAI-USDT$1.00
0.0000589 Btc
$796,156.00
795,927.240 DAI
1.1740%
22
Quickswap
0XE5417AF564E4BFDA1C483642DB72007871397896-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.004
0.0000591 Btc
$653,003.00
162,503.549 0XE5417AF564E4BFDA1C483642DB72007871397896
0.2397%
23
Uniswap (Optimism)
0X7F5C764CBC14F9669B88837CA1490CCA17C31607-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.001
0.0000590 Btc
$547,702.00
547,099.320 0X7F5C764CBC14F9669B88837CA1490CCA17C31607
0.8070%
24
Platypus Finance
0XA7D7079B0FEAD91F3E65F86E8915CB59C1A4C664-0XD586E7F844CEA2F87F50152665BCBC2C279D8D70$1.00
0.0000589 Btc
$413,894.00
413,604.098 0XA7D7079B0FEAD91F3E65F86E8915CB59C1A4C664
0.6101%
25
Uniswap (Polygon)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.00
0.0000589 Btc
$400,059.00
399,901.829 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.5899%
26
Beethoven X
0X04068DA6C83AFCFA0E13BA15A6696662335D5B75-DAI$1.00
0.0000589 Btc
$331,253.00
331,038.009 0X04068DA6C83AFCFA0E13BA15A6696662335D5B75
0.4883%
27
Beethoven X
0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E-USDC$1.00
0.0000589 Btc
$331,229.00
331,125.611 0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E
0.4884%
28
Azbit
DAI-USDT$1.001
0.0000589 Btc
$329,146.00
328,968.945 DAI
0.4852%
29
BKEX
BTC-DAI$1.00
0.0000589 Btc
$308,483.00
18.125 BTC
0.0000%
30
Quickswap (v3)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.001
0.0000589 Btc
$304,231.00
304,041.661 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.4485%
31
Kyberswap Elastic (Polygon)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.00
0.0000589 Btc
$294,728.00
294,606.861 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.4346%
32
Gemini
DAI-USD$0.9999
0.0000589 Btc
$288,483.00
288,514.790 DAI
0.4256%
33
Kyberswap Elastic (Arbitrum)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFF970A61A04B1CA14834A43F5DE4533EBDDB5CC8$1.00
0.0000589 Btc
$287,379.00
287,293.874 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.4238%
34
Kyberswap Elastic (Optimism)
0X7F5C764CBC14F9669B88837CA1490CCA17C31607-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.00
0.0000589 Btc
$254,512.00
254,404.558 0X7F5C764CBC14F9669B88837CA1490CCA17C31607
0.3753%
35
KuCoin
USDT-DAI$1.00
0.0000589 Btc
$243,649.00
243,291.134 USDT
0.3589%
36
Bybit
BIT-DAI$1.00
0.0000589 Btc
$222,233.00
736,734.550 BIT
1.0867%
37
DigiFinex
DAI-USDT$0.9987
0.0000588 Btc
$207,432.00
207,704.457 DAI
0.3064%
38
Bitget
DAI-USDT$1.00
0.0000589 Btc
$201,776.00
201,722.000 DAI
0.2975%
39
Bithumb
DAI-KRW$1.014
0.0000597 Btc
$199,918.00
197,178.522 DAI
0.2908%
40
Quickswap (v3)
0XA3FA99A148FA48D14ED51D610C367C61876997F1-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.001
0.0000589 Btc
$181,783.00
183,126.541 0XA3FA99A148FA48D14ED51D610C367C61876997F1
0.2701%
41
Quickswap (v3)
0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063-0XC2132D05D31C914A87C6611C10748AEB04B58E8F$1.001
0.0000589 Btc
$175,879.00
175,725.058 0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063
0.2592%
42
Uniswap (Polygon)
0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063-0XC2132D05D31C914A87C6611C10748AEB04B58E8F$1.001
0.0000589 Btc
$174,921.00
174,810.356 0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063
0.2579%
43
Bitget
DAI-USDC$1.00
0.0000589 Btc
$168,773.00
168,733.000 DAI
0.2489%
44
Balancer (Arbitrum)
0XF0B5CEEFC89684889E5F7E0A7775BD100FCD3709-DAI$1.00
0.0000589 Btc
$163,536.00
167,109.736 0XF0B5CEEFC89684889E5F7E0A7775BD100FCD3709
0.2465%
45
Quickswap
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.004
0.0000591 Btc
$158,724.00
158,501.920 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.2338%
46
Bybit
DAI-USDT$0.9998
0.0000589 Btc
$156,847.00
156,872.020 DAI
0.2314%
47
BKEX
ETH-DAI$1.00
0.0000589 Btc
$149,098.00
118.691 ETH
0.0002%
48
Uniswap (v3)
0X5F98805A4E8BE255A32880FDEC7F6728C6568BA0-0X6B175474E89094C44DA98B954EEDEAC495271D0F$1.003
0.0000590 Btc
$143,875.00
139,570.493 0X5F98805A4E8BE255A32880FDEC7F6728C6568BA0
0.2059%
49
Platypus Finance
0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E-0XD586E7F844CEA2F87F50152665BCBC2C279D8D70$1.00
0.0000589 Btc
$138,326.00
138,259.681 0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E
0.2039%
50
Platypus Finance
0XD586E7F844CEA2F87F50152665BCBC2C279D8D70-0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E$1.00
0.0000589 Btc
$138,321.00
138,268.204 0XD586E7F844CEA2F87F50152665BCBC2C279D8D70
0.2040%
51
Kyberswap Elastic (Polygon)
0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063-0XC2132D05D31C914A87C6611C10748AEB04B58E8F$1.001
0.0000589 Btc
$124,216.00
124,139.160 0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063
0.1831%
52
Velodrome Finance
0X7F5C764CBC14F9669B88837CA1490CCA17C31607-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.001
0.0000589 Btc
$114,504.00
114,423.009 0X7F5C764CBC14F9669B88837CA1490CCA17C31607
0.1688%
53
Uniswap (Optimism)
0X94B008AA00579C1307B0EF2C499AD98A8CE58E58-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.001
0.0000590 Btc
$110,623.00
110,491.593 0X94B008AA00579C1307B0EF2C499AD98A8CE58E58
0.1630%
54
ApeSwap (Polygon)
0X0D500B1D8E8EF31E21C99D1DB9A6444D3ADF1270-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.001
0.0000589 Btc
$106,754.00
117,239.633 0X0D500B1D8E8EF31E21C99D1DB9A6444D3ADF1270
0.1729%
55
BitMart
DAI-USDC$1.00
0.0000589 Btc
$105,863.00
105,844.800 DAI
0.1561%
56
Osmosis
IBC/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7-UOSMO$0.9988
0.0000588 Btc
$104,505.00
104,630.002 IBC/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7
0.1543%
57
Kyberswap Elastic (Arbitrum)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFD086BC7CD5C481DCC9C85EBE478A1C0B69FCBB9$1.00
0.0000589 Btc
$102,023.00
101,983.990 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.1504%
58
Platypus Finance
0X9702230A8EA53601F5CD2DC00FDBC13D4DF4A8C7-0XD586E7F844CEA2F87F50152665BCBC2C279D8D70$1.00
0.0000589 Btc
$97,729.00
97,686.952 0X9702230A8EA53601F5CD2DC00FDBC13D4DF4A8C7
0.1441%
59
Uniswap (Arbitrum One)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFF970A61A04B1CA14834A43F5DE4533EBDDB5CC8$0.9999
0.0000589 Btc
$83,844.00
83,795.809 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.1236%
60
PancakeSwap (v2)
0X1AF3F329E8BE154074D8769D1FFA4EE058B1DBC3-BUSD$1.004
0.0000592 Btc
$82,962.00
82,790.194 0X1AF3F329E8BE154074D8769D1FFA4EE058B1DBC3
0.1221%
61
Uniswap (v3)
0X03AB458634910AAD20EF5F1C8EE96F1D6AC54919-0X6B175474E89094C44DA98B954EEDEAC495271D0F$1.003
0.0000590 Btc
$77,412.00
27,414.932 0X03AB458634910AAD20EF5F1C8EE96F1D6AC54919
0.0404%
62
Uniswap (Polygon)
0XA3FA99A148FA48D14ED51D610C367C61876997F1-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.001
0.0000589 Btc
$69,363.00
69,862.886 0XA3FA99A148FA48D14ED51D610C367C61876997F1
0.1031%
63
Crypto.com Exchange
DAI-USDT$0.9986
0.0000588 Btc
$69,356.00
69,454.300 DAI
0.1024%
64
Tokpie
DAI-USDC$1.002
0.0000590 Btc
$64,578.00
64,443.240 DAI
0.0951%
65
ZigZag (zkSync v1)
ETH-DAI$1.00
0.0000589 Btc
$62,740.00
49.774 ETH
0.0001%
66
Huobi
DAI-USDT$0.9999
0.0000589 Btc
$58,927.00
58,928.385 DAI
0.0869%
67
Sushiswap (Polygon POS)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.001
0.0000589 Btc
$54,940.00
54,147.884 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.0799%
68
Binance
BNB-DAI$1.00
0.0000589 Btc
$46,769.00
162.767 BNB
0.0002%
69
Uniswap (v3)
0X0AB87046FBB341D058F17CBC4C1133F25A20A52F-0X6B175474E89094C44DA98B954EEDEAC495271D0F$1.003
0.0000590 Btc
$45,299.00
18.981 0X0AB87046FBB341D058F17CBC4C1133F25A20A52F
0.0000%
70
Kyberswap Elastic (Optimism)
0X94B008AA00579C1307B0EF2C499AD98A8CE58E58-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.00
0.0000589 Btc
$45,204.00
45,178.891 0X94B008AA00579C1307B0EF2C499AD98A8CE58E58
0.0666%
71
Uniswap (v3)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XDAC17F958D2EE523A2206206994597C13D831EC7$1.002
0.0000590 Btc
$43,582.00
43,477.774 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.0641%
72
Uniswap (v2)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XB53ECF1345CABEE6EA1A65100EBB153CEBCAC40F$1.00
0.0000589 Btc
$43,249.00
44,608.493 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.0658%
73
Platypus Finance
0XC7198437980C041C805A1EDCBA50C1CE5DB95118-0XD586E7F844CEA2F87F50152665BCBC2C279D8D70$1.00
0.0000589 Btc
$41,544.00
41,516.739 0XC7198437980C041C805A1EDCBA50C1CE5DB95118
0.0612%
74
Platypus Finance
0XD586E7F844CEA2F87F50152665BCBC2C279D8D70-0XC7198437980C041C805A1EDCBA50C1CE5DB95118$1.00
0.0000589 Btc
$41,538.00
41,521.554 0XD586E7F844CEA2F87F50152665BCBC2C279D8D70
0.0612%
75
EXMO
DAI-ETH$0.9996
0.0000589 Btc
$38,374.00
38,388.764 DAI
0.0566%
76
Uniswap (Optimism)
0X8C6F28F2F1A3C87F0F938B96D27520D9751EC8D9-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.001
0.0000590 Btc
$36,526.00
36,300.764 0X8C6F28F2F1A3C87F0F938B96D27520D9751EC8D9
0.0535%
77
Uniswap (Arbitrum One)
0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1-0XFD086BC7CD5C481DCC9C85EBE478A1C0B69FCBB9$1.002
0.0000590 Btc
$36,520.00
36,473.564 0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1
0.0538%
78
Crypto.com Exchange
DAI-USD$0.9983
0.0000588 Btc
$31,658.00
31,710.900 DAI
0.0468%
79
CoinEx
DAI-USDT$1.003
0.0000590 Btc
$31,007.00
30,936.018 DAI
0.0456%
80
Bancor (V2)
DAI-BNT$0.9953
0.0000586 Btc
$27,030.00
27,157.788 DAI
0.0401%
81
DeFi Swap
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2$1.001
0.0000590 Btc
$25,202.00
25,254.049 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.0373%
82
Gate.io
DAI-USDT$0.9996
0.0000589 Btc
$21,630.00
21,567.877 DAI
0.0318%
83
Coinbase Exchange
ETH-DAI$1.00
0.0000589 Btc
$20,475.00
16.347 ETH
0.0000%
84
Bybit
ETH-DAI$1.00
0.0000589 Btc
$19,253.20
15.394 ETH
0.0000%
85
Bitfinex
DAI-BTC$1.00
0.0000589 Btc
$18,723.31
18,714.761 DAI
0.0276%
86
Uniswap (v3)
0X2B591E99AFE9F32EAA6214F7B7629768C40EEB39-0X6B175474E89094C44DA98B954EEDEAC495271D0F$1.003
0.0000590 Btc
$16,917.48
585,975.450 0X2B591E99AFE9F32EAA6214F7B7629768C40EEB39
0.8643%
87
ApeSwap (Polygon)
0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$1.001
0.0000589 Btc
$15,750.29
15,758.331 0X2791BCA1F2DE4661ED88A30C99A7A9449AA84174
0.0232%
88
Bitfinex
DAI-USD$1.001
0.0000589 Btc
$13,862.56
13,855.630 DAI
0.0204%
89
KuCoin
ETH-DAI$1.00
0.0000589 Btc
$12,825.71
10.246 ETH
0.0000%
90
Bitvavo
DAI-EUR$0.9972
0.0000587 Btc
$11,890.31
11,924.035 DAI
0.0176%
91
Quickswap
0X7CEB23FD6BC0ADD59E62AC25578270CFF1B9F619-0X8F3CF7AD23CD3CADBD9735AFF958023239C6A063$0.9933
0.0000585 Btc
$11,542.85
9.188 0X7CEB23FD6BC0ADD59E62AC25578270CFF1B9F619
0.0000%
92
KuCoin
BTC-DAI$1.00
0.0000589 Btc
$10,980.30
0.645 BTC
0.0000%
93
Bybit
BTC-DAI$1.00
0.0000589 Btc
$10,431.19
0.615 BTC
0.0000%
94
Uniswap (v2)
0X6B175474E89094C44DA98B954EEDEAC495271D0F-0X9393FDC77090F31C7DB989390D43F454B1A6E7F3$0.9638
0.0000568 Btc
$6,110.90
6,184.979 0X6B175474E89094C44DA98B954EEDEAC495271D0F
0.0091%
95
ProBit Global
DAI-USDT$1.00
0.0000589 Btc
$5,931.58
5,930.820 DAI
0.0087%
96
Uniswap (v3)
0X2260FAC5E5542A773AA44FBCFEDF7C193BC2C599-0X6B175474E89094C44DA98B954EEDEAC495271D0F$0.9983
0.0000588 Btc
$5,752.28
0.340 0X2260FAC5E5542A773AA44FBCFEDF7C193BC2C599
0.0000%
97
Trader Joe
0XB31F66AA3C1E785363F0875A1B74E27B85FD66C7-0XD586E7F844CEA2F87F50152665BCBC2C279D8D70$0.9939
0.0000585 Btc
$5,731.92
424.303 0XB31F66AA3C1E785363F0875A1B74E27B85FD66C7
0.0006%
98
SpiritSwap
0X04068DA6C83AFCFA0E13BA15A6696662335D5B75-0X8D11EC38A3EB5E956B052F67DA8BDC9BEF8ABF3E$0.9994
0.0000589 Btc
$3,253.18
3,241.390 0X04068DA6C83AFCFA0E13BA15A6696662335D5B75
0.0048%
99
Uniswap (Optimism)
0X7F5C764CBC14F9669B88837CA1490CCA17C31607-0XDA10009CBD5D07DD0CECC66161FC93D7C9000DA1$1.001
0.0000590 Btc
$2,311.21
2,309.391 0X7F5C764CBC14F9669B88837CA1490CCA17C31607
0.0034%
100
Bitstamp
DAI-USD$0.999
0.0000588 Btc
$881.10
881.980 DAI
0.0013%

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