Centrifuge - emerald7017's results

The institutional ecosystem for on-chain credit.

General Information

Platform: Code4rena

Start Date: 08/09/2023

Pot Size: $70,000 USDC

Total HM: 8

Participants: 84

Period: 6 days

Judge: gzeon

Total Solo HM: 2

Id: 285

League: ETH

Centrifuge

Findings Distribution

Researcher Performance

Rank: 62/84

Findings: 1

Award: $34.69

Analysis:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

34.6879 USDC - $34.69

Labels

analysis-advanced
grade-b
sufficient quality report
A-15

External Links

Centrifuge: A Comprehensive Analysis

Comments for the judge:

Centrifuge is a promising project that aims to bring real-world assets to DeFi. The Liquidity Pools implementation is a significant step forward in this direction, as it allows investors to participate in asset-backed investments on multiple blockchains.

However, there are some potential risks and challenges that need to be addressed before Centrifuge can reach its full potential. These include:

  • Centralization risks: The Centrifuge protocol relies on a number of centralized entities, such as the routers and the pause admin. This could make it vulnerable to attack or manipulation.
  • Systemic risks: If a large number of investors redeem their tranche tokens at the same time, it could lead to a liquidity crisis. This could be particularly problematic if the pool is heavily invested in a single asset.

Approach taken in evaluating the codebase:

The Centrifuge Liquidity Pools codebase was evaluated using a combination of static analysis and manual inspection. The static analysis was performed using a number of tools, including Solidity Static Analysis Tool (Slither) and MythX. The manual inspection focused on the following areas:

  • Code quality: The code was reviewed for readability, style, and adherence to best practices.
  • Security vulnerabilities: The code was scanned for known security vulnerabilities.
  • Centralization risks: The code was reviewed to identify any potential centralization risks.
  • Systemic risks: The code was reviewed to identify any potential systemic risks.
Screenshot 2023-09-14 145247

Architecture recommendations:

The following architecture recommendations are made to reduce the centralization risks and systemic risks of Centrifuge:

  • Decentralize the routers: The routers could be decentralized by using a distributed consensus mechanism, such as Raft or Tendermint.
  • Introduce a circuit breaker: A circuit breaker could be introduced to prevent liquidity crises by limiting the number of redemptions that can be processed at any given time.
  • Implement a risk management framework: A risk management framework could be implemented to identify and mitigate systemic risks.

Codebase quality analysis:

The Centrifuge Liquidity Pools codebase is generally well-written and easy to understand. The code is well-documented and follows best practices. However, there are a few areas where the code could be improved:

  • Some of the contracts are quite large and complex. This could make them more difficult to audit and maintain.
  • Some of the contracts use external libraries that are not well-tested. This could introduce security vulnerabilities.

Centralization risks:

The following centralization risks were identified in the Centrifuge Liquidity Pools codebase:

  • The routers are centralized entities. This means that they could be attacked or manipulated by malicious actors.
  • The pause admin is a centralized entity. This means that they could be used to halt the protocol or prevent users from redeeming their tokens.

Mechanism review:

The following mechanisms are used to mitigate the centralization risks in Centrifuge:

  • The routers are subject to a timelock. This means that it takes 48 hours for a router to be removed from the system.
  • The pause admin is subject to a veto from the delayed admin. This means that the delayed admin can overrule the pause admin and allow users to redeem their tokens.

Systemic risks:

The following systemic risks were identified in the Centrifuge Liquidity Pools codebase:

  • If a large number of investors redeem their tranche tokens at the same time, it could lead to a liquidity crisis.
  • If a large number of investors default on their loans, it could also lead to a liquidity crisis.
<img width="1386" alt="liquidity_flow1" src="https://github.com/emerald7017/ms/assets/109695038/519bae01-7e9e-481e-b824-69f4d71454a7">
<img width="1274" alt="liquidity_flow2" src="https://github.com/emerald7017/ms/assets/109695038/7b66b594-f089-41f0-b898-a34770721a64">

The diagram shows that there are a number of centralized entities involved in the Centrifuge Liquidity Pools system. These entities include the routers and the pause admin.

Overall assessment:

The Centrifuge Liquidity Pools codebase is a well-written and innovative implementation of a decentralized asset management system. However, there are some potential centralization risks and systemic risks that need to be addressed before Centrifuge can reach its full potential.

The following recommendations are made:

  • Decentralize the routers and the pause admin.
  • Implement a circuit breaker to prevent liquidity crises.
  • Implement a risk management framework to identify and mitigate systemic risks.

By addressing these recommendations, Centrifuge can become a more robust and secure platform for managing

Time spent:

30 hours

#0 - c4-pre-sort

2023-09-17T02:04:42Z

raymondfam marked the issue as sufficient quality report

#1 - c4-judge

2023-09-26T17:18:30Z

gzeon-c4 marked the issue as grade-b

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