code-423n4 / 2023-10-opendollar-findings

10 stars 7 forks source link

Upgraded Q -> 2 from #246 [1699029716295] #444

Closed c4-judge closed 10 months ago

c4-judge commented 10 months ago

Judge has assessed an item in Issue #246 as 2 risk. The relevant finding follows:

[L-01] Use the factory constant address of the testnet Description import {UNISWAP_V3_FACTORY, GOERLI_UNISWAP_V3_FACTORY} from '@script/Registry.s.sol';

contract UniV3Relayer is IBaseOracle, IUniV3Relayer { // --- Registry --- address internal constant _UNI_V3_FACTORY = GOERLI_UNISWAP_V3_FACTORY; }

import {CAMELOT_V3_FACTORY, GOERLI_CAMELOT_V3_FACTORY} from '@script/Registry.s.sol';

contract CamelotRelayer is IBaseOracle, ICamelotRelayer { // --- Registry --- address internal constant _CAMELOT_FACTORY = GOERLI_CAMELOT_V3_FACTORY; } CamelotRelayer and UniV3Relayer use the testnet’s factory constant address, which should be used for testing purposes. But considering that the contract will be deployed to the production environment, I mark this here.

Recommendations Pass in the addresses of different environments through parameters instead of using hard-coded addresses.

c4-judge commented 10 months ago

MiloTruck marked the issue as duplicate of #187

c4-judge commented 10 months ago

MiloTruck marked the issue as satisfactory