FEI and TRIBE Redemption contest - ret2basic's results

A new DeFi primitive that allows any token to become productive and provide FEI liquidity at no cost to the markets that need it most.

General Information

Platform: Code4rena

Start Date: 09/09/2022

Pot Size: $42,000 USDC

Total HM: 2

Participants: 101

Period: 3 days

Judge: hickuphh3

Total Solo HM: 2

Id: 161

League: ETH

Tribe

Findings Distribution

Researcher Performance

Rank: 85/101

Findings: 1

Award: $33.58

🌟 Selected for report: 0

🚀 Solo Findings: 0

FEI and TRIBE Redemption Contest QA Report

Summary

The following QA issues were found during the code audit:

  1. Outdated compiler version (1 instance)
  2. Inconsistent natspec (1 instance)
  3. Consider adding require() statement or emitting an event (1 instance)

Total 3 instances of 3 issues.

1. Outdated compiler version (1 instance)

Some contracts use pragma solidity ^0.8.4, which was released on Apr 21, 2021. This compiler version is 18-month old by now. The latest version is 0.8.17 and it was released 4 days ago.

2. Inconsistent natspec (1 instance)

In contracts/shutdown/fuse/MerkleRedeemerDripper.sol, the natspec does not match the implementation:

/// @notice Overrides drip() in the ERC20Dripper contract to add a balance check on the target
/// @dev This will revert if there are < amountToDrip tokens in this contract, so make sure
/// that it is funded with a multiple of amountToDrip to avoid this case.
function drip() public override {
    require(
        IERC20(token).balanceOf(target) < amountToDrip,
        "MerkleRedeemerDripper: dripper target already has enough tokens."
    );

    super.drip();
}

The require() statement will revert if IERC20(token).balanceOf(target) >= amountToDrip, so either the implementation is wrong or the natspec is wrong.

3. Consider adding require() statement or emitting an event (1 instance)

In contracts/peg/SimpleFeiDaiPSM.sol:

function burnFeiHeld() external {
    uint256 feiBalance = FEI.balanceOf(address(this));
    if (feiBalance != 0) {
        FEI.burn(feiBalance);
    }
}

This function will do nothing if the balance of this contract is 0. This behavior could be confusing and it is hard for debugging. Consider adding require(feiBalance != 0) or emitting an event saying the burn operation failed.

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