You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
github-actionsbot opened this issue
Mar 1, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
User never receive the interest on lending to the protocol
Summary
Users may lend on the protocol by depositing into soft/hardVaults, which in turn deposit to compound style tokens.
However the user never receives the rewards for lending on compound.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
cergyk
high
User never receive the interest on lending to the protocol
Summary
Users may lend on the protocol by depositing into soft/hardVaults, which in turn deposit to compound style tokens.
However the user never receives the rewards for lending on compound.
Vulnerability Detail
When users withdraw from soft-vaults, only the amount the user deposited is refunded:
https://github.com/sherlock-audit/2023-02-blueberry/blob/main/contracts/BlueBerryBank.sol#L693-L699
wAmount is transferred to the user, which cannot be greater than pos.underlyingAmount, which is the amount of underlying token the user lent to the protocol:
https://github.com/sherlock-audit/2023-02-blueberry/blob/main/contracts/BlueBerryBank.sol#L644
Impact
Users do not have access to rewards accumulated by lending.
Code Snippet
Tool used
Manual Review
Recommendation
Do not cap based on underlying amount
Duplicate of #109
The text was updated successfully, but these errors were encountered: