Moonwell

Moonwell
DeFiFoundry
15,000 USDC
View results
Submission Details
Severity: medium
Invalid

ZeroBalance Logic Error

Summary

The delete accountTokens[user] deletes the user itself and not the tokens held by the user. It can be drained out using reentrancy.

Vulnerability Details

By deploying another contract with payable fallback function, reentrancy attack can be initiated on this delete accountToken[user] in function fixUser.

Impact

Before destroying/burning all the token when liquidation is initiated, It can be attacked by other reentrancy contract, and all the liquisity token instead of burning, will get transferred to attackers contract address.

Tools Used

Foundry fuzz test

Recommendations

  1. using reentrancy for fixUserFunction.

  2. Create a mapping for accountTokens(address => uint) tokens. And delete the tokens.

Updates

Lead Judging Commences

0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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