Comment on page
UniswapOracle
An ETH/USDC Uniswap TWAP snapshot oracle
The UniswapOracle reads the TWAP of duration (default to 10 mint) price information from UniswapV3 Pool The Governor ⚖️can change the duration.
DurationUpdate
New TWAP duration
type | param | description |
uint256 | _duration | new value of the TWAP duration |
function read() external view returns (Decimal.D256 memory, bool);
Reads the oracle value and reports the peg as RUSD per underlying. The boolean value returned informs whether the reported value is valid. Invalid means the oracle is uninitialized or the contract is paused.
function setDuration(uint256 _duration) external;
Changes the time-weighted average price to
_duration
second snapshotsemits
DurationUpdate
uniswaporacle.json
3KB
Code
Uniswap Oracle ABI
iuniswaporacle.json
878B
Code
Uniswap Oracle Interface ABI
ioracle.json
270B
Code
Oracle Interface ABI
Last modified 2yr ago