Xeon Protocol Docs
  • Quick Links
  • Welcome to Xeon Protocol
    • Introduction
    • Proposition
    • TAM
    • Mission
  • Ecosystem
    • Overview
    • Products
    • Mindmap
    • Core Engineering
  • OTC Tools
    • Lending
    • Call Options
    • Put Options
    • Equity Swaps
    • USPs
  • How It Works
    • Use Cases
    • Scenarios
    • Quick Guide
    • DynamicPacts
    • P/L Calculations
  • Staking XEON
    • How to Stake
    • Assignments
    • Rewards
  • 🌾Real Yield
    • Protocol Income
    • Farming Pools
    • Native Hedge Liquidity
    • Native Loan Collateral
    • Yield Farming
  • 👨‍🌾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
    • Neon Hedging Model
    • Traditional Costing Models
      • Binomial VS Monte Carlo
      • Binomial Model
      • Costing Example
      • Conclusion
    • Neon Costing Model
    • Writing Approach
    • Deleting a Hedge
    • 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
      • Dev Format
      • GitHub
      • Deployments
      • Testnet
      • Security Audits
  • Brand Policy
Powered by GitBook
LogoLogo

Xeon Protocol © 2024

On this page
  • Implications:
  • Settlement Usage
  • lockedinuse Restoration

Was this helpful?

Export as PDF
  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/WithdrawNeon Protocol's Vault smart contract can transfer any ERC20 token in and out.