FEI and TRIBE Redemption contest - Samatak'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: 93/101

Findings: 1

Award: $33.58

🌟 Selected for report: 0

🚀 Solo Findings: 0

IMMUTABLE ADDRESSES LACK ZERO-ADDRESS CHECK

Constructors should check the address written in an immutable address variable is not the zero address.

There is 1 instance of this issue:

File: contracts/shutdown/redeem/TribeRedeemer.sol
32:   redeemedToken = _redeemedToken;

Mitigation

Add a zero address check for each variables.


CHECK ZERO DENOMINATOR

When a division is computed, it must be ensured that the denominator is non-zero to prevent failure of the function call.

There is 1 instance of this issue:

File: contracts/shutdown/redeem/TribeRedeemer.sol
58:   uint256 redeemedAmount = (amountIn * balance) / base;

Mitigation

Add a zero check for base variable.


PRAGMA VERSION

In the contracts, floating pragmas should not be used. Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.

Proof of Concept

https://swcregistry.io/docs/SWC-103

contracts/peg/SimpleFeiDaiPSM.sol
contracts/shutdown/fuse/RariMerkleRedeemer.sol
contracts/shutdown/fuse/MerkleRedeemerDripper.sol
contracts/shutdown/redeem/TribeRedeemer.sol

Mitigation

Lock the pragma version and use the latest version (0.8.17)

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