Panoptic pool can be non-profitable by specific Uniswap governance #469
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
M-05
primary issue
Highest quality submission among a set of duplicates
🤖_138_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2024-04-panoptic/blob/main/contracts/CollateralTracker.sol#L247-L251
https://github.com/code-423n4/2024-04-panoptic/blob/main/contracts/CollateralTracker.sol#L261-L263
Vulnerability details
Impact
Swap commission is paid on the intrinsic value based on
s_ITMSpreadFee
inCollateralTracker
contract.If
s_ITMSpreadFee
is zero, then swap commission can not be paid.Proof of Concept
As you can see above code snippet, If fee(Uniswap fee) is below 100, then _poolFee and s_ITMSpreadFee can be zero.
Currently, there are no such pools that have below 0.01% fee on the UniswapV3.
But Uniswap fee level can be adjusted by the governance proposal like November 2021.
Here is the mention about it in Uniswap Protocol.
Uniswap v3 introduces multiple pools for each token pair, each with a different swapping fee. Liquidity providers may initially create pools at three fee levels: 0.05%, 0.30%, and 1%. More fee levels may be added by UNI governance, e.g. the 0.01% fee level added by this governance proposal in November 2021, as executed here.
https://dune.com/jcarnes/The-StableSwap-Wars
Competitions between Protocols like Uniswap and Carbon, more fee levels can be added in the future.
Indeed, there are several discussions on the less fee levels in stable coins pair.
https://gov.bancor.network/t/custom-taker-fee-on-stable-to-stable-trades/4370
If protocol fee is less than 100 (i.e fee < 0.01 %), then PanopticPool's swap commission can not be taken.
Tools Used
Manual review
Recommended Mitigation Steps
Use Uniswap's DECIMALS (1e6) instead 10_000 and update all code related to DECIMALS.
Assessed type
Uniswap
The text was updated successfully, but these errors were encountered: