Open Dollar - 0xbrett8571's results

A floating $1.00 pegged stablecoin backed by Liquid Staking Tokens with NFT controlled vaults.

General Information

Platform: Code4rena

Start Date: 18/10/2023

Pot Size: $36,500 USDC

Total HM: 17

Participants: 77

Period: 7 days

Judge: MiloTruck

Total Solo HM: 5

Id: 297

League: ETH

Open Dollar

Findings Distribution

Researcher Performance

Rank: 53/77

Findings: 1

Award: $41.97

Analysis:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: hunter_w3b

Also found by: 0xbrett8571, 0xweb3boy, JCK, Myd, SAAJ, ZanyBonzy, clara, fouzantanveer, jauvany, wei3erHase

Labels

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

Awards

41.9716 USDC - $41.97

External Links

Open Dollar is a decentralized algorithmic stablecoin protocol that aims to maintain a floating $1.00 peg backed by staked ETH and other assets. It utilizes NFT-controlled vaults and an incentive structure to manage the supply and maintain the peg.

Architecture

Open Dollar consists of several core smart contracts:

graph TB
  Vault721-->ODProxy
  Vault721-->ODSafeManager
  ODSafeManager-->SAFEHandler
  SAFEHandler-->SAFEEngine
  • Vault721 - ERC721 NFT contract that manages ownership of collateral vaults
  • ODProxy - Proxy contract through which users interact with their vault
  • ODSafeManager - Manages vault operations like deposit/withdraw
  • SAFEHandler - Per-vault access control granted to ODSafeManager
  • SAFEEngine - Core protocol engine that tracks vault collateralization

Key Mechanisms

The main mechanisms for maintaining the peg are:

  • Collateralized vaults - Vaults are opened with ETH/stETH collateral protecting a stablecoin debt position. This collateral ratio must stay above the liquidation ratio.
  • NFT-controlled vaults - Each collateral vault is an NFT in Vault721. Transferring the NFT transfers vault ownership and collateral.
  • Floating peg - The DAO can vote to adjust interest rates to stabilize the peg. Rates incentivize closing vaults when ODX > $1.
  • Liquidations - Keepers can liquidate undercollateralized vaults to recapitalize the system.

Analysis

Overall the core design and architecture seem sound. Here are some areas worth focusing on:

Centralization Risks

The governor address holds a significant amount of power. It can pause parts of the system and drain funds. Consider implementing a timelock and spread authorization across a multisig to mitigate centralization risk.

Systemic Risks

Black swan events like long term price decline of ETH could cause severe undercollateralization and cascading liquidations. Implement better stress testing, circuit breakers, diversified collateral, and liquidity provisions to make the system antifragile.

Potential Attack Vectors

  • Reentrancy - Use reentrancy guards when modifying state before external calls.
  • Math errors - Use SafeMath libraries and extensive test cases to avoid underflows and overflows.
  • Oracle manipulation - Use a decentralized network of oracles, staking, monitoring, and graceful failovers to secure price feeds.

Gas Optimization

Several areas such as enumerating user vaults and proxy deployments could be optimized to save gas costs for users.

Conclusion

Open Dollar has a solid design and architecture. With some added defenses against black swan risks and by following best practices around access control, math, and reentrancy, the system can become resilient and decentralized long-term.

Time spent:

15 hours

#0 - c4-pre-sort

2023-10-27T01:47:18Z

raymondfam marked the issue as sufficient quality report

#1 - c4-judge

2023-11-03T17:23:22Z

MiloTruck 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