Getting Started
Liquid StakingSecurity Developer docs
  • Hatom's Ecosystem
    • Introduction
    • Lending Protocol
      • Networks
      • Protocol Math
        • Cash Dynamics
        • Borrow Dynamics
        • Protocol Reserves Dynamics
        • Interest Rate
        • Exchange Rate
        • Rewards Dynamics
      • Glossary
        • Money Markets or "MM"
        • Utilisation Rate
        • Collateral Factor or Loan to Value
        • Borrow Limit Used
        • BorrowCap
        • Liquidation Factor/Threshold or Health Factor
        • Liquidation Limit Bar
        • Liquidation Incentive
        • Reserve Factor
        • Close Factor
        • ActiveCollateralCapUSD
        • Supply/Borrow APY
        • HTokens
        • Underlying Token
        • Cash
        • Reserve Balance
      • Fundamental Functions
      • HTokens
      • Lending Protocol Rewards
      • Hatom Price Oracle Infrastructure
        • Oracle Bots
        • Price Aggregator Smart Contract
        • Price Oracle Smart Contract
        • Guardian bot
      • Liquidation
        • How much is the liquidation penalty ?
        • Can you give me an example ?
        • How can I avoid getting liquidated ?
        • Can I participate in the liquidations ecosystem ?
    • Liquid Staking
      • Liquid Staking Derivatives
      • Basic Functionalities
      • Liquid Staking Delegation Algorithm
    • Hatom USD
      • USH Facilitators
        • Lending Protocol Facilitator
          • Borrow Repayment and Liquidations
          • Borrow Rate
        • Isolated Pools Facilitator
          • USH Redemption
          • How to Participate in Redemption
      • Price Stability
      • USH Staking Module
      • Frequently Asked Questions
    • Booster
      • Booster Math
    • Accumulator
    • TAO Bridge
      • Ecosystem Integration
      • Bridging Process
      • Bridging Fees
      • Video Guides
  • Governance
    • Introduction
    • How to vote ?
      • The Voting Process
      • Unstaking HTM Tokens During Voting
      • Increasing Voting Power
      • Voting on Multiple Proposals
    • Tuning Hatom Protocol Parameters
  • Learn more about "Hatom token"
    • Introduction
    • HTM Token
    • Roadmap
  • Security
    • Introduction
    • Security reports
    • Adding an Asset
      • Methodology
      • Risk Parameters
    • Bug Bounty
  • Troubleshooting
    • Guides: Lending Protocol
      • Supply an asset
      • Activate as collateral
      • Borrow an asset
      • Repay a borrow
      • Remove collateral
      • Withdraw your asset
    • How to translate ?
      • Translate "Hatom Protocol":
      • Translate "Docs Section":
    • Request assistance
  • Hatom Protocol
  • USH
  • Blog
  • Syfy
Powered by GitBook
On this page
  • Introduction
  • Oracle Bots
  • Price Aggregator Smart Contract
  • Price Oracle Smart Contract

Was this helpful?

Export as PDF
  1. Hatom's Ecosystem
  2. Lending Protocol

Hatom Price Oracle Infrastructure

as of 02/01/2025

PreviousLending Protocol RewardsNextLiquidation

Last updated 4 months ago

Was this helpful?

Introduction

The Hatom Price Oracle is a robust infrastructure composed of that feed prices into a , similar to the Chainlink Oracle system. This smart contract makes prices available on-chain, enabling the Lending to provide reliable pricing when users interact with the.

Oracle Bots

Oracle Bots are autonomous, containerized entities responsible for submitting prices to the . Each bot has a unique private key, and the corresponding public key is granted Oracle status on the whitelist, allowing it to introduce new prices. Each bot is linked to a specific set of price providers, which may overlap with others.

The Oracle Bots execute two key tasks:

  1. Heartbeat Task: Runs less frequently, according to the round time of the , to ensure regular price submissions.

  2. Threshold Task: Runs more frequently, fetching prices from sources like , , , , and . It compares new prices to previously submitted prices and resubmits them if they exceed a predefined threshold.

Price Aggregator Smart Contract

The Price Aggregator compiles price submissions from whitelisted that pull data from reputable exchanges. Once a certain number of submissions are received (fewer than the total number of ), the calculates a new median price and announces it. Similar to Chainlink’s price feeds, these submit prices in "rounds," typically occurring every 30 minutes to an hour. However, if a price change surpasses a set Threshold, oracles must resubmit a price, regardless of the last submission time.

Price Oracle Smart Contract

The supplies prices to the Controller Smart Contract to ensure all assets are represented in a common unit (typically EGLD). It sources information from:

  • Price Feeds and Price Feeds, which include current and time-weighted average prices (the Safe Price) of specific assets.

  • Feeds, which aggregate data from multiple sources such as , , , , , and .

When the receives a price request, it compares the Safe Price from with the price from the . If the difference is within an acceptable range, the value is deemed valid and sent to the Controller Smart Contract. If the difference exceeds a predefined limit:

  • If the initial tolerance is surpassed: The price is marked invalid, and the issues an alert to the community. The most recent valid price is sent to the Controller Smart Contract. Future calls to will revert unless the prices fall within the tolerance range.

  • If the final tolerance is surpassed: The price is marked invalid, an alert is issued, and sends the most recent valid price to the Controller Smart Contract. The is then suspended, and subsequent price requests will fail until a Guardian manually intervenes to unpause the .

Lending Protocol
Binance
Cryptocompare
HitBTC
Huobi
Kraken
xExchange DEX
AshSwap Aggregator
Binance
Gemini
OKX
HitBTC
Huobi
Kraken
xExchange DEX
Oracle Bots
Price Aggregator Smart Contract
Price Oracle Smart Contract
Price Aggregator Smart Contract
Price Aggregator
Price Aggregator
Oracles
Oracles
Price Aggregator
Oracles
Hatom Price Oracle Smart Contract
Price Aggregator Smart Contract
Hatom Oracle Smart Contract
Price Aggregator
Price Aggregator’s
Oracle
Oracle
Oracle
Oracle
Oracle