Sandclock contest - sirhashalot's results

The Next Generation of Wealth Creation.

General Information

Platform: Code4rena

Start Date: 06/01/2022

Pot Size: $60,000 USDC

Total HM: 20

Participants: 33

Period: 7 days

Judge: LSDan

Total Solo HM: 9

Id: 67

League: ETH

Sandclock

Findings Distribution

Researcher Performance

Rank: 14/33

Findings: 2

Award: $1,413.46

🌟 Selected for report: 2

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: jayjonah8

Also found by: bugwriter001, camden, palina, sirhashalot

Labels

bug
duplicate
2 (Med Risk)
disagree with severity

Awards

232.4551 USDC - $232.46

External Links

Handle

sirhashalot

Vulnerability details

Impact

The Claimers.sol contract calls the _mint() function from the OpenZeppelin ERC721.sol file. The OpenZeppelin comments for this function state "WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible". The _safeMint() function helps to confirm that a contract successfully receives a ERC721 token using the receiver's OnERC721Received() function, and will revert if the ERC721 token is not received as expected.

In contrast, the Depositors.sol function properly uses _safeMint() instead of _mint().

Proof of Concept

The call to _mint() is at line 63 of the Claimers.sol file

Replace the _mint() call with a call with _safeMint() to make use of the _checkOnERC721Received() function in OpenZeppelin's _safeMint() implementation

#0 - r2moon

2022-01-11T15:59:41Z

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