Closed code423n4 closed 2 years ago
rfa
Detailed description of the impact of this finding.
https://github.com/code-423n4/2022-01-notional/blob/main/contracts/ActionGuards.so its not the effective way to make 'nonreentran' because its declare 3 vars and importing StorageLayoutV1.sol.
StorageLayoutV1.sol
bool private reentrancyStatus = true; modifier nonReentrant() { require(reentrancyStatus, "Reentrant call"); reentrancyStatus = false; _; reentrancyStatus = true; } // 19567 gas save per call (or even more)
2 of the variables are constants which are compiled inline, this optimization does not make sense to me.
How it could be done better? No suggested improvement.
Handle
rfa
Vulnerability details
Impact
Detailed description of the impact of this finding.
Proof of Concept
https://github.com/code-423n4/2022-01-notional/blob/main/contracts/ActionGuards.so its not the effective way to make 'nonreentran' because its declare 3 vars and importing
StorageLayoutV1.sol
.Recommended Mitigation Steps