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: 63/77
Findings: 1
Award: $26.07
🌟 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
The CamelotRelayerFactory.sol
contract can deploy CamelotRelayer.sol
for pairs/pools that is deployed on the Camelot
.
function deployCamelotRelayer( address _baseToken, address _quoteToken, uint32 _quotePeriod ) external isAuthorized returns (IBaseOracle _camelotRelayer) { _camelotRelayer = new CamelotRelayerChild(_baseToken, _quoteToken, _quotePeriod); _camelotRelayers.add(address(_camelotRelayer)); emit NewCamelotRelayer(address(_camelotRelayer), _baseToken, _quoteToken, _quotePeriod); }
In the CamelotRelayer.sol
and constructor
function, multiplier
value is set by 18 - IERC20Metadata(_quoteToken).decimals()
. Now if decimal of _quoteToken
is more than 18, deployment of new CamelotRelayer.sol
contract will get reverted.
https://github.com/open-dollar/od-contracts/blob/f4f0246bb26277249c1d5afe6201d4d9096e52e6/src/contracts/factories/CamelotRelayerFactory.sol#L28 https://github.com/open-dollar/od-contracts/blob/f4f0246bb26277249c1d5afe6201d4d9096e52e6/src/contracts/oracles/CamelotRelayer.sol#L58
Manually
Calculate multiplier
value based on the IERC20Metadata(_quoteToken).decimals() > 18
or IERC20Metadata(_quoteToken).decimals() < 18
.
Decimal
#0 - c4-pre-sort
2023-10-26T00:49:57Z
raymondfam marked the issue as sufficient quality report
#1 - c4-pre-sort
2023-10-26T00:50:11Z
raymondfam marked the issue as duplicate of #18
#2 - c4-pre-sort
2023-10-27T05:07:59Z
raymondfam marked the issue as duplicate of #323
#3 - c4-judge
2023-11-02T08:45:40Z
MiloTruck marked the issue as satisfactory