stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Invalid

Code does not follow the best practice of check-effects-interaction

Summary

Code does not follow the best practice of check-effects-interaction

Vulnerability Details

Code should follow the best-practice of check-effects-interaction, where state variables are updated before any external calls are made. Doing so prevents a large class of reentrancy bugs.

Impact

Instances (3):

File: contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol
/// @audit handleOutgoingRESDL called prior to this assignment
114: reSDLSupplyByChain[_destinationChainSelector] += reSDLToken.amount + reSDLToken.boostAmount;
/// @audit safeTransfer called prior to this assignment
133: reSDLSupplyByChain[_sourceChainSelector] -= _reSDLToken.amount + _reSDLToken.boostAmount;

114, 133

File: contracts/core/ccip/SDLPoolCCIPControllerSecondary.sol
/// @audit safeTransfer called prior to this assignment
157: if (ISDLPoolSecondary(sdlPool).shouldUpdate()) shouldUpdate = true;

157

Tools Used

Recommendations

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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