Uniswap V3 Position

1. Do you get the value of LP NFT by going directly to the oracle of TWAP done by UNIWAP? If LP NFT is attacked by lightning loans causing the price to be unanchored. Will themis take a liquidation operation directly?

Yes, we do get the value through TWAP oracle. In the latest version, we use uniswap V3's TWAP quotation. Time weighting can target price attacks to a certain extent, but more importantly, we have adopted a whitelist mechanism for addresses that directly call LendingPool. That is to say, Themis allows lightning loans to be made by protocols in the whitelist, thereby realizing Lending Pools Protocol-to-Protocol, and because of this setting, ordinary addresses cannot directly bypass the front-end to activate lightning loans. If there is a price break, we will also have a correction time of about 30 minutes. During this time, users will be allowed to adjust the risk through prepayment or Increase position. This prevents attackers from maliciously liquidating the borrower's assets.

2. How to create a uniswap V3 position?

When adding liquidity to a Uniswap v3 pool, you must provide two assets in a particular ratio. In many cases, your contract or the user's wallet hold a different ratio of those two assets. In order to deposit 100% of your assets, you must first swap your assets to the optimal ratio and then add liquidity. However, the swap may shift the balance of the pool and thus change the optimal ratio!

reference: https://docs.uniswap.org/sdk/guides/liquidity/swap-and-add

Last updated