Within the LendingPool it is a core functionality to deposit and withdraw assets from the curve vault, presumably to earn interest on deposited assets. However accounting within the LendingPool makes it impossible to withdraw accrued interest.
LendingPool::_depositIntoVault
LendingPool::_withdrawFromVault
As you can see above in the function the total vault deposits are tracked as amount deposited and withdrawn, not as shares, neither is there any helper function to rectify this. This means that if the deposited value is 100 crvUSD, even if it was left within the curve vault for years, could only ever be withdrawn as 100 crvUSD, leaving accrued interest permanently locked within the curve vault.
Since this functionality is clearly meant to cover (at least partially) paid interest on RTokens, leaving the accrued interest within the curve vault will directly affect the solvency of the protocol. While users continue to accrue interest on R Tokens, the liabilities of the protocol will grow and eventually without the ability to access it's own interest rates within the curve vault, outgrow the assets.
Likelihood is High since no preconditions have to be met.
Impact is High since this directly affects the protocol solvency.
Therefore the total severity is High.
Manual Review
Implement functionality to update the amount of totalVaultDeposit depending on received vault shares.
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.