The borrow()
function should allow users who have deposited NFTs or crvUSD into the lending pool to borrow. However, users who deposit only crvUSD into the lending pool but do not deposit NFTs are unable to borrow, despite the documentation stating that borrowing is allowed against crvUSD deposits and NFTs.
The function determines the user’s collateral using getUserCollateralValue()
, which only considers NFTs and does not include crvUSD deposits.
Users who deposit crvUSD but no NFTs will have collateralValue == 0
, causing the NoCollateral()
revert.
This contradicts the intended protocol behavior, which should allow users to borrow against either crvUSD deposits or NFTs.
Scenario: User Cannot Borrow Despite Depositing crvUSD
Step 1: User Deposits crvUSD
User deposits 5,000 crvUSD into the lending pool.
The system should allow borrowing against this deposit.
Step 2: User Attempts to Borrow
User tries to borrow 2,000 crvUSD.
The function calls getUserCollateralValue()
, which only considers NFTs.
Since the user has no NFTs, collateralValue == 0
.
The function reverts with NoCollateral()
, preventing the user from borrowing.
Users who deposit crvUSD without NFTs are unfairly restricted from borrowing.
The function contradicts the documentation, which states that borrowing is possible against crvUSD deposits.
Manual Review
Modify getUserCollateralValue()
to Include Deposited crvUSD
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.