saidam017
high
StableOracleDAI
and StableOracleWBGL
use static uniswapv3 price oracle to calculate the USD price, but use incorrect address when define the static uniswapv3 oracle instance.
StableOracleDAI
and StableOracleWBGL
defined the staticOracleUniV3
inside StableOracleWBGL
and DAIEthOracle
inside StableOracleDAI
with incorrect address.
DAIEthOracle = IStaticOracle(
0x982152A6C7f732Ec7C9EA998dDD9Ebde00Dfa16e // this is address of wbgl/weth uni v3 pool, not price oracle
);
staticOracleUniV3 = IStaticOracle(
0x982152A6C7f732Ec7C9EA998dDD9Ebde00Dfa16e // this is address of wbgl/weth uni v3 pool, not price oracle
);
the StableOracleDAI
and StableOracleWBGL
's getPriceUSD()
will not work properly.
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/oracles/StableOracleWBGL.sol#L18-L20 https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/oracles/StableOracleDAI.sol#L27-L29
Manual Review
Provide the correct address for staticOracleUniV3
inside StableOracleWBGL
and DAIEthOracle
inside StableOracleDAI
.