Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: high
Invalid

users can withdraw more tokens than they registered with in `LLMOracleRegistry`

Summary

when a user unregisters in the LLMOracleRegistrytheir allowance is wrongly updated, and then they can call transferFrom to send more tokens than they registered with from the registry to their account.

Vulnerability Details

The problem with the unregisteration implementation is the fact that the approval is not reset after unregistering, a user unregistering the second time will have approval for his last deposit and the new `amount`.

// approve its stake back
token.approve(msg.sender, token.allowance(address(this), msg.sender) + amount);
}

Impact

Users unregistering n+ 1 times, can drain all the tokens in the LLMRegistry contract

Tools Used

Manual Review

Recommendations

Reset the allowance after each unregistering.

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.