This repository has been archived by the owner on Nov 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Ch_301 - M-03 wrong token address on ShortLongSpell.sol
#114
Labels
Escalation Resolved
This issue's escalations have been approved/rejected
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Will Fix
The sponsor confirmed this issue will be fixed
Comments
github-actions
bot
added
the
Excluded
Excluded by the judge without consulting the protocol or the senior
label
May 3, 2023
Escalate for 10 USDC The same reason as #116 but in a different implementation and it needs another solution |
You've created a valid escalation for 10 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
Escalation accepted Valid medium |
|
sherlock-admin
added
Reward
A payout will be made for this issue
Escalation Resolved
This issue's escalations have been approved/rejected
and removed
Non-Reward
This issue will not receive a payout
Escalated
This issue contains a pending escalation
Excluded
Excluded by the judge without consulting the protocol or the senior
labels
Jun 1, 2023
Fix looks good. Contract now correctly burns vault rather than vault.uToken |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Escalation Resolved
This issue's escalations have been approved/rejected
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Will Fix
The sponsor confirmed this issue will be fixed
Ch_301
medium
M-03 wrong token address on
ShortLongSpell.sol
Summary
Vulnerability Detail
ShortLongSpell.openPosition() send
uToken
to SoftVault then deposit it into the Compound protocol to earn a passive yield. In return, SPELL receives share tokes of SoftVaultaddress(strategy.vault)
WERC20.sol
should receiveaddress(strategy.vault)
token, but the logic ofShortLongSpell.sol
subcall (WERC20.sol)wrapper.burn()
and pass theuToken
address (please check the Code Snippet part) instead ofstrategy.vault
addressImpact
Short/Long Spell will never work
Code Snippet
1- https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/spell/ShortLongSpell.sol#L128-L141
2- https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/spell/ShortLongSpell.sol#L229-L234
Tool used
Manual Review
Recommendation
1-
2-
The text was updated successfully, but these errors were encountered: