Oracles
Last updated
Last updated
ReactorFusion utilizes the decentralized Chainlink & Pyth oracle solutions, which provide up-to-date token price data to smart contracts on the zkSyncEra Mainnet.
Responsibilities of an oracle
Updates, stores, and distributes up-to-date token prices relevant to the system.
Disables exchange functionality if prices are not fresh.
Provides up-to-date token prices for liquidation functionality.
ReactorFusion utilizes a singular SimpleOracle
contract to interact with Pyth oracle.
At ReactorFusion, the on-chain manifestation of the oracle is the SimpleOracle
contract, which interacts with the Pyth contract and fetches prices. The primary user of these prices is the Comptroller
contract, which needs them to calculate collateral status when performing liquidations.
Contract | Description |
---|---|
SimpleOracle
The oracle is responsible for fetching and processing Pyth oracle data.
Comptroller
The Comptroller reads price data from SimpleOracle and calculates borrowable amounts