How to mint UNI ?

Solidity Programming Language
2 min readApr 2, 2021
Pangolin

We go to genesis. Uniswap deployer sent 1 billion UNI to Uniswap UNI token

https://etherscan.io/tx/0x4b37d2f343608457ca3322accdab2811c707acf3eb07a40dd8d9567093ea5b82

We go to ETH/DAI pool and we focus on the following transaction.

https://info.uniswap.org/pair/0xa478c2975ab1ea89e8196811f51a7b7ade33eb11

Please click the “Add ETH and DAI” link which you show above.

Right now. We are in the etherscan world.

There are 3 transfers in this transaction.

https://etherscan.io/tx/0x55eefb1081b91a4d11b8d28a1b5804f916e614391ff22b72cd0b181eeb862135/

Firstly, user sent 1953 DAI to the ETH/DAI pool. Secondly, user sent to 0,99 ETH to the ETH/DAI pool. Lastly, Uniswap sent 32,44 UNI to user.

How does UNISWAP create UNI?

This is ETH/DAI pool page. Max total supply says how much UNI can be created in this pool. This is fixed number. 913.904 !

https://etherscan.io/token/0xa478c2975ab1ea89e8196811f51a7b7ade33eb11

We know that there are 28.335 ETH and 54.698.779 DAI in this pool.

54.698.779 DAI is equal to( 1 ETH=1930 DAI) 28.341 ETH .

Total ETH amount in this pool nearly 56.676 (28.335+ 28.341).

https://info.uniswap.org/pair/0xa478c2975ab1ea89e8196811f51a7b7ade33eb11

User added 0,99 ETH and 1953 DAI.

1953 DAI is equal to 1,011 ETH.

Total added ETH is 2,0019 (0,99+1,011).

https://etherscan.io/tx/0x55eefb1081b91a4d11b8d28a1b5804f916e614391ff22b72cd0b181eeb862135/

The formula is (Added ETH / Total ETH) * Max. Total Supply

(2,0019/56.676)*913.904=32,28 UNI

Thanks to Hayden Adams and other team didn’t reply my questions.

Note: Add liquidity function

Dr. Engin YILMAZ

Ankara

--

--

Solidity Programming Language

Solidity basics for beginners: Learn the fundamentals of smart contract development and build your first DApp! #Solidity #Foundry #Ethereum #Opcodes #DApps