Platform: Code4rena
Start Date: 30/05/2023
Pot Size: $300,500 USDC
Total HM: 79
Participants: 101
Period: about 1 month
Judge: Trust
Total Solo HM: 36
Id: 242
League: ETH
Rank: 57/101
Findings: 2
Award: $205.71
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Madalad
Also found by: 0xCiphky, 0xSmartContract, 8olidity, BPZ, Breeje, BugBusters, Kaiziron, MohammedRizwan, Oxsadeeq, Qeew, RED-LOTUS-REACH, T1MOH, brgltd, chaduke, giovannidisiena, lsaudit, peanuts, tsvetanovv
10.4044 USDC - $10.40
In the deposit function within the TalosBaseStrategy contract, both slippage for two tokens (amount0Min and amount1Min) are hardcoded to zero. This can have severe implications as users may unintentionally accept a minimum of zero output tokens from a swap.
As seen here, the hardcoding of zero slippage could potentially result in significant losses for users due to receiving no output tokens from the swap.
Manual Review
It is advised to enable users to specify their preferred slippage. This will provide users with greater control reducing the risk of unexpected losses due to accepting swaps with no output tokens.
Other
#0 - c4-judge
2023-07-09T17:37:07Z
trust1995 marked the issue as duplicate of #828
#1 - c4-judge
2023-07-09T17:37:14Z
trust1995 marked the issue as satisfactory
#2 - c4-judge
2023-07-11T17:03:33Z
trust1995 marked the issue as duplicate of #177
#3 - c4-judge
2023-07-11T17:04:19Z
trust1995 changed the severity to 3 (High Risk)
#4 - c4-judge
2023-07-25T08:54:03Z
trust1995 changed the severity to 2 (Med Risk)
195.3093 USDC - $195.31
Codebase Analysis
The Evaluation of the codebase was adopted through Two approach: Firstly, an in-depth review of the documentation paired with a thorough examination of the implementation within the code. Secondly, the previous audit by Zellic was also dissected to better comprehend their suggestions and ensure the corrections are implemented.
An intriguing issue surfaced from this evaluation: a particular fix linked to the 'delete' keyword in Solidity. The link to this fix is: https://github.com/Maia-DAO/maia-ecosystem-monorepo/commit/a0dd03114eee73e8be2bb822a626faaade5b6452.
In Solidity, the 'delete' keyword traditionally resets a variable back to its initial state. However, for a struct containing a mapping, Solidity does not provide a distinct "zero" state to reset the mapping. This is primarily because mapping keys can neither be iterated nor cleared out.
Yet, upon careful observation, the 'Deposit' struct seemed devoid of any mappings. Consequently, the 'delete' operation should function as anticipated - it should eliminate the deposit information from the storage and prohibit any potential repetitive fund withdrawals.
Architecture Evaluation The architecture adheres to the industry standards. It is well-structured and clearly outlined, showcasing a meticulous design process.
Centralization Risks There are notable centralization risks present, particularly surrounding the OnlyOwner role. This single entity has the power to make critical changes, which could lead to significant issues if the account were compromised.
Systemic Risks The project's reliance on the Anycall router by Multichain presents a substantial systemic risk. Recently, Multichain suspended services for several chains due to issues with its Router5 network. The team was unable to resolve these issues as they could not contact CEO Zhaojun, who was arrested, for necessary server access. More details on this situation can be found here: https://twitter.com/MultichainOrg/status/1663941611380965376.
Other Recommendations
While the provided documentation offers a helpful overview of the contract ecosystem, I found that details about Flywheel contracts are missing. This omission could create confusion for users trying to understand the technical aspects of the system. Therefore, I recommend the project team to prioritize providing clear and accurate information about these contracts.
Furthermore, I identified some mismatches between the comments and the actual code implementation, which could lead to confusion. It is essential to maintain consistency between the two to ensure better code readability and understanding.
Time Spent Over two weeks was spent on this
140 hours
#0 - c4-judge
2023-07-11T09:36:25Z
trust1995 marked the issue as grade-b
#1 - c4-judge
2023-07-11T09:36:31Z
trust1995 marked the issue as satisfactory
#2 - c4-sponsor
2023-07-12T23:20:00Z
0xBugsy marked the issue as sponsor confirmed