FIAT DAO veFDT contest - neumo's results

Unlock liquidity for your DeFi fixed income assets.

General Information

Platform: Code4rena

Start Date: 12/08/2022

Pot Size: $35,000 USDC

Total HM: 10

Participants: 126

Period: 3 days

Judge: Justin Goro

Total Solo HM: 3

Id: 154

League: ETH

FIAT DAO

Findings Distribution

Researcher Performance

Rank: 98/126

Findings: 1

Award: $29.89

🌟 Selected for report: 0

🚀 Solo Findings: 0

  1. Non-library/interface files should use fixed compiler versions, not floating ones 1, 2. Contracts should be deployed using the same compiler version/flags with which they have been tested. Locking the pragma (for e.g. by not using ^ in pragma solidity 0.8.3) ensures that contracts do not accidentally get deployed using an older compiler version with unfixed bugs.
  2. Missing zero address validation of _addr in VotingEscrow.sol updateBlocklist, transferOwnership, forceUndelegate, delegate and updatePenaltyRecipient. Also of _owner, _penaltyRecipient and _token in constructor.
  3. Missing zero address validation of _manager and _ve in Blocklist.sol constructor
  4. No way to remove an address from the blocklist. If manager calls block on an address by mistake, there's no way of undoing this.
  5. Function transferOwnership should not change the owner directly. Changing critical addresses in contracts should be a two-step process where the first transaction (from the old/current address) registers the new address (i.e. grants ownership) and the second transaction (from the new address) replaces the old address with the new one (i.e. claims ownership). This gives an opportunity to recover from incorrect addresses mistakenly used in the first step. If not, contract functionality might become inaccessible.
  6. In function _checkpoint when uEpoch is zero, the function first writes the point userOldPoint in position 1 of the points array and after that writes userNewPoint in the same position, so the first three lines of the following snippet are useless:
if (uEpoch == 0) { userPointHistory[_addr][uEpoch + 1] = userOldPoint; } userPointEpoch[_addr] = uEpoch + 1; userNewPoint.ts = block.timestamp; userNewPoint.blk = block.number; userPointHistory[_addr][uEpoch + 1] = userNewPoint;
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