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 Jan 5, 2025. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
If a transfer error occurs, the catch logic at Line 325 will be executed. The code will emit an event, and the transaction will continue to execute as usual.
Lines 306-309 will update the account debt based on the current account's vault shares and rewardsPerVaultShare. Thus, this effectively marks the account as having received the reward tokens even if the reward token transfer has failed.
sherlock-admin4
changed the title
Tart Aegean Nightingale - Reward token will be lost if a transfer fails
xiaoming90 - Reward token will be lost if a transfer fails
Jul 11, 2024
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` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
xiaoming90
Medium
Reward token will be lost if a transfer fails
Summary
Reward tokens will be lost if a transfer fails.
Vulnerability Detail
If a transfer error occurs, the catch logic at Line 325 will be executed. The code will emit an event, and the transaction will continue to execute as usual.
Lines 306-309 will update the account debt based on the current account's vault shares and
rewardsPerVaultShare
. Thus, this effectively marks the account as having received the reward tokens even if the reward token transfer has failed.https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/common/VaultRewarderLib.sol#L306
Impact
Loss of reward tokens.
Code Snippet
https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/common/VaultRewarderLib.sol#L306
Tool used
Manual Review
Recommendation
Consider escrowing the reward tokens somewhere if the transfer fails so that they can be retrieved later.
Duplicate of #1
The text was updated successfully, but these errors were encountered: