You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[3] You can upgrade to modern 0.8.4+ solidity version in order to save gas.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
[4] Consider using if (stAssetBalance > aTokenBalance) return stAssetBalance.sub(aTokenBalance); because in if these values are equal return value will be zero.
This will save some gas.
Impact
[1] Consider using optimized for-loop and apply the following optimizations:
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[2] Using x != 0 uses 6 less gas than x > 0.
Consider changing all "greater than zero" comparisons to "not equal to zero".
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[3] You can upgrade to modern 0.8.4+ solidity version in order to save gas.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[4] Consider using
if (stAssetBalance > aTokenBalance) return stAssetBalance.sub(aTokenBalance);
because in if these values are equal return value will be zero.This will save some gas.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: