Submitted by ladboy233
When user creates a position, the fee is snapshot is queryed from uniswap v3 position manager when preparing leverage
and stored in the lien struct
then stored in the liens struct
then when the position is closed, the premium interested paid depends on the spot value of the fee
If the fee increased during the position opening time, the premium is used to cover the fee to make sure there are incentive for lenders to deposit V3 NFT as lender.
As the comments point out:
However, because the fee amount is queried from position manager in spot value, malicious lender increase the liquidity to that ticker range and then can swap back and forth between ticker range to inflate the fee amount to force borrower pay high fee / high premium, while the lender has to pay the gas cost + uniswap trading fee.
But if the lender adds more liquidity to nfts ticker range, he can collect the majority of the liqudity fee + collect high premium from borrower (or forcefully liquidated user to take premium).
It is recommend to cap the premium interest payment instead of query spot fee amount to avoid swap fee manipulation.
adriro (Warden) commented:
Ladboy233 (Warden) commented:
wukong-particle commented:
Ladboy233 (Warden) commented:
wukong-particle (Particle) acknowledged, but disagreed with severity and commented:
0xLeastwood (Judge) decreased severity to Medium
adriro (Warden) commented:
0xleastwood (Judge) commented:
