This repository has been archived by the owner on May 26, 2023. It is now read-only.
berndartmueller - SoftVault
accrued interest is not refunded and stuck forever
#326
Labels
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
High
A valid High severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
berndartmueller
high
SoftVault
accrued interest is not refunded and stuck foreverSummary
Withdrawing isolated collateral tokens does not refund the accrued interest from Blueberry's lending market and remains stuck forever in the
BlueBerryBank
contract.Vulnerability Detail
Isolated collateral is lent out to Blueberry's lending market (a Compound fork) via the
SoftVault
contract. These deposits accrue interest over time.When a user withdraws isolated collateral using the
BlueBerryBank.withdrawLend
function within a spell, the withdrawn amount (wAmount
) is capped at the initially deposited amount (pos.underlyingAmount
).Thus, if the withdrawn amount
wAmount
is greater thanpos.underlyingAmount
, the delta, which is the accrued interest, remains in theBlueBerryBank
contract and is not refunded to the user.Impact
Accrued cToken interest is unrecoverable and stuck forever in the
BlueBerryBank
contract.Code Snippet
BlueBerryBank.sol#L693-L695
Tool used
Manual Review
Recommendation
Consider either keeping the accrued cToken interest as part of protocol revenue or refunding it to the user.
Duplicate of #109
The text was updated successfully, but these errors were encountered: