Neo Tokyo contest - Englave's results

A staking contract for the crypto gaming illuminati.

General Information

Platform: Code4rena

Start Date: 08/03/2023

Pot Size: $60,500 USDC

Total HM: 2

Participants: 123

Period: 7 days

Judge: hansfriese

Id: 220

League: ETH

Neo Tokyo

Findings Distribution

Researcher Performance

Rank: 84/123

Findings: 1

Award: $29.67

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

L01. Missing zero validations in constructors Both BYTES2 and NeoTokyoStaker constructors set up immutable variables without zero address checks. In case of mistakes deploy with default values there would be no possibility to update addresses for BYTES1, S1_CITIZEN, S2_CITIZEN, IDENTITY, and VAULT. Which could result in the need for contract redeployment and pay extra Gas.

Recommendation: Add zero checks during contract initialization

L02. Solidity style guide violation. According to the Solidity style guide, - upper-case variable naming should be applied only for constants, but now mutable state variables are named in the same style.

Recommendation: Renamed STAKER, TREASURY, VAULT_CAP, NO_VAULT_CAP, LP to use lower case

L03. Missing event editing during critical changes in contract Events should be emitted during changes in the contract to simplify the off-chain analysis of contract behavior.

Recommendation: Add event tracking in changeStakingContractAddress, changeTreasuryContractAddress, configureCaps, configurePools, configureVaultCreditMultipliers, configureIdentityCreditPoints, configureIdentityCreditYields, configureTimelockOptions, lockLP, configureLP functions.

L04. Typos Fix typos in contract NatSpecs: «ctiizen» -> «citiizen» in event Stake NatSpec «configued» -> «configured» in getConfiguredVaultMultiplier NatSpec «entireity» -> «entirety» in Line 1373 of NeoTokyoStaker contract «funciton» -> «function» in configureIdentityCreditPoints NatSpec

#0 - c4-judge

2023-03-17T03:16:16Z

hansfriese marked the issue as grade-b

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