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
Rank: 43/77
Findings: 2
Award: $62.49
🌟 Selected for report: 0
🚀 Solo Findings: 0
54.1911 USDC - $54.19
Protocol will always fail to fetch a asset price . Deployment of CamelotRelayer will fail .
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;
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;
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
54.1911 USDC - $54.19
Protocol will always fail to fetch a asset price . Deployment of UniV3Relayer will fail .
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;
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 ;
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
🌟 Selected for report: MrPotatoMagic
Also found by: 0xMosh, 0xPsuedoPandit, 0xhacksmithh, 8olidity, Al-Qa-qa, Baki, Bughunter101, Krace, Stormreckson, T1MOH, Tendency, eeshenggoh, fibonacci, hals, immeas, kutugu, lsaudit, m4k2, mrudenko, okolicodes, phoenixV110, spark, twicek, xAriextz
8.3007 USDC - $8.30
https://github.com/open-dollar/od-contracts/blob/v1.5.5-audit/src/contracts/proxies/Vault721.sol#L56
Detailed description of the impact of this finding.
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 :
build
function to create a proxy for his account .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 .
Manual Review .
Add a onlyGovernor
modifier to the initializeManager
funciton .
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