wrong defaultCurrency
can be set in the OptimisticOracleIntegrator
causing the defaultBond
to be zero
#143
Labels
defaultCurrency
can be set in the OptimisticOracleIntegrator
causing the defaultBond
to be zero
#143
Github username: @Audinarey
Twitter username: audinarey
Submission hash (on-chain): 0xf2bc1358baf543cbfb82574e86088600a06d592dc42e108b446ec1c98a776254
Severity: medium
Description:
Description
From the UMA Optimistic Oracle Docs.
The
OptimisticOracleIntegrator::_setDefaultCurrencyAndBond(...)
function is used to set thedefaultCurrency
of the oracle integrator and thedefaultBond
is derived from thedefaultCurrency
.However as shown below, the
_setDefaultCurrencyAndBond
function only checks that thedefaultCurrency
is not a zero address and a such a non-whitelisted currency can be set as default, ( when this happens, thegetMinimumBond(...)
function will return zero as well return zero because minimum bond is not set for the non whitelisted currency.Attack Scenario\
Attachments
Modify the
OptimisticOracleIntegrator::_setDefaultCurrencyAndBond(...)
function as shown belowThe text was updated successfully, but these errors were encountered: