• banditx0x Profile Picture

    Whitehat Bandit @banditx0x

    4 months ago

    Uniswap V2 LP tokens are ERC4626 tokens that are comprised of 2 assets. ERC4626 tokens maintain a consistent asset/share ratio upon deposits and withdrawals. Rewards can be distributed to shareholders by increasing assets without increasing the number of shares. In Uniswap V2, the L = sqrt( token0 * token1) "invariant" is followed for liquidity deposits, withdrawals and swaps. "Invariant" is in quotes because this isn't a true invariant - the token amounts can increase due to donations or fee accrual. The token reserves are tracked with internal accounting variables but inflating these variables is easy because the sync() function makes the reserve accounting variables equal to the token balances. Most inflation attacks that apply to ERC4626 vaults also apply to Uniswap V2 LP tokens. For example, there have been many instances of hacks which occurred when LP tokens were included as a borrow asset. The lending pool becomes vulnerable to attacks that donate to inflate the value of the LP token. Many other AMM LP tokens are vulnerable to inflation attacks in the same way. The first-deposit inflation attack doesn't work on Uniswap v2 because Uniswap v2 mints dead shares that don't belong to any user during the first deposit. The same mitigation is used in some ERC4626 vaults.

    4 1 71 6K 60
  • agfviggiano Profile Picture

    Antonio Viggiano @agfviggiano

    4 months ago

    @banditx0x Interesting analysis

    0 0 0 195 0
  • cicada_HQ Profile Picture

    cicada @cicada_HQ

    4 months ago

    @banditx0x This is super important. A lot of projects don’t realize how easy it is to mess with Uniswap V2 reserves because of sync(). If you’re using LP tokens, treat their value as something that can be manipulated.

    0 0 2 105 0
  • alt_devdatt Profile Picture

    devdatt @alt_devdatt

    4 months ago

    @banditx0x what do you think about having virtual shares like in the yieldbox model instead of burning some initial shares?

    1 0 0 160 0
  • othnapcalx Profile Picture

    f(0x0thnapcalx.eth) @othnapcalx

    4 months ago

    @banditx0x @MirraTerminal

    2 0 0 130 0
  • Download Image
    • Privacy
    • Term and Conditions
    • About
    • Contact Us
    • TwStalker is not affiliated with X™. All Rights Reserved. 2024 www.instalker.org

    twitter web viewer x profile viewer bayigram.com instagram takipçi satın al instagram takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al sosyalgram takipçi satın al instagram ücretsiz takipçi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al metin2 metin2 wiki metin2 ep metin2 dragon coins metin2 forum metin2 board popigram instagram takipçi satın al takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al buyfans buy instagram followers buy instagram likes buy instagram views buy tiktok followers buy tiktok likes buy tiktok views buy twitter followers buy telegram members Buy Youtube Subscribers Buy Youtube Views Buy Youtube Likes forstalk postegro web postegro x profile viewer