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
  • Implications:
  • Settlement Usage
  • lockedinuse Restoration

Was this helpful?

  1. Mechanics

LockedInUse

Collateralize underlying tokens and paired currency during a deal.

PreviousMiningNextDevelopment

Last updated 1 year ago

Was this helpful?

After a user or wallet deposits tokens into our protocol, the tokens are now ready for use in writing or buying OTC deals.

Our protocol is designed for OTC marketplaces and acts as the custodian or escrow when parties engage in a deal.

The following actions require that collateral be locked by the protocol as the custodian during a deal.

  • writing a hedge

  • buying a hedge

  • issuing a loan

  • taking a loan

Tokens are held as collateral for the above actions. This is done by incrementing the userBalanceMap[msg.sender].lockedinuse storage for the msg.sender whilst performing these actions.

Note, the getWithdrawableBalance function mentioned in ERC20 withdrawals below, enforces the collateral or token locking mechanism by deducting lockedinuse balance whilst determining the withdrawable balance for a user / msg.sender.

Implications:

  • tokens as held as collateral until the hedge deal is settled.

  • tokens cannot be withdrawn or assigned for any other deal

Settlement Usage

For each party, token balances in userBalanceMap[msg.sender].lockedinuse are used as payoff collateral. Deducting payoff equivalent in underlying assets or paired currency, then crediting to the due party's userBalanceMap[msg.sender].deposited balance.

lockedinuse Restoration

During the settlement process, the settlement function first calculates the payoff required and then debits it from the userBalanceMap[msg.sender].lockedinuse of the losing party and then credits it to the userBalanceMap[msg.sender].deposited balance of winning party in the deal.

⚙️
ERC20 Deposit/Withdraw