Revolution Protocol - SadeeqXmosh'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: 81/110

Findings: 1

Award: $25.16

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

25.1638 USDC - $25.16

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
sufficient quality report
edited-by-warden
duplicate-397

External Links

Lines of code

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

Vulnerability details

Vulnerability Details:

The ERC20TokenEmitter contract features a buyToken() method enabling users to acquire governance ERC20VotesToken, with token prices determined by a linear VRGDA contract. This contract's pricing mechanism relies on daily emissions. However, a critical issue arises as users are unable to specify slippage. In the absence of slippage protection, malicious users could front-run trades, increasing the emission schedule. For instance, if a user wants to buy tokens, a malicious user could front run the trade causing an increase in emission schedule, The user's trade would be executed at unexpectedly higher prices. This vulnerability poses a risk of adverse execution outcomes for users.

Impact:

Users would be forced to accept trades at very bad prices.

Proof of Concept:

   //Absence of slippage could allow users to buy tokens at very terrible prices
    //Alice sends a buyToken[] transaction to the mempool,Bob spots the tx and creates the same trade
    //further pushing the tokenEmitter schedule forward which exponentially increases price and when alice's trade
    //get's executed it gets executed at a very high price than expected.
    function buyToken(
        address[] calldata addresses,
        uint256[] calldata basisPointSplits,
        ProtocolRewardAddresses calldata protocolRewardsRecipients
    ) public payable nonReentrant whenNotPaused returns (uint256 tokensSoldWad) {

Tools Used

Vscodium

Add a slippage parameter to the buyToken method , to determine minimum acceptable amounts by the users.

Assessed type

MEV

#0 - c4-pre-sort

2023-12-22T04:30:33Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2023-12-22T04:30:52Z

raymondfam marked the issue as duplicate of #26

#2 - c4-pre-sort

2023-12-24T06:00:45Z

raymondfam marked the issue as duplicate of #397

#3 - c4-judge

2024-01-06T16:29:43Z

MarioPoneder changed the severity to 2 (Med Risk)

#4 - c4-judge

2024-01-06T16:29:48Z

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