-
Notifications
You must be signed in to change notification settings - Fork 0
unnecessary uint declaration #117
Copy link
Copy link
Open
Labels
G (Gas Optimization)bugSomething isn't workingSomething isn't workingsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons
Metadata
Metadata
Assignees
Labels
G (Gas Optimization)bugSomething isn't workingSomething isn't workingsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons
Handle
rfa
Vulnerability details
Impact
expensive gas
Proof of Concept
https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/XOLE.sol#L93
instead of using
toShareto storeoleToken.balanceOf(address(this)).sub(claimable).sub(totalLocked).sub(devFund);. Just usenewRewarddirectly to save more gas.Tools Used
Recommended Mitigation Steps