RabbitHole Quest Protocol contest - vanko1's results

A protocol to distribute token rewards for completing on-chain tasks.

General Information

Platform: Code4rena

Start Date: 25/01/2023

Pot Size: $36,500 USDC

Total HM: 11

Participants: 173

Period: 5 days

Judge: kirk-baird

Total Solo HM: 1

Id: 208

League: ETH

RabbitHole

Findings Distribution

Researcher Performance

Rank: 166/173

Findings: 1

Award: $2.59

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/RabbitHoleReceipt.sol#L58-L61 https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/RabbitHoleTickets.sol#L47-L50

Vulnerability details

Impact

In both RabbitHoleReceipt.sol and RabbitHoleTickets.sol the usage of the onlyMinter modifier is essentially useless and everyone can call functions that are not intended to be called by everyone. Examples are mint in and mintBatch in the mentioned contracts. This can lead to manipulation of other parts in the protocol and would make extracting value from given quest practically impossible.

Proof of Concept

The modifier code is invalid as it does not check properly the minter address

Tools Used

VsCode

Rewrite the modifier like this:

    modifier onlyMinter() {
        if(msg.sender != minterAddress) revert OnlyMinter();
        _;
    }

#0 - c4-judge

2023-02-05T04:19:33Z

kirk-baird marked the issue as duplicate of #9

#1 - c4-judge

2023-02-14T08:39:19Z

kirk-baird 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