Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: high

Use NonReentrant/check-effects-interactions for _distribute, _deployProxy, distributeByOwner & _calculate

Summary

The check-effect-interaction pattern is utilized when a function involves the transfer of ether. This pattern is employed to mitigate reentrancy attacks by prioritizing the update of state changes before proceeding with any external calls. This sequential approach safeguards the function from the risk of repeatedly re-entering itself.

The Non-Reentrant modifier serves the purpose of preventing reentrancy attacks by imposing a restriction on the function's execution. It ensures that the function cannot be invoked again until the ongoing execution has been completed

Vulnerability Details

Withdrawal of funds or unexpected behavior.

Impact

An attacker could potentially call back into your contract's before the initial call has completed, leading to unexpected behavior or fund drains.

Recommendations

Use:
modifier nonReentrant {
require(!locked, "Reentrant call");
locked = ture;
_;
locked = false;
}

function withdraw(uint amount) internal nonReentrant {

}

Support

FAQs

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