LogoLogo
  • Ethena Overview
  • How USDe Works
  • Genesis Story
  • Alternatives: Existing Stablecoins
  • Size of the Opportunity
  • USDtb
  • Ethena Network
  • ENA
    • Tokenomics
  • Video Guides
    • How to Buy USDe
    • How to Stake USDe
    • How to Stake ENA
    • How to [Un]lock positions
  • Solution Overview
    • USDe Overview
      • Delta-Neutral Stability
      • Delta-Neutral Examples
      • Scalability
      • Censorship Resistance
      • Regulatory Compliance
    • Protocol Revenue Explanation
      • Historical Examples
      • Rewards Mechanism Explanation
      • sUSDe Rewards Mechanism
    • Underlying Derivatives
      • Futures vs Perpetuals
      • Inverse vs Linear Contracts
      • Basis Spread
    • Peg Arbitrage Mechanism
    • Liquid Stables: Dynamic Allocation
      • Current Allocation Approach
    • Scenario Analysis
    • Risks
      • Funding Risk
      • Liquidation Risk
      • Custodial Risk
      • Exchange Failure Risk
      • Backing Assets Risk
      • Stablecoin-Related Risks
      • Margin Collateral Risks
    • Governance
      • Risk Committee
  • Backing Custody & Security
    • Overview
      • Off-Exchange Settlement in detail
      • Copper Clearloop Case Study
    • Real-Time Dashboards
  • Solution Design
    • Overview
      • Github Overview
    • Key Trust Assumptions
      • Matrix of Multisig and Timelocks
    • Minting USDe
      • Order Validity Checks
      • User Security Measures
      • Mint & Redeem Key Functions
      • Mint and Redeem Contract V2
    • Staking USDe
      • Staking Key Functions
      • User Security Measures
    • Use of Oracles
    • Hedging System
      • Internal Services
      • Managing Risk from dependencies
    • Reserve Fund
    • Key Addresses
    • Backing Asset Custody
  • API Documentation
    • Overview
  • Resources
    • Custodian Attestations
    • FAQ
    • Data Repository
    • USDe + sUSDe Custodian Availability
    • Audits
    • Media Assets
    • General Risk Disclosures
    • Privacy Policy
    • Terms of Service
    • USDe Terms and Conditions - EEA
    • USDe Terms and Conditions - Non EEA
    • USDe Mint User Agreement - Non EEA
    • Testnet
Powered by GitBook
On this page
  • Context
  • Validations

Was this helpful?

Export as PDF
  1. Solution Design
  2. Minting USDe

Order Validity Checks

Ensures only orders at fair prices are submitted on chain

Last updated 1 year ago

Was this helpful?

Context

Ethena conducts several validations to ensure both the user and the protocol can honour the signed order before it is submitted to the blockchain.

When users mint or redeem USDe, after the user has signed the order with their wallet, Ethena retains "last-look" ability. This enables Ethena to be sure the price agreed between Ethena & the user wouldn't impose a loss on the protocol. This is principally motivated to ensure neither Ethena nor the user is adversely affected in highly volatile markets.

Ethena cannot change the user-signed EIP712 order as a result of the blockchain.

Validations

Validation
Description
Purpose
  1. Cryptographically Valid Signature

The user-provided signature is cryptographically valid.

This ensures the user has the necessary ability & permissions to request this operation.

  1. System health check

A health check of Ethena hedging & pricing internal systems

This is to ensure Ethena can manage the delta of the operation.

  1. Whitelisted trader

The user's Ethereum address is whitelisted.

Only KYC/KYB'd users are able to directly mint & redeem USDe with Ethena.

  1. Sufficient balances and approvals

The user has provided sufficient approvals and has sufficient funds to honour the request.

Prevents time and gas wastage and ensures transaction success at the smart contract.

  1. Timeliness of order return

The user has returned a signed order within an acceptable time period of Ethena sending a response to their initial RFQ request.

Keeps prices relevant by ensuring prompt order response.

  1. Order expiration check

The user's signed order expiry attribute is at least 30 seconds in the future

The user's signed order expiry attribute is at least 30 seconds in the future to ensure the transaction is able to reach finality in almost all gas environments.

  1. RFQ and order match

The user's signed order collateral_amount and usde_amount attributes are an exact match to the RFQ payload Ethena returned to them.

This ensures users and protocol positively affirm the terms of the agreement.

  1. Last look

The present system price compared to the signed order's price is within the acceptable tolerance the user and Ethena have agreed to.

This ensures that the price hasn't moved outside of tolerance bands adversely against the protocol.

  1. External price check

That the signed price is within a specific tolerance of another external pricing source, such as and Redstone.

This operates as one of many sources of redundancy and fail-safes to ensure the system is functioning correctly at all times.

  1. $N per block limit check

The order will not exceed the defined maximum capacity that is available per block for mint and redeem USDe requests.

Contributes to protocol stability.

  1. Multiple orders check

The user does not have another order to be processed in this block.

Users are only allowed to successfully submit one mint / redeem USDe request per block.

Pyth