Algem Documentation
BlogTwitterDiscordTelegram
๐Ÿ‡ฎ๐Ÿ‡ฉ Bahasa Indonesia
๐Ÿ‡ฎ๐Ÿ‡ฉ Bahasa Indonesia
  • ๐Ÿ‘‹ Pengantar
  • ๐Ÿค–Protokol Algem
    • ๐Ÿ’ฆ Liquid dApp Staking
      • ASTR Liquid Staking
      • Unstaking nASTR
      • Liquid staking FAQ
    • ๐ŸŒŠLiquid Lending
    • ๐Ÿ“”nASTR Farming
    • ๐Ÿ’ง nASTR
    • ๐Ÿ‘ฅBergabunglah dengan Komunitas Algem
      • Link Ekosistem
      • Program Algyor
    • ๐Ÿช™Token ALGM
      • Tokenomics
      • Utilitas ALGM
    • ๐Ÿ–ผ๏ธNFT Collections
    • โš–๏ธPendapatan protokol
    • ๐Ÿ—บ๏ธRoadmap
    • โš ๏ธManajemen risiko
  • ๐Ÿง Memulai
    • ๐Ÿ’ผWallets & Networks
      • ๐ŸฆŠMetamask
      • ๐Ÿ”‘Ledger EVM
      • *๏ธPolkadot{.js}
    • ๐Ÿ”€Transfer assets to Astar Network EVM
      • ๐ŸฆFrom a CEX
      • ๐ŸŒ€Using Astar Network Portal
      • ๐ŸŒ‰Using Bridges
      • ๐Ÿ”Using a cross-chain swap
      • ๐Ÿ’ฑUsing a DEX
    • ๐ŸฌCara menggunakan Liquid dApp Staking Algem
      • ๐Ÿ–ฅ๏ธVersi desktop
      • ๐Ÿ“ฑVersi seluler
    • ๐ŸฆˆCara menggunakan nASTR farming Algem
      • ๐Ÿ‘จโ€๐ŸŒพSirius Finance
      • ๐ŸŒฝKagla Finance
      • ๐Ÿฅ•Arthswap
      • ๐Ÿ‹SiO2 Finance
    • ๐Ÿ Cara mentransfer token nASTR dengan Algem
  • ๐Ÿ”งPerkembangan
    • ๐Ÿ•ต๏ธAudit
    • ๐Ÿ“ƒKontrak
    • ๐ŸงตnASTR Price Feeds by DIA
Powered by GitBook
On this page
  • Methodology:
  • DIA Oracle Contract:
  • Algem adapter Contract:
  1. Perkembangan

nASTR Price Feeds by DIA

PreviousKontrak

Last updated 2 years ago

nASTR Price Feeds was developed by the leading Oracle of the Polkadot Ecosystem : .

Methodology:

nASTR price using collateral feed will be derived as follows:

  • nASTR price = ASTR price * (ASTR in staking contracts/ nASTR total supply)

  • ASTR in staking contracts will be derived by calling function getAstrInStakingContractFromAddress() on .

  • nASTR total supply will be derived by calling function totalSupply on

DIA Oracle Contract:

To get the market price of ASTR/USD or nASTR/USD, query getValue() with argument โ€œASTR/USDโ€ or โ€œnASTR/USDโ€. Return values are the price (with 8 decimals, so divide by 10^8 to get the actual price) and unix timestamp of last update. Prices will update as soon as 1% change is detected.

Algem adapter Contract:

The contract connects the ASTR/USD price to onchain collateral information.

Call getNAstrPriceFromCollateralRatio() to get the latest price from the collateral ratio and getAstrInAllStakingContracts() to retrieve the number of staked ASTR in all registered contracts.

More details can be found on DIA's forum:

๐Ÿ”ง
๐Ÿงต
DIA Protocol
Astar DappsStaking contract
nASTR token contract
DIAOracleV2 (0x88463254469c37b9cECb71A34746707e008fb5A9) - Astar (EVM) Explorer
Contract 0x8e066de9a3B0ac5965e4361fDE2752c11509f4F2 - Astar (EVM) Explorer
CDR #033: Algem | Price FeedsDIA Forum | Cross-Chain Oracles for Web3
Logo
Logo
Logo