When users deposit assets, _depositIntoVault
transfers crvusd
to CurveVault
on behalf of LendingPool
. However, the contract does not transfer crvusd
from the reserve address
to LendingPool
before calling CurveVault::deposit
. As a result, _depositIntoVault
attempts to deposit crvusd
that LendingPool
does not actually own (the assets are stored in reserve.reserveRTokenAddress
), causing the CurveVault::deposit
to fail or lead to unintended behavior.
LendingPool::_rebalanceLiquidity
is called upon supplying assets into the lending pool:
When the desiredBuffer
cap is reached the depositIntoVault
is called to deposit assets into CurveVault
:
The issue arises because LendingPool
does not transfer the necessary assets from reserve.reserveRTokenAddress
to itself before approving and depositing it. As a result the LendingPool
lacks sufficient asset amount, the deposit will fail, causing DoS of the supply functionality.
If we look at the CurveVault
implementation, the assets are transferred from msg.sender
(LendingPool
).
Denial of Service: Deposits into CurveVault
may fail, preventing new deposits from being processed.
Manual Research, VSCode
Ensure that crvusd
is transferred from the reserve address
to LendingPool
before approving and depositing:
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.