Skip to content
ClearClear
Docs
Protocol/AssuranceOracle

AssuranceOracle

Source: contracts/peripherals/AssuranceOracle.sol · Guide: reserve · Upgradeable (UUPS proxy)

1 min readUpdated View source

On this page
Network
Chain id
Address
Base Sepolia
84532

Functions that change state

Function
Who can call
Also
initialize(address _assurancePool, uint256 _targetRTD, address _uniswapFactory, address _wethAddress, address _usdcAddress, address _usdtAddress, address _daiAddress, address _tokenRegistry)
Once, when the proxy is initialised
renounceOwnership()
The owner
setForceRegistryFallback(address token, bool force)
onlyOwner
setPricingAddresses(address _uniswapFactory, address _wethAddress, address _usdcAddress, address _usdtAddress, address _daiAddress)
onlyOwner
setTargetRTD(uint256 _targetRTD)
onlyOwner
setTargetRTDSource(address _source)
onlyOwner
setTwapPeriod(uint32 _period)
onlyOwner
transferOwnership(address newOwner)
The owner
upgradeTo(address newImplementation)
onlyOwner (via _authorizeUpgrade)
upgradeToAndCall(address newImplementation, bytes data)
onlyOwner (via _authorizeUpgrade)
payable

Read functions

Anyone can call these; they change nothing.

Function
Returns
assurancePool()
address
checkIsStablecoin(address token)
bool
DAI_ADDRESS()
address
FEE_TIER()
uint24
forceRegistryFallback(address)
bool
getPriceRatio(address tokenA, address tokenB)
uint256
getPriceSource(address token)
string
getTokenPriceInUSD(address token)
uint256
getUniswapPrice(address token)
uint256
getWhitelistedTokens()
address[]
hasPricingData(address token)
bool
isReserveToken(address token)
bool
isTokenWhitelisted(address token)
bool
MAX_TWAP_PERIOD()
uint32
MIN_TWAP_PERIOD()
uint32
owner()
address
proxiableUUID()
bytes32
quote(address depositToken, address reserveToken, uint256 depositAmount)
uint256
staticTargetRTD()
uint256
targetRTD()
uint256
targetRTDSource()
address
tokenRegistry()
address
twapPeriod()
uint32
uniswapFactory()
address
USDC_ADDRESS()
address
USDT_ADDRESS()
address
WETH_ADDRESS()
address

Events

Event
AdminChanged(address previousAdmin, address newAdmin)
BeaconUpgraded(address beacon indexed)
ForceRegistryFallbackSet(address token indexed, bool force)
Initialized(uint8 version)
OwnershipTransferred(address previousOwner indexed, address newOwner indexed)
PricingAddressesUpdated(address uniswapFactory indexed, address weth indexed)
TargetRTDSourceUpdated(address source indexed)
TargetRTDUpdated(uint256 newTargetRTD)
TwapPeriodUpdated(uint32 newPeriod)
Upgraded(address implementation indexed)

Errors

Error
TickOutOfBounds()
TwapPeriodOutOfBounds(uint32 period)