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

Findings: 1

Award: $33.58

🌟 Selected for report: 0

🚀 Solo Findings: 0

Summary

IdTitle
1Users cannot claim if they have at least 2 valid leaves in merkle tree
2Users can sign again even when they have already signed

1. Users cannot claim if they have at least 2 valid leaves in merkle tree

For each (user, cToken) pair, contract RariMerkleRedeemer kept track of claims[][] amount. When users claim with any valid data, value of claims is updated only once.

So if an user has 2 valid data with the same token in merkle tree, the second one cannot be claimed, since in line 171, it checked that

require(claims[msg.sender][_cToken] == 0, "User has already claimed for this cToken.");

Affected Codes

2. Users can sign again even when they have already signed

In RariMerkleRedeemer, users have to sign a message before they can claim and redeem. And in every sign function, there is a hasNotSigned modifier to not allow users to sign again. Except in signAndClaim() function, it's lacking hasNotSigned modifier.

Even though this does not affect the logic, it is inconsistent and should be fixed for better code quality.

Affected Codes

Recommendation

  • Add hasNotSigned modifier to signAndClaim function.
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