Open Dollar - perseus'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: 19/77

Findings: 3

Award: $300.52

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: 0xAadi

Also found by: 0xDemon, 0xlemon, 0xprinc, Arz, Giorgio, Greed, MrPotatoMagic, T1MOH, btk, ge6a, m4k2, nmirchev8, perseus, xAriextz, yashar

Awards

21.9995 USDC - $22.00

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
duplicate-429

External Links

Lines of code

https://github.com/open-dollar/od-contracts/blob/67e5917e7dc0c16324aff3fde0298cd218a15152/src/contracts/proxies/ODSafeManager.sol#L105

Vulnerability details

Impact

Missing functionality prevents ODProxy from granting other accounts access to the safe.

In order to grant access to the particular safe for which specific instance of ODProxy is the owner, it is necessary to call allowSAFE() on ODSafeManager. This method initially can only be invoked by the safe owner or the corresponding instance of ODProxy.

System is designed so that ODProxy uses functionality in BasicActions.sol and CommonActions.sol to interact with the ODSafeManager (by relying on delegatecall). However, current functionality in BasicActions and CommonActions does not contain corresponding functionality for invoking allowSAFE().

Also calling directly ODSafeManager.allowSAFE() through ODProxy does not work since that call would be executed in the context of ODProxy (due to delegatecall invocation).

For users to successfully invoke allowSAFE() they would need to deploy or use some other already deployed contract with extra functionality that wraps interaction with ODSafeManager.allowSAFE(). In this case delegatecall will be properly propagated and updates in ODSafeManager will be properly executed in the context of ODSafeManager and not of ODProxy.

Proof of Concept

Tools Used

Manual review

Add extra functionality to the BasicActions.sol or document how end users should deploy extra functionality to interact with all ODSafeManager contract features.

Assessed type

call/delegatecall

#0 - c4-pre-sort

2023-10-26T19:31:39Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2023-10-26T19:31:53Z

raymondfam marked the issue as duplicate of #380

#2 - c4-judge

2023-11-02T18:18:32Z

MiloTruck marked the issue as not a duplicate

#3 - c4-judge

2023-11-02T18:18:41Z

MiloTruck marked the issue as duplicate of #294

#4 - c4-judge

2023-11-08T00:24:28Z

MiloTruck marked the issue as satisfactory

Findings Information

🌟 Selected for report: hals

Also found by: 0xprinc, nmirchev8, perseus, yashar

Labels

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

Awards

224.3342 USDC - $224.33

External Links

Lines of code

https://github.com/open-dollar/od-contracts/blob/67e5917e7dc0c16324aff3fde0298cd218a15152/src/contracts/proxies/ODSafeManager.sol#L20

Vulnerability details

Impact

Updating safeManager reference in Vault721 will brick safe transfers since the state of the new ODSafeManager instance won't have corresponding data. In addition, it is not clear how it would be possible to achieve seamless migration as particular safeHandler instance grants safe modification permission within SafeEngine only to the single/original ODSafeManager instance and cannot be updated afterwards since there is no functionality for that in SafeHandler.sol contract.

It seems that if updates to the implementation are expected ODSafeManager should be a proxy contract.

Proof of Concept

Tools Used

Manual review.

Consider making ODSafeManager reference in Vault721 immutable. Make ODSafeManager upgradeable contract.

Assessed type

Upgradable

#0 - c4-pre-sort

2023-10-26T19:41:23Z

raymondfam marked the issue as low quality report

#1 - c4-pre-sort

2023-10-26T19:41:41Z

raymondfam marked the issue as duplicate of #37

#2 - c4-judge

2023-11-01T20:31:26Z

MiloTruck marked the issue as not a duplicate

#3 - c4-judge

2023-11-01T20:36:02Z

MiloTruck marked the issue as duplicate of #233

#4 - c4-judge

2023-11-08T00:06:33Z

MiloTruck marked the issue as partial-25

#5 - MiloTruck

2023-11-08T00:07:15Z

Partial credit as the report has highlighted the bug, but didn't provide sufficient explanation as to what the bug is.

#6 - c4-judge

2023-11-08T00:07:37Z

MiloTruck changed the severity to 2 (Med Risk)

#7 - c4-judge

2023-11-08T00:12:15Z

MiloTruck marked the issue as satisfactory

Findings Information

🌟 Selected for report: Kaysoft

Also found by: Arz, T1MOH, btk, fibonacci, hals, holydevoti0n, immeas, perseus, spark, tnquanghuy0512

Labels

bug
2 (Med Risk)
low quality report
satisfactory
edited-by-warden
duplicate-202

Awards

54.1911 USDC - $54.19

External Links

Lines of code

https://github.com/open-dollar/od-contracts/blob/67e5917e7dc0c16324aff3fde0298cd218a15152/src/contracts/gov/ODGovernor.sol#L41

Vulnerability details

Impact

Governance system is initialised with 1 block of initial voting delay and 15 blocks for the duration of the voting period. These parameters are inadequate for meaningful governance process as they allow proposals to be created and executed after 3-4 mins on Arbitrum. This short voting period does not allow end users to react in case of undesired system changes, while attackers may potentially compromise system by proposing, voting for, and executing malicious proposal in short time span before others may even notice it.

Based on the values it seems that incorrect assumption is that unit for these params is days while the actual unit is a block.

Proof of Concept

Following is the initilization of ODGovernor with mentioned parameters.

constructor( address _token, TimelockController _timelock ) Governor('ODGovernor') GovernorSettings(1, 15, 0) GovernorVotes(IVotes(_token)) GovernorVotesQuorumFraction(3) GovernorTimelockControl(_timelock) {}

Tools Used

Manual review

Set initial GovernorSettings parameters to a more meaningful values.

Assessed type

Governance

#0 - c4-pre-sort

2023-10-26T17:56:27Z

raymondfam marked the issue as low quality report

#1 - c4-pre-sort

2023-10-26T17:56:38Z

raymondfam marked the issue as duplicate of #73

#2 - c4-judge

2023-11-02T08:47:11Z

MiloTruck marked the issue as satisfactory

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