Platform: Code4rena
Start Date: 31/08/2023
Pot Size: $55,000 USDC
Total HM: 5
Participants: 30
Period: 6 days
Judge: hickuphh3
Total Solo HM: 2
Id: 282
League: ETH
Rank: 18/30
Findings: 2
Award: $125.74
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: c3phas
Also found by: 0x11singh99, 0x3b, 0xta, JCK, K42, ReyAdmirado, SAQ, Sathish9098, hunter_w3b, kaveyjoe, lsaudit, turvy_fuzz
27.0048 USDC - $27.00
Issue | Description |
---|---|
[ G-01 ] | bondForWithHint has a useless if() statement |
[ G-02 ] | Move require up |
Under [this] if statement the start round of the delegator is set to the next round. That is unneeded since the same exact thing is done in _checkpointBondingState a few lines bellow. In bondForWithHint
if (delegatorStatus(_owner) == DelegatorStatus.Unbonded) { del.startRound = currentRound.add(1); ...
uint256 startRound = roundsManager().currentRound() + 1; bondingVotes().checkpointBondingState( _owner, startRound, _delegator.bondedAmount, _delegator.delegateAddress, _delegator.delegatedAmount, _delegator.lastClaimRound, _transcoder.lastRewardRound );
Under bondForWithHint this require statement is checking a variable that was initialized and stetted way up int the function. If reverts it's gonna waste unnecessary gas, reverting so late into the call, and not in the beginning of it.
#0 - c4-judge
2023-09-21T10:38:15Z
HickupHH3 marked the issue as grade-b
🌟 Selected for report: catellatech
Also found by: 0x3b, ADM, Banditx0x, JayShreeRAM, Krace, Sathish9098
The codebase demonstrates a solid foundation with intriguing concepts, although there is room for improvement. Various mechanisms were reviewed, including governance in GovernorCountingOverridable.sol, arrays in SortedArrays.sol, and, most importantly, bonds in BondingManager.sol. Each of these components offers unique features and functionalities. Recommendations have emphasized that while the current system is comprehensive and sophisticated, it suffers from excessive complexity. A balanced and refined approach, aimed at reducing this complexity, is essential for a well-functioning and secure system.
Severity | Occurrences |
---|---|
High | 0 |
Medium | 1 |
Low | 2 |
Gas | 2 |
Start date | 01.09.2023 |
End date | 04.09.2023 |
Total | 4 days |
Members | Positions | Time spent |
---|---|---|
0x3b | full time researcher | 30H+ |
Only one medium finding was submitted, and although it was unfortunate to find only one vulnerability, it actually demonstrates the proficiency of the developers. Additionally, suggestions for enhancements, optimizations, and improvements were also included, albeit not many. Having dedicated ample time to thoroughly examine the code, I delved deeply into various concepts, striving to uncover as many vulnerabilities as possible. Unfortunately, I did not find many, as the code was too complex for quick comprehension, with extensive unit tests covering every possible scenario. Every scenario I attempted had already been tested and fixed.
The code quality demonstrates a solid foundation, featuring intriguing concepts alongside conventional mechanics. However, there's room for refinement to further elevate its performance. The main issue with this system is its introduction of unnecessary complexity. While it hasn't yet led to many vulnerabilities, it's like a spider web that starts small, but can rapidly expand and entangle the spider into his own creation.
BondingManager.sol
BondingVotes.sol
EarningsPoolLIP36.sol
SortedArrays.sol
GovernorCountingOverridable.sol
Treasury.sol
LivepeerGovernor.sol
Livepeer's existing framework is quite comprehensive, encompassing advanced bonds and nuanced governance implementations that empower delegators to override delegatee votes. Within the parameters of the current scope, the system appears to be well-equipped. It's worth noting that in Solidity, additions don't necessarily equate to improvements. Instead, additional complexity can introduce higher risks in a non-linear, exponential manner. Therefore, maintaining a balanced and refined approach is key to a stable system.
Considering the provided scope, Livepeer demonstrates an exceptionally high level of decentralization. I am truly fascinated (If you can't tell by now xD) by the way delegators can override delegatee decisions. This empowerment further amplifies the influence of ordinary users, enabling the system to achieve even greater decentralization. In contrast to other systems where you cannot extract any value (such as rewards or fees) without becoming a delegator, and once you delegate, you forfeit the ability to make different decisions than the person you've delegated to. This decentralization paves the way for a brighter future where all users are empowered to shape the ecosystem as they see fit. Unfortunately, despite these benefits, decentralization also brings a degree of slowness in adaptation, and in the crypto world, the entire landscape can change dramatically within a few months. This scenario favors only the swift adapters while leaving the slower ones behind.
Since this is their first review, it's normal to find some bugs, although not many and small in damage. There's still room for improvement.I might have found only one existing issue,however I am quite sure other participants will discover a few more vulnerabilities.
For systems as complex as this one, it's a good idea to consider conducting another review after this initial one. This second review could help uncover any significant problems that might have been missed. Complicated systems often require multiple audits to ensure they're safe and functioning effectively.
30 hours
#0 - c4-judge
2023-09-21T15:15:11Z
HickupHH3 marked the issue as grade-b