Open Dollar - wei3erHase'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: 54/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
low quality report
A-07

Awards

41.9716 USDC - $41.97

External Links

About the Vault721 and SafeManager: Merge them! There is no possibility of changing the SafeManager without breaking the afterTransfer, and there's no need of changing the SafeManager, unless new features are added, but then a new ERC721 can be released.

Now the deployment looks like this:

  • deploy Vault721(governor) (leave 2 methods open to be initialized)
  • deploy SafeManager(safeManager, vault721)
    • calls vault721 to initialize itself
  • deploy NftRenderer(vault721, safeManager, oracleRelayer, ...)
    • again calls vault721 to initialize itself
    • only queries safeManager for SafeEngine

If Vault721 and SafeManager are merged into a SafeManager721, then the deployment could look like:

  • deploy NftRenderer(safeEngine, oracleRelayer, ...)
  • deploy SafeManager721(nftRenderer, safeEngine, ...)

Notice, the NftRenderer doesn't need at all to know what's the SafeManager, it doesn't even care about ids, since it can read the safe status directly from the safeEngine using (address safeHandler, bytes32 cType).

Merging these 2 contracts seems like a logical design decision.

About the proxies: Instead of having a mapping user to proxy, and the nft ownership is the user's, but the safe ownership is of the proxy... Why not making the whole permission based on the NFT owner, and ask the owner to provide his proxy the permission to act on his behalf. Is just 1 approve transaction away from not having to interconect so many contracts and concepts in the authorization flow.

One argument against i can think would be "but the user then could authorize any proxy and get rugged", which is true, because you're asking him to set something up instead of making it seamless and by default (that's what i understand that the mechanics rationale is about). But it is also true, that despite the user has a proxy, he can also approve any random address and get rugged, so is risk neutral in a way, since is not adding more danger.

There is no reason why a EOA user shouldn't be calling straight to the SafeManager (ofc if he owns the safe), provided he can somehow interact via proxy with it: since is almost impossible, for example, to empty a SAFE without a proxy, since the debt to pay is calculated by the second and the parameters have to be previously signed to be broadcast.

Time spent:

4 hours

#0 - c4-pre-sort

2023-10-27T01:44:57Z

raymondfam marked the issue as low quality report

#1 - c4-judge

2023-11-03T17:19:53Z

MiloTruck marked the issue as grade-c

#2 - c4-judge

2023-11-03T17:20:46Z

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