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: 40/77
Findings: 2
Award: $80.26
π Selected for report: 0
π Solo Findings: 0
π Selected for report: 0xmystery
Also found by: 0x6d6164616e, 0xWaitress, 0xsurena, Tendency, ZanyBonzy, cryptothemex, hals, lsaudit, ni8mare, niki, phoenixV110, spark, tnquanghuy0512, twcctop
26.0735 USDC - $26.07
Judge has assessed an item in Issue #430 as 2 risk. The relevant finding follows:
Itβs not clear which token the OD token will be paired with in order to determine the price in the uniV3Relayer contract. Then the following lines are problematic: baseAmount = uint128(10 ** IERC20Metadata(_baseToken).decimals()); multiplier = 18 - IERC20Metadata(_quoteToken).decimals(); quotePeriod = _quotePeriod; Decimals of the token can be greater than 18. Hence, the calculation for the multiplier will overflow and revert if it is greater than 18. Necessary checks to be implemented to make sure it does not happen
#0 - c4-judge
2023-11-03T16:23:21Z
MiloTruck marked the issue as duplicate of #323
#1 - c4-judge
2023-11-03T16:24:13Z
MiloTruck marked the issue as satisfactory
54.1911 USDC - $54.19
The address for _UNI_V3_FACTORY
is set as GOERLI_CAMELOT_V3_FACTORY
which in Registry.s.sol
is equal to 0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6
. But, on Arbitrum scan this address has no transactions. It's not the correct address for the factory - https://arbiscan.io/address/0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6#tokentxns. The valid address for the factory on Arbitrum is 0x1F98431c8aD98523631AE4a59f267346ea31F984
. This is specified in the Uniswap documentation - https://docs.uniswap.org/contracts/v3/reference/deployments. Hence the right address must be used.
In UniV3Relayer
contract UniV3Relayer is IBaseOracle, IUniV3Relayer { // --- Registry --- address internal constant _UNI_V3_FACTORY = GOERLI_UNISWAP_V3_FACTORY;
In Registry.s.sol
:
address constant GOERLI_UNISWAP_V3_FACTORY = 0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6; address constant GOERLI_CAMELOT_V2_FACTORY = 0x659fd9F4536f540bd051c2739Fc8b8e9355E5042;
Manual review
It is recommended to use the right address for the factory and also to update the variable name from GOERLI_UNISWAP_V3_FACTORY
to ARBITRUM_UNISWAP_V3_FACTORY
.
Other
#0 - c4-pre-sort
2023-10-26T17:27:30Z
raymondfam marked the issue as low quality report
#1 - c4-pre-sort
2023-10-26T17:27:46Z
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:42Z
MiloTruck marked the issue as satisfactory