Open c4-bot-2 opened 11 months ago
raymondfam marked the issue as insufficient quality report
raymondfam marked the issue as duplicate of #112
MarioPoneder changed the severity to QA (Quality Assurance)
MarioPoneder marked the issue as grade-c
Hi @MarioPoneder,
This issue is not a duplicate of #112.
I have showcased how easily and relatively cheaply someone can block stuff for enough time to win an art piece that can easily cover the attackers cost, during the block stuff.
I have also showcased how block stuffing was used in the past in the exact same way: the attacker used block stuffing to win a lottery by simply blocking other users from using it. This issue is exactly the same, but inside an auction, not a lottery.
Because of this I believe this is a valid Medium severity issue.
Cheers and thanks for your time.
I believe this issue is valid, https://github.com/code-423n4/2023-12-revolutionprotocol-findings/issues/27 as it's dupe, as they cover a completely different attack concept that is easily economically achievable.
Thank you for your comment!
I appreciate you raising awareness about this issue again. @rocketman-21 However, as it's basically an attack on the network and rather relating to future deployments, QA still seems most appropriate.
All the best!
MarioPoneder marked the issue as grade-b
Hey, @MarioPoneder!
I strongly believe that this issue should not be considered an attack on the network. As explained in all reports related to this vulnerability (#590, #730, #27), a malicious actor can win an auction in a way that is unfavorable to the protocol by employing block stuffing.
Here is a similar issue that was considered a valid medium severity issue in a previous Code4rena contest: https://github.com/code-423n4/2023-05-venus-findings/issues/525
Therefore, this vulnerability, which has a significant impact, should undoubtedly be mitigated by the protocol. Some recommendations for mitigation include:
Have a good one!
Thank you for your comment and I appreciate the mitigation recommendations!
Hey, @MarioPoneder!
I believe that this issue (and his dups #730 , #27 ) should be classified as Medium Severity. The wardens above explain in detail why this vulnerability has a significant impact on the Revolution Protocol.
Cheers.
timeBuffer
is set unreasonably low in this example and can be configured by the owner/DAO even after deployment, therefore nothing to worry.
Lines of code
https://github.com/code-423n4/2023-12-revolutionprotocol/blob/d42cc62b873a1b2b44f57310f9d4bbfdd875e8d6/packages/revolution/src/AuctionHouse.sol#L171-L200 https://github.com/code-423n4/2023-12-revolutionprotocol/blob/d42cc62b873a1b2b44f57310f9d4bbfdd875e8d6/packages/revolution/src/AuctionHouse.sol#L336-L414
Vulnerability details
Impact
AuctionHouse
implements a specialtimeBuffer
, which is used to extend an auction by it, if a bid is created during saidtimeBuffer
.If the
timeBuffer
is 10 minutes, if someone bids in the last 10 minutes of the auction, the auctionendTime
will be extended by 10 minutes.This is implemented to give a fair chance for all bidders to big on the auction, if the auction is especially competitive.
The protocol also plans to deploy to Base and Optimism.
Transactions on Optimism and Base are much cheaper than Ethereum, which opens up a rare attack vector: block stuffing.
A malicious user stuffs an entire block with dummy transactions that consume the entire block gas limit, which is 30m gas on Optimism or ~7$ worth of gas, basically, it’s extremely cheap.
If a user is the current bidder and there is only the
timeBuffer
left (15 minutes for example), he can block stuff for 15 minutes straight to win the auction.Let’s make some quick calculations:
timeBuffer == 15 minutes
, this is the value used in the tests, so we’ll use it here.15 minutes = 900 seconds
Optimism creates a block every 2 seconds, so in 15 minutes, there will be 450 blocks created on Optimism.
1 block = 30m gas, so 450 blocks will have 13.5b gas, which is ~3000 $.
Considering that the protocol auctions off NFT’s which can be sold for huge amounts (https://www.masoative.com/post/most-expensive-nft), spending an extra 3000$ to potentially win hundreds of thousands, even millions is a pretty lucrative deal.
The attack can get cheaper or more expensive, depending on the
timebuffer
.Proof of Concept
Example:
CultureIndex
timeBuffer
) and the whale wants to 100% win it.settleAuction
which transfers the verb token to him, after which he can sell to make a profit.The likelihood of this scenario is not uncommon at all, there have been several instances of block stuffing attacks where malicious actors used the technique to win lotteries/auctions etc. Considering how expensive some NFT’s are, the scenario is 100% possible.
You can read a bit more about block stuffing and how it was used to win a lottery here. https://medium.com/hackernoon/the-anatomy-of-a-block-stuffing-attack-a488698732ae
You can input the gas values here to see the current prices. https://www.cryptoneur.xyz/en/gas-fees-calculator
Tools Used
Manual Review
Recommended Mitigation Steps
I’m not sure what to recommend as there is no way to stop this sort of attack.
One possible way is to make
timeBuffer
much larger to make a block stuffing attack more expensive.Assessed type
Other