Open Dollar - 0xMosh'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: 43/77

Findings: 2

Award: $62.49

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: twicek

Also found by: 0xMosh, 0xhacksmithh, Arz, bitsurfer, btk, kutugu, ni8mare, pep7siup, spark, xAriextz

Labels

bug
2 (Med Risk)
downgraded by judge
low quality report
satisfactory
duplicate-187

Awards

54.1911 USDC - $54.19

External Links

Lines of code

https://github.com/open-dollar/od-contracts/blob/v1.5.5-audit/src/contracts/oracles/CamelotRelayer.sol#L20

Vulnerability details

Impact

Protocol will always fail to fetch a asset price . Deployment of CamelotRelayer will fail .

Proof of Concept

CamelotRelayer contracts are supposed to consult a CamelotRelayer TWAP and transforms the result into a standard IBaseOracle feed .then the quote obtained from the pool query is transformed into an 18 decimals format

However the current address of Camelot V3 Factory being used is wrong . It's using Goerli's Camelot V3 Factory address instead of Arbitrum's address . This arises a huge issue of Protocol always failing to fetch a asset price .

  address internal constant _CAMELOT_FACTORY = GOERLI_CAMELOT_V3_FACTORY;

Tools Used

Etherscan

Use Arbitrum's address of Camelot V3 Factory :

- address internal constant _CAMELOT_FACTORY = GOERLI_CAMELOT_V3_FACTORY;
+ address internal constant _CAMELOT_FACTORY = CAMELOT_V3_FACTORY;

Assessed type

Oracle

#0 - c4-pre-sort

2023-10-26T19:17:17Z

raymondfam marked the issue as low quality report

#1 - c4-pre-sort

2023-10-26T19:17:27Z

raymondfam marked the issue as duplicate of #119

#2 - c4-judge

2023-11-02T06:24:35Z

MiloTruck changed the severity to 2 (Med Risk)

#3 - c4-judge

2023-11-02T08:46:41Z

MiloTruck marked the issue as satisfactory

Findings Information

🌟 Selected for report: twicek

Also found by: 0xMosh, 0xhacksmithh, Arz, bitsurfer, btk, kutugu, ni8mare, pep7siup, spark, xAriextz

Labels

bug
2 (Med Risk)
downgraded by judge
low quality report
satisfactory
duplicate-187

Awards

54.1911 USDC - $54.19

External Links

Lines of code

https://github.com/open-dollar/od-contracts/blob/v1.5.5-audit/src/contracts/oracles/UniV3Relayer.sol#L18

Vulnerability details

Impact

Protocol will always fail to fetch a asset price . Deployment of UniV3Relayer will fail .

Proof of Concept

UniV3Relayer contracts are supposed to consult a UniswapV3 TWAP and transforms the result into a standard IBaseOracle feed .then the quote obtained from the pool query is transformed into an 18 decimals format

However the current address of Uniswap V3 Factory being used is wrong . It's using Goerli's Uniswap V3 Factory address instead of Arbitrum's address . This arises a huge issue of Protocol always failing to fetch a asset price .

  address internal constant _UNI_V3_FACTORY = GOERLI_UNISWAP_V3_FACTORY;

Tools Used

Etherscan

Use Arbitrum's address of Uniswap V3 Factory :

- address internal constant _UNI_V3_FACTORY= GOERLI_UNISWAP_V3_FACTORY ;
+ address internal constant _UNI_V3_FACTORY = UNISWAP_V3_FACTORY ;

Assessed type

Oracle

#0 - c4-pre-sort

2023-10-26T19:18:56Z

raymondfam marked the issue as low quality report

#1 - c4-pre-sort

2023-10-26T19:19:05Z

raymondfam marked the issue as duplicate of #119

#2 - c4-judge

2023-11-02T06:24:37Z

MiloTruck changed the severity to 2 (Med Risk)

#3 - c4-judge

2023-11-02T08:46:41Z

MiloTruck marked the issue as satisfactory

Awards

8.3007 USDC - $8.30

Labels

bug
downgraded by judge
grade-b
low quality report
QA (Quality Assurance)
duplicate-16
Q-01

External Links

Lines of code

https://github.com/open-dollar/od-contracts/blob/v1.5.5-audit/src/contracts/proxies/Vault721.sol#L56

Vulnerability details

Impact

Detailed description of the impact of this finding.

Proof of Concept

Function initializeManager is for initializing the safemanager address of the vault contract . However lack of access control makes it vulnerable to fronrunning attacks . safemanager is the only authorized contract to mint safes in the vault contract .

 function initializeManager() external {
    if (address(safeManager) == address(0)) _setSafeManager(msg.sender);
  }

A malicious frontrunner can take advantages of this by below steps :

  1. At first he'll frontrun the initializeManager function to gain the authority to mint safes .
  2. call the build function to create a proxy for his account .
  3. Now , calling mint function and mint as many safes of any safeId as he want .

Although , Governance can regain control of safemanager by calling setSafeManager . But , This attack will DOS the minting of actual safemanager as some of the safes are previously minted by the attacker as SAFEs are minted sequentially .

Tools Used

Manual Review .

Add a onlyGovernor modifier to the initializeManager funciton .

Assessed type

Access Control

#0 - c4-pre-sort

2023-10-26T19:34:52Z

raymondfam marked the issue as low quality report

#1 - c4-pre-sort

2023-10-26T19:35:01Z

raymondfam marked the issue as duplicate of #16

#2 - c4-judge

2023-11-01T20:00:24Z

MiloTruck changed the severity to QA (Quality Assurance)

#3 - c4-judge

2023-11-03T17:57:00Z

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