The Price Oracle contract retrieves the exchange rate between Basis Cash and DAI.
A modified version of
ExampleOracleSimple.solfrom the uniswap-v2-periphery repository has been used.
[0xcontract_address]on the Ethereum mainnet, [other_testnets] testnets.
This contract is yet to be deployed.
event Updated(uint256 price0CumulativeLast, uint256 price1CumulativeLast);
Emitted when the price of Basis Cash is updated via
function update() external
If 24 hours has passed since
updatewas last successfully executed, updates the time-weighted average price (TWAP) of Basis Cash. Emits
function consult(address token, uint amountIn) external view returns (uint amountOut)
Returns the amount of output tokens given in exchange for
tokentokens ((Price of
tokentoken denominated in output tokens) *
function pairFor(address factory, address tokenA, address tokenB) external pure returns (address lpt)
Returns the calculated address for a pair without making any external calls.