简体   繁体   中英

Understand price impact and liquidity in uniswap

I am trying to understand how the price impact and liquidity was calculated in uniswap through the router contract?

Router Contract: https://etherscan.io/address/0x7a250d5630b4cf539739df2c5dacb4c659f2488d

Is there is any direct method or what calculations need to do in my code? Pl. Guide me. Thanks in Advance

You could have a look at the contract source code at https://etherscan.io/address/0x7a250d5630b4cf539739df2c5dacb4c659f2488d#code

eg. in the "addLiquidity" functions.

Also that might help : https://uniswap.org/docs/v2/advanced-topics/understanding-returns/

I have answered the question here: How to calculate Deposit Amounts for Adding Liquidity within Uniswap V3

The excel formulas can be found with the sheet: Excel File

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM