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

Findings: 1

Award: $33.58

🌟 Selected for report: 0

🚀 Solo Findings: 0

✅ N-1: Non-library/interface files should use fixed compiler versions, not floating ones

📝 Description

Non-library/interface files should use fixed compiler versions, not floating ones

💡 Recommendation

Delete the floating keyword ^.

🔍 Findings:

2022-09-tribe/blob/main/contracts/peg/SimpleFeiDaiPSM.sol#L2 pragma solidity ^0.8.4;

2022-09-tribe/blob/main/contracts/shutdown/redeem/TribeRedeemer.sol#L2 pragma solidity ^0.8.4;

✅ N-2: Use a more recent version of solidity

📝 Description

Use a solidity version of at least 0.8.4 to get bytes.concat() instead of abi.encodePacked (<bytes>, <bytes>) Use a solidity version of at least 0.8.12 to get string.concat() instead of abi.encodePacked (<str>, <str>) Use a solidity version of at least 0.8.13 to get the ability to use using for with a list of free functions

💡 Recommendation

Use more recent version of solidity.

🔍 Findings:

2022-09-tribe/blob/main/contracts/peg/SimpleFeiDaiPSM.sol#L2 pragma solidity ^0.8.4;

2022-09-tribe/blob/main/contracts/shutdown/fuse/MerkleRedeemerDripper.sol#L2 pragma solidity =0.8.10;

2022-09-tribe/blob/main/contracts/shutdown/fuse/RariMerkleRedeemer.sol#L2 pragma solidity =0.8.10;

2022-09-tribe/blob/main/contracts/shutdown/redeem/TribeRedeemer.sol#L2 pragma solidity ^0.8.4;

✅ N-3: Use string.concat() orbytes.concat()

📝 Description

Solidity version 0.8.4 introduces bytes.concat() (vs abi.encodePacked(<bytes>,<bytes>))Solidity version 0.8.12 introduces string.concat()(vs abi.encodePacked(<str>,<str>))

💡 Recommendation

Use concat instead of abi.encodePacked

🔍 Findings:

2022-09-tribe/blob/main/contracts/shutdown/fuse/RariMerkleRedeemer.sol#L174 bytes32 leafHash = keccak256(abi.encodePacked(msg.sender, _amount));

✅ N-4: Variable names that consist of all capital letters should be reserved for constant/immutable variables

📝 Description

Variable names that consist of all capital letters should be reserved for constant/immutable variables.

💡 Recommendation

Variables that are not constant/immutable should be declared in the lower case also, and the name of constant/immutable variables should be declared in capital letters

🔍 Findings:

https://github.com/code-423n4/2022-09-tribe/blob/main/contracts/peg/SimpleFeiDaiPSM.sol#L75 https://github.com/code-423n4/2022-09-tribe/blob/main/contracts/peg/SimpleFeiDaiPSM.sol#L92-L98

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