Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

n33k - getSupplyProportion uses Uniswap V3 pool token balances which can be easily manipulated #731

Closed
sherlock-admin opened this issue May 24, 2023 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label High A valid High severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented May 24, 2023

n33k

high

getSupplyProportion uses Uniswap V3 pool token balances which can be easily manipulated

Summary

getSupplyProportion uses Uniswap V3 pool tokens balances which are easily manipulated. The protocol rebalances the USSD/DAI token proportion to 50/50 to rebalance the USSD/DAI price. This works for Uniswap V2 pools but does not work for Uniswap V3 pools.

Vulnerability Detail

Uniswap V3 has a different liquidity model from Uniswap V2. The token balances do not control the price. The attacker can manipulate the token proportion without affecting the token price with Uniswap V3 concentrated liquidity.

Impact

The attacker can control the swap token amount during rebalance to steal the protocol.

Code Snippet

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSDRebalancer.sol#L82-L90

Tool used

Manual Review

Recommendation

Use Uniswap V2 pool.

Duplicate of #808

@github-actions github-actions bot closed this as completed Jun 5, 2023
@github-actions github-actions bot added High A valid High severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jun 5, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label High A valid High severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant