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
Rank: 27/110
Findings: 1
Award: $237.05
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: pavankv
Also found by: 0xAsen, ABAIKUNANBAEV, Raihan, Sathish9098, ZanyBonzy, albahaca, hunter_w3b, ihtishamsudo, kaveyjoe, peanuts, unique, wahedtalash77
237.0469 USDC - $237.05
This report is a summary of the analysis of Revolution Protocol's Codebase.
Day 1-3:
Day 4-5:
transmission11
VRGDAs, which is a new concept and is not often used by any other project. So, I had to understand the concept of transmission11
VRGDAs and how they work.transmission11
VRGDAs and the implementation of transmission11
VRGDAs in Revolution Protocol.Day 6-7:
Day 8 (Final Day):
Protocol Contains Two categories i.e, Core Contracts of Revoltuion Protocol and Reward Mehcainism Contracts. Overall Protocol is structured in a way that it is easy to understand and easy to maintain.
protocol-rewards
Revolution
Codebase was written in well structure by rocketman and gpt4. Everything seems to be fair enough untill the common false assumptions made by the developers which can lead to potential vulnerabilities in the future pops up.
Rewards Contracts
:Rewards contracts were abstract contract and there was nothing much to look for. So, marking both these contracts are of high quality.
Revolution
:Culture Index : Culture Index is a contract that is used to store the art pieces uploaded by the users. It is a very important contract as it is used to store the art pieces and the art pieces are the main assets of the protocol. But it was not pretty well defined and it contains some of the flaws that can lead to DOS attack, submitting that issue in one of my report.
Max Heap : This contract used to store to top vote piece by implementing binary tree data structure. The swapping of the nodes was somewhat fishy and weird as it could be done in a better way. couldn't dig it well enough but it could cause some issue if put in arbitrary situation.
AuctionHouse : It was a fork of nouns auction house. This is the contract that i find most opened to DOS attack. Used some bad practicies which can clearly leads to DOS attack. Also, It was a fork of noun auction house which had some flaws in the their recent audit done by an audit platform. So, it was a bad idea to fork a contract that is not audited well enough.
VerbsToken : It was also a fork of nouns token. It had a flow through multiple contracts. i.e, VerbsToken -> CultureIndex -> Maxheap. Because Verbs Token is minted by Calling DropTopVotePiece and cultureIndex fetch dropVotepiece from MaxHeap. Was unfortunate to break that flow. Good practice by the developers and gpt4.
ERC20TokenEmitter : This was the contract the was using VRGDAs. Although make notes about some attack ideas on this specific contract but was a good written contrac though.
NonTransferableERC20Votes : Tokens that are used to vote on the art pieces. It was a good idea to make the token non transferrable. But it was not a good idea to make the token mintable by the owner. It could lead to some centralisation issues.
There are trusted role in the protocol as (operatorsm slashers and pausers) which can lead to centralisation issues. Also, the owner of the protocol can mint the tokens which can also lead to centralisation issues.
Overall, the codebase is not really centralised but used centralisation in such a way that can be dangerous for the whole protocol.
Gist For Relative Diagrams and Mental Models
How Protocol functions:
Ethereum Mainnet including Optimisim & Base As Well
Using bad practices which can lead to the bricking of whole protocol as well as breaking of the Main Invariant of the protocol.
Anything that can be problematic to the protocol is the DOS attack. And Developers leaves many doors open for DOS attack. i.e, making external or public functions with having for loops with push mechanism. So any one can make that contract totally useless by just calling that function with a for loop and pushing the gas limit to the maximum.
As noted Above Depending on single contract to deploy all the contracts of the protocol can also lead to the bricking of the whole protocol. Which will make the protocol totally useless. Consider some backup or alternative in case revolutionbuilder
contract is compormised.
Using OZ's EIP712Upgradeable and not implementing their recommendations of using ECDSA to get the signer address and using default ecrecover which can be lead to malleablitiy issues.
79 hours
#0 - c4-pre-sort
2023-12-24T00:51:04Z
raymondfam marked the issue as high quality report
#1 - c4-sponsor
2024-01-05T00:03:20Z
rocketman-21 (sponsor) acknowledged
#2 - c4-judge
2024-01-07T14:31:55Z
MarioPoneder marked the issue as grade-a