xBank utilizes the decentralized Pyth network oracle, a dynamic source providing real-time token price data to smart contracts within the zkSync ERA.
How xBank utilizing Oracle:
xBank uses the oracle to precisely evaluate the USD value of collateralized assets, crucial for setting accurate credit limits when users borrow additional assets. The oracle's constant monitoring ensures users stay within their Borrow Limit, while promptly identifying any potential breach to protect xBank's operations from liquidation risks.
Xes serves as the central contract point overseeing all market activities, managing collateral ratios and borrowed amounts to determine the safety or potential liquidation of each user position.
Acting as an intermediary between Xes and the Pyth contract, it facilitates the translation of prices and exchange rates. Additionally, the PythPriceUpdator ensures the timely update of price proofs to the Pyth contract by checking if the retrieved price has stayed the same for a certain period, and if so, it initiates the update process.