Unlock Protocol contest - Ruhum's results

Protocol for memberships built on a blockchain, where fans can support their favourite creators by purchasing their NFTs!

General Information

Platform: Code4rena

Start Date: 18/11/2021

Pot Size: $50,000 USDC

Total HM: 18

Participants: 26

Period: 7 days

Judge: leastwood

Total Solo HM: 12

Id: 54

League: ETH

Unlock Protocol

Findings Distribution

Researcher Performance

Rank: 10/26

Findings: 2

Award: $868.39

🌟 Selected for report: 2

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: pauliax

Also found by: 0x0x0x, GiveMeTestEther, Reigada, Ruhum, WatchPug, cmichel, kenzo

Labels

bug
duplicate
1 (Low Risk)

Awards

71.4681 USDC - $71.47

External Links

Handle

Ruhum

Vulnerability details

Impact

Not every ERC20 token reverts if an operation was unsuccessful. Instead they might just return false.

If the return value is not properly checked, the contract might ignore the fact that the transfer failed.

https://docs.openzeppelin.com/contracts/2.x/api/token/erc20#SafeERC20

Proof of Concept

https://github.com/code-423n4/2021-11-unlock/blob/main/smart-contracts/contracts/mixins/MixinPurchase.sol#L97

Tools Used

manual analysis

Use the SafeERC20 functions which revert in case the underlying token returns false instead of reverting.

#0 - julien51

2022-01-03T11:56:44Z

Like all other issues related to the use of arbitrary ERC20, I think this is quite limited. We actually want to remain "liberal" here by accepting any ERC20, because it has no impact on the protocol's behavior directly, however this does expect that lock creators will have a good understanding of the challenges of using a custom ERC20 contract.

#1 - 0xleastwood

2022-01-16T05:30:20Z

Duplicate of #162

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