Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

cergyk - User never receive the interest on lending to the protocol #26

Closed
github-actions bot opened this issue Mar 1, 2023 · 0 comments
Closed
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

Comments

@github-actions
Copy link

github-actions bot commented Mar 1, 2023

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

@github-actions github-actions bot added Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label High A valid High severity issue labels Mar 1, 2023
@github-actions github-actions bot closed this as completed Mar 1, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

1 participant