Aura Finance contest - orion's results

Providing optimal incentives for VotingEscrow systems.

General Information

Platform: Code4rena

Start Date: 11/05/2022

Pot Size: $150,000 USDC

Total HM: 23

Participants: 93

Period: 14 days

Judge: LSDan

Total Solo HM: 18

Id: 123

League: ETH

Aura Finance

Findings Distribution

Researcher Performance

Rank: 92/93

Findings: 1

Award: $83.25

🌟 Selected for report: 0

🚀 Solo Findings: 0

The contract : https://github.com/code-423n4/2022-05-aura/blob/main/contracts/Aura.sol at function checks if the msg.sender is the operator using if condition instead of modifier, this consumes gas more than using a modifier

see :

function mint(address _to, uint256 _amount) external { require(totalSupply() != 0, "Not initialised"); if (msg.sender != operator) { // dont error just return. if a shutdown happens, rewards on old system // can still be claimed, just wont mint cvx return; }

consumed :

gas 30114 gas transaction cost 26186 gas execution cost 26186 gas

Using :

modifier isOperator() { require(msg.sender == operator,"not operator"); } function mint(address _to, uint256 _amount) isOperator external { require(totalSupply() != 0, "Not initialised"); }

consumed :

gas 30113 gas transaction cost 26185 gas execution cost 26185 gas

#0 - 0xMaharishi

2022-05-25T17:42:49Z

Incorrect as we don't want to revert. Also, only saves ONE gas

#1 - dmvt

2022-07-04T17:15:39Z

Technically accurate. Letting it stand, although the value is low to non-existent.

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter