VTVL contest - Amithuddar's results

Building no-code token management tools to empower web3 founders and investors, starting with token vesting.

General Information

Platform: Code4rena

Start Date: 20/09/2022

Pot Size: $30,000 USDC

Total HM: 12

Participants: 198

Period: 3 days

Judge: 0xean

Total Solo HM: 2

Id: 164

League: ETH

VTVL

Findings Distribution

Researcher Performance

Rank: 172/198

Findings: 1

Award: $9.09

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

9.086 USDC - $9.09

Labels

bug
G (Gas Optimization)

External Links

1)Use custom errors rather than revert()/require() strings to save gas

File: 2022-09-vtvl\contracts\token\FullPremintERC20Token.sol 11,9: require(supply_ > 0, "NO_ZERO_MINT");

File: 2022-09-vtvl\contracts\token\FullPremintERC20Token.sol: 11: require(supply_ > 0, "NO_ZERO_MINT");

File: 2022-09-vtvl\contracts\token\VariableSupplyERC20Token.sol:

27: require(initialSupply_ > 0 || maxSupply_ > 0, "INVALID_AMOUNT");

37: require(account != address(0), "INVALID_ADDRESS");

41: require(amount <= mintableSupply, "INVALID_AMOUNT");

  1. USING > 0 COSTS MORE GAS THAN != 0 WHEN USED ON A UINT IN A REQUIRE() STATEMENT

This change saves 6 gas per instance

File: 2022-09-vtvl\contracts\token\FullPremintERC20Token.sol 11,25: require(supply_ > 0, "NO_ZERO_MINT");

File: 2022-09-vtvl\contracts\token\VariableSupplyERC20Token.sol 27,32: require(initialSupply_ > 0 || maxSupply_ > 0, "INVALID_AMOUNT"); 27,50: require(initialSupply_ > 0 || maxSupply_ > 0, "INVALID_AMOUNT");

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