The LendingPool
contract lacks functionality to claim yield accrued in the Curve vault, resulting in permanently locked yield even after all users withdraw their liquidity.
The LendingPool
contract integrates with a Curve vault to earn additional yield on deposited funds. However, the implementation only handles withdrawing principal amounts when users borrow or withdraw liquidity, with no mechanism to claim the accrued yield.
The root cause is that the Curve vault accrues yield by increasing the share price over time, but the LendingPool::_withdrawFromVault() function only withdraws specific amounts needed for user operations:
This means that even if all users withdraw their liquidity, the protocol will still have vault shares representing the accrued yield that cannot be accessed.
Users deposit 100 tokens into LendingPool
LendingPool
deposits 80 tokens into Curve vault (keeping 20% buffer)
Over time, vault shares appreciate in value due to yield
Users withdraw their 100 tokens through normal operations
The yield portion of vault shares remains locked in the contract with no way to withdraw it
Protocol permanently loses access to the accrued yield
Protocol permanently loses access to yield earned in Curve vault
Value locked increases over time as more yield accrues
Add a yield claiming function that can be called by admin. It will calculate the amount of shares that represents the total deposits into the vault, and then will subtract it from the total shares, to get the yield:
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.