LendingPool maintains buffer ratio of provided liquidity. It deposits excess liquidity into curve vault when current liquidity ratio is above buffer ratio, and withdraws from curve vault when current liqudity ratio falls below buffer ratio. However, when withdrawing from curve vault, the owner parameter is incorrectly set to msg.sender
. Due to this, liquidity rebalancing and ensuring will revert, which will lead to deposit/withdraw failure.
The vulnerability resides in LendingPool._withdrawFromVault
As we can see in ICurveCrvUSDVault.withdraw
, owner parameter is set to msg.sender
:
It depends on ICurveCrvUSDVault
implementation but it will likely to pass those params to curve vault, which is ERC-4626 compliant.
Thus, it will try to burn shares of msg.sender
i.e. user, instead of burning shares of LendingPool or RToken.
We can confirm the above statement by looking into curve vault source code:
Deposit and withdraw will revert when current liquidity ratio is below buffer ratio
In worst case, if user approved LendingPool to spend their curve share, their share will be burnt unexpectedly
Manual Review
owner
parameter should be set to correct one. LendingPool, RToken or ICurveCrvUSDVault
depending on curve vault implementation.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.