Xeon Protocol
  • 🪐Welcome to Xeon
    • Introduction
    • Challenges
    • Mission
    • Ecosystem
    • Products
  • ✨OTC Tools
    • Features
    • Equity Swaps
    • Call Options
    • Put Options
  • 💻How It Works
    • Use Cases
    • Quick Guide
    • What Happened
    • P/L Calculations
  • 🔓Staking NEON
    • How to Stake
    • Assignments
    • Rewards
  • 🌾Real Yield
    • Protocol Income
    • Yield Farming
    • Farming Pools
    • Native Hedge Liquidity
    • Native Loan Collateral
  • 👨‍🌾EARN WITH US
    • How to Earn
    • Hedge Mining
  • ☄️Fees
    • Model
    • Cashier Fees
    • Settlement Fees
  • ⚡Costing and Valuation
    • Highlights
    • Value in Pair Currency
    • Underlying Value
  • 💸ERC20 Hedging
    • Traditional Hedging
    • Blockchain Hedging
    • Neon Hedging Model
    • Traditional Costing Models
      • Binomial VS Monte Carlo
      • Binomial Model
      • Costing Example
      • Conclusion
    • Neon Costing Model
    • Writing Approach
    • Settlement
  • 🪶ERC20 Lending
    • Crypto Lending
    • Neon Lending Model
    • Neon Valuation Model
    • Writing Approach
    • Settlement
  • ⚙️Mechanics
    • ERC20 Vault Model
    • ERC20 Deposit/Withdraw
    • getPairAddress
    • Underlying Value
    • Write
    • Buy
    • Topup
    • Zap
    • Settlement
    • Mining
    • LockedInUse
    • 🧑‍🚀Development
      • Page 1
Powered by GitBook
On this page
  • getUnderlyingValue
  • Functions that use this:
  • Conclusion

Was this helpful?

  1. Mechanics

Underlying Value

Deriving the value of underlying tokens in their paired currency

PreviousgetPairAddressNextWrite

Last updated 1 year ago

Was this helpful?

This process is crucial for our protocol and is the core mechanism behind all our OTC tools.

All tokens deposited into our protocol have a underlying value derived. This refers to the process of determining the equivalent value of a particular ERC20 token in the paired currency.

The utility of deriving the underlying value of tokens can be found here:

getUnderlyingValue

This is the primary function of our protocol engine / core mechanisms.

The function accepts input of token address and amount, then returns the value (in paired currency) and the paired currency address to the caller.

Its depended on the following helper functions:

  • getPairAddressZK

  • IUniswapV2Pair

  • getReserves

  • token0() and token1()

Functions that use this:

  • writeHedge - used to derive createValue of the underlying tokens in the hedge.

  • buyHedge - used to derive the startValue of the underlying tokens in the hedge.

  • settleHedge - used to derive the endValue of the underlying tokens in the hedge, and to determine the payoff for each party in the hedge.

  • depositToken, withdrawToken - used to derive the paired value equivalent of each transfer.

  • getuserTokenBalances - used to retrieve the paired value for a specific balance of tokens held by a wallet on the protocol.

Conclusion

getUnderlyingValue function is the core function of our protocol engine. By embracing the fact that all ERC20 tokens have a measurable value in their paired currency, we open up the door to developing advanced OTC tools that are inclusive of all ERC20 tokens.

It enables Neon Protocol to build sound risk management and lending tools.

⚙️
Underlying Value