code-423n4 / 2023-01-rabbithole-findings

1 stars 2 forks source link

Royalty logic might result in DoS with certain marketplaces #635

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/RabbitHoleReceipt.sol#L90 https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/RabbitHoleReceipt.sol#L71

Vulnerability details

Impact

The royalty fee logic can result in DoS which prevents NFTs to be sold on marketplaces

Proof of Concept

Currently, the RabbitHoleReceipt contract has two flaws within its royalty logic:

1) royaltyFee can be set > 10_000 2) royaltyRecipient can be set to address(0) [known-issue]

Both of these configurational freedoms can result in DoS with marketplace implementations because the desired fee amount cannot be transferred because it is either higher than the initial value or the recipient is 0x0.

Tools Used

VSCode

Recommended Mitigation Steps

Consider validating both variables accordingly.

c4-judge commented 1 year ago

kirk-baird changed the severity to QA (Quality Assurance)

c4-sponsor commented 1 year ago

waynehoover marked the issue as sponsor acknowledged

c4-judge commented 1 year ago

kirk-baird marked the issue as grade-b