Cudos contest - nahnah's results

Decentralised cloud computing for Web3.

General Information

Platform: Code4rena

Start Date: 03/05/2022

Pot Size: $75,000 USDC

Total HM: 6

Participants: 55

Period: 7 days

Judge: Albert Chon

Total Solo HM: 2

Id: 116

League: COSMOS

Cudos

Findings Distribution

Researcher Performance

Rank: 54/55

Findings: 1

Award: $65.82

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

65.8244 USDC - $65.82

Labels

bug
G (Gas Optimization)

External Links

make a local copy of multiple use of a global variable and use one require only for one logic to save gas

poc

https://github.com/code-423n4/2022-05-cudos/blob/main/solidity/contracts/Gravity.sol#L301 https://github.com/code-423n4/2022-05-cudos/blob/main/solidity/contracts/Gravity.sol#L396

before '''

require( _currentValset.validators.length == _currentValset.powers.length && _currentValset.validators.length == _v.length && _currentValset.validators.length == _r.length && _currentValset.validators.length == _s.length, "Malformed current validator set" );

'''

after '''

uint256 length = _currentValset.validators.length; require(length == _currentValset.powers.length, "Malformed current validator set"); require(length == _v.length, "Malformed current validator set"); require(length == _r.length, "Malformed current validator set"); require(length == _s.length, "Malformed current validator set");

'''

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