Platform: Code4rena
Start Date: 27/01/2022
Pot Size: $75,000 USDT
Total HM: 6
Participants: 29
Period: 7 days
Judge: leastwood
Total Solo HM: 6
Id: 72
League: ETH
Rank: 25/29
Findings: 2
Award: $7.95
🌟 Selected for report: 0
🚀 Solo Findings: 0
Fitraldys
in line https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/XOLE.sol#L61 is cheaper to change require and move uint toSend to above line require.
function aku() public { require(msg.sender == dev, "Dev only"); require(devFund != 0, "No fund to withdraw"); uint toSend = devFund; devFund = 0; } //23706 gas
to :
function aku() public { require(msg.sender == dev, "Dev only"); uint toSend = devFund; require(toSend != 0, "No fund to withdraw"); devFund = 0; } //23606 gas
#0 - ColaM12
2022-02-03T06:08:13Z
Duplicate to #137