Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: high
Invalid

The 'compound' function calls external contracts which potentially leads to reentrancy attacks

Summary

The compound function transfers tokens and interacts with external contracts (swap and add liquidity operations). If those contracts are not secure, they could potentially call back into this contract leading to reentrancy attacks. However, this risk is mitigated if the external contracts are trusted and do not have any callbacks.

Vulnerability Details

The function calls external contracts (tokenA, tokenB, GMXManager) which could be manipulated by an attacker to re-enter the function before the first call is finished.

Impact

An attacker could potentially drain the contract of funds by causing the function to be called recursively before the first call is finished.

Tools Used

Slither, Manual Review

Recommendations

Use the Checks-Effects-Interactions pattern to prevent reentrancy attacks. Try to make any state changes before calling external contracts.

Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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