Escher contest - Soosh's results

A decentralized curated marketplace for editioned artwork.

General Information

Platform: Code4rena

Start Date: 06/12/2022

Pot Size: $36,500 USDC

Total HM: 16

Participants: 119

Period: 3 days

Judge: berndartmueller

Total Solo HM: 2

Id: 189

League: ETH

Escher

Findings Distribution

Researcher Performance

Rank: 77/119

Findings: 2

Award: $30.15

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

1.3417 USDC - $1.34

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
duplicate-328

External Links

Lines of code

https://github.com/code-423n4/2022-12-escher/blob/5d8be6aa0e8634fdb2f328b99076b0d05fefab73/src/minters/FixedPrice.sol#L73 https://github.com/code-423n4/2022-12-escher/blob/5d8be6aa0e8634fdb2f328b99076b0d05fefab73/src/minters/LPDA.sol#L81

Vulnerability details

The only way to end a sale when it has already started is if all the NFTs have been bought (minted). The only way the NFT creator gets paid from the sale is if the sale ends.

End sale condition example in FixedPrice.sol

if (newId == sale_.finalId) _end(sale);

This means that all NFTs must be bought or the creator will not be able to receive any payment. The creator must either wait for all NFTs to be bought (which could be forever), or buy their own NFTs to end (which requires capital they may not have).

Impact

Creator cannot receive payment for NFTs that sold unless all NFTs have been sold.

I believe it is an incorrect assumption that all NFT projects will be popular and sold out fully. The common case will be that creator will be unable to collect payment for sold NFTs (loss of funds).

Recommendations

Should reconsider the current design to instead allow the creator to receive payment of the NFTs that were already sold.

The current design of all sales contract is that payment is only made once to the creator, when the sale has ended. If this is desired, then FixedPrice and LPDA contracts could follow the OpenEdition contract way of ending the sale after a specific deadline. So even if not all NFTs are sold, the creator can end the sale and receive payment.

#0 - c4-judge

2022-12-12T08:56:52Z

berndartmueller marked the issue as duplicate of #328

#1 - c4-judge

2023-01-02T20:20:47Z

berndartmueller changed the severity to 2 (Med Risk)

#2 - c4-judge

2023-01-02T20:22:41Z

berndartmueller marked the issue as satisfactory

Findings Information

Labels

bug
2 (Med Risk)
partial-50
duplicate-377

Awards

28.8137 USDC - $28.81

External Links

Lines of code

https://github.com/code-423n4/2022-12-escher/blob/5d8be6aa0e8634fdb2f328b99076b0d05fefab73/src/minters/FixedPrice.sol#L110 https://github.com/code-423n4/2022-12-escher/blob/5d8be6aa0e8634fdb2f328b99076b0d05fefab73/src/minters/OpenEdition.sol#L122

Vulnerability details

Use of selfdestruct() is deprecated: https://eips.ethereum.org/EIPS/eip-6049. Vitalik's post: https://hackmd.io/@vbuterin/selfdestruct

A breaking change is expected where SELFDESTRUCT will be removed some time in the future. This will break the contracts functionality and cause the NFT creator to not be able to receive payment.

Impact

The protocol will be broken when the breaking change is implemented, it may result in creator being unable to receive payment since selfdestruct() is used.

Recommendation

Use call() instead to send ether.

#0 - c4-judge

2022-12-11T18:35:39Z

berndartmueller marked the issue as duplicate of #377

#1 - berndartmueller

2023-01-03T15:35:58Z

Applying partial credit as the warden did not demonstrate a concrete impact

#2 - c4-judge

2023-01-03T15:36:04Z

berndartmueller marked the issue as partial-50

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