-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pledge creators can be rug pulled anytime #106
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-68
satisfactory
satisfies C4 submission criteria; eligible for awards
Comments
Duplicate of #17 |
kirk-baird marked the issue as not a duplicate |
kirk-baird marked the issue as duplicate |
kirk-baird marked the issue as satisfactory |
kirk-baird marked the issue as not a duplicate |
kirk-baird marked the issue as duplicate of #17 |
Simon-Busch marked the issue as duplicate of #68 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-68
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2022-10-paladin/blob/66f9fcc813e220906a13e779b3198891e30459cc/contracts/WardenPledge.sol#L653
Vulnerability details
Proof of Concept
When a user creates a new Pledge, the contract transfers the reward amount of
rewardToken
from his address to the contract’s address. The issue is that the contract allows the contract’s owner to just transfer thoserewardTokens
to himself anytime without having to delegate any boost to the Pledge creator.Steps:
rewardToken
are transferred from his wallet to the contractremoveRewardToken
to setminAmountRewardToken[token] **=** *0*
recoverERC20
with the address of therewardToken
rewardToken
are in the owner’s wallet, without him joining the pledge and delegating any boost, while the contract is left with 0rewardToken
and no one can join that particular pledge anymoreImpact
This gives 100% power of the admin to steal any user’s “pledged” reward tokens any time. This can happen not only with a compromised owner wallet but with an owner that turned malicious also.
Recommendation
Remove the recoverERC20 functionality, since it is not needed for the protocol’s functionality and is only there to “Recovers ERC2O tokens sent by mistake to the contract”
The text was updated successfully, but these errors were encountered: