Escher contest - kaliberpoziomka8552'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: 101/119

Findings: 1

Award: $0.84

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-12-escher/blob/5d8be6aa0e8634fdb2f328b99076b0d05fefab73/src/minters/LPDAFactory.sol#L29-L42 https://github.com/code-423n4/2022-12-escher/blob/5d8be6aa0e8634fdb2f328b99076b0d05fefab73/src/minters/LPDA.sol#L124 https://github.com/code-423n4/2022-12-escher/blob/5d8be6aa0e8634fdb2f328b99076b0d05fefab73/src/minters/LPDA.sol#L63 https://github.com/code-423n4/2022-12-escher/blob/main/src/minters/LPDA.sol#L101

Vulnerability details

Impact

If LPDA sale contract is deployed with incorrect configuration, the buy(...) functionality may stop working and in consequence prevent users from buying NFT and saleReceiver from receiving payment from the sale.

Proof of Concept

The LPDA contract is created in function LPDAFactory.createLPDASale(...), but there are not enough checks of the input. Precisely the function does not check if sale.startPrice >= (sale.dropPerSecond * (sale.endTime - sale.startTime)). If the sale contract LPDA creation is misconfigured (given assertion would not hold), then function LPDA.getPrice(...) could throw an error after some time, because of the computation of return value: temp.startPrice - (temp.dropPerSecond * timeElapsed) where temp.startPrice would be lower than (temp.dropPerSecond * timeElapsed). The function LPDA.buy(...) depends on function LPDA.getPrice(...) (here) and if LPDA.getPrice(...) will revert, then buying would be impossible. The sale receiver and fee receiver get funds from the sale when the last token is minted, however, if buying functionality is blocked they wouldn't be paid and the ethers would stay locked in the contract forever. Also the LPDA.refund(...) function could not work, since is dependent on LPDA.getPrice(...) (here).

Tools Used

Manual review

Consider checking in LPDAFactory.createLPDASale(...) if sale.startPrice >= (sale.dropPerSecond * (sale.endTime - sale.startTime)) is true.

#0 - c4-judge

2022-12-11T11:37:06Z

berndartmueller marked the issue as duplicate of #392

#1 - c4-judge

2023-01-02T19:54:11Z

berndartmueller marked the issue as satisfactory

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