Alcor
  • Alcor.exchange
  • What is Alcor Exchange?
  • Home Page Overview
    • Swap
      • Swap Charts
      • Add Liquidity
      • Manage Liquidity
    • Markets
      • Market Exchange
        • Order Books
        • Graph
        • Open Orders
        • Placing Trades
    • OTC
    • NFT
    • Wallet
  • Developers API
    • Amm Swap Contract API
      • Formulas
      • Contracts
      • Examples
    • Market creation
      • Open new market
    • Contract actions
    • Contract Tables
    • API
      • Markets API
      • Account
      • WebSocket
      • Node API
    • Public Alcor Data Access
  • Alcor Swap
    • Referral / Custom Market Fee
    • Introduction
    • Swap Page
    • Locking Liquidity
    • Providing liquidity
      • How to Add Liquidity on Alcor Exchange
    • Ranges: Everything you need to know
      • How to set a Range for your Liquidity position
    • Pool Page
    • Liquidity Provider FAQ
    • Concentrated liquidity FAQ
    • AlcorSwap v2 Price Oracles
      • Alcor Price Oracle vs DelphiOracle
      • Expanding Price Availability with RAM Purchase
      • How to Use Alcor Price Oracle
  • Alcor Farms: Unlocking DeFi Opportunities
    • Creating Farm Incentives - Quick Tutorial
    • Project Farms Unique Link
    • Technical details
  • LSW- Liquid Staked WAX
    • How it works
    • Exchange rate
    • Withdrawal process
  • Adding Token Information
    • Token logo
    • USD Price
  • Swap Widget
    • Swap Chart Widget
  • Networks Features
    • WAX
      • Alcor USDT
  • Additional Docs
  • Definitions
  • FAQ
    • Does Alcor Exchange Have Fees?
    • Whats the difference between using Swap, Market Trade, and OTC?
    • What is a liquidity Pool?
  • Social Media/Contact
Powered by GitBook
On this page

Was this helpful?

  1. Alcor Swap
  2. AlcorSwap v2 Price Oracles

Expanding Price Availability with RAM Purchase

PreviousAlcor Price Oracle vs DelphiOracleNextHow to Use Alcor Price Oracle

Last updated 1 year ago

Was this helpful?

To extend the availability of historical price data within the Alcor Price Oracle, users can purchase additional RAM. The cost of purchasing RAM is determined by the current market price on the EOSIO blockchain, which can vary based on supply and demand. To calculate the RAM required for the desired data availability period, users can use the following formula:

RAM Required (in bytes) = Number of Observations * Size of Each Observation

For instance, if a user wishes to have the price data available for 3 hours and each observation requires 160 bytes of RAM, they would need to calculate:

RAM Required = 160 bytes * 3 hours * 60 minutes * 60 seconds = 1.728 MB. WAX Token = 0.4073 * 1728 = 703.81440000 WAX (with RAM price is 0.4073 WAX per KB)

Once users have determined the required RAM size, they can proceed with the RAM purchase process by following:

Transfer WAX to the swap.alcor account with the memo: "addoraclerow#poolId".

Additionally, users can easily track the number of observations they have purchased by reviewing their

transaction history