Revolution Protocol - passteque's results

A protocol to empower communities to raise funds, fairly distribute governance, and maximize their impact in the world.

General Information

Platform: Code4rena

Start Date: 13/12/2023

Pot Size: $36,500 USDC

Total HM: 18

Participants: 110

Period: 8 days

Judge: 0xTheC0der

Id: 311

League: ETH

Collective

Findings Distribution

Researcher Performance

Rank: 82/110

Findings: 1

Award: $25.16

๐ŸŒŸ Selected for report: 0

๐Ÿš€ Solo Findings: 0

Awards

25.1638 USDC - $25.16

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
duplicate-397

External Links

Lines of code

https://github.com/code-423n4/2023-12-revolutionprotocol/blob/d42cc62b873a1b2b44f57310f9d4bbfdd875e8d6/packages/revolution/src/ERC20TokenEmitter.sol#L152-L156

Vulnerability details

Impact

The buyToken function within the ERC20TokenEmitter contract allows users to acquire the governance token using a VRGDA. This function lacks any form of slippage control, which becomes significant in the context of the buyToken function, as the token's price increases exponentially when the supply surpasses the schedule.

Proof of concept

As can be observed by looking at its parameters and implementation, the buyToken function of the ERC20TokenEmitter contract, doesnโ€™t have any type of slippage protection:

    function buyToken(
        address[] calldata addresses,
        uint[] calldata basisPointSplits,
        ProtocolRewardAddresses calldata protocolRewardsRecipients
    ) public payable nonReentrant whenNotPaused returns (uint256 tokensSoldWad) {

This means that users have no control over the number of ERC20 tokens they will receive. Due to the exponential pricing function, there is an incentive to delay token purchases as much as possible.

For instance, if Alice intends to use the buyToken function and has either set a low gas usage or is outpaced by a more sophisticated user, she could end up with far fewer tokens than anticipated.

Tools Used

Manual Review

An additional parameter could be added to the buyToken function, to let users decide the minimum amount of tokens to be received, with a relative check after minting.

Assessed type

Other

#0 - c4-pre-sort

2023-12-22T21:41:15Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2023-12-22T21:41:24Z

raymondfam marked the issue as duplicate of #26

#2 - c4-pre-sort

2023-12-24T06:00:55Z

raymondfam marked the issue as duplicate of #397

#3 - c4-judge

2024-01-06T16:31:18Z

MarioPoneder 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