Order Validity Checks
Ensures only orders at fair prices are submitted on chain
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 |
---|---|---|
| The user-provided signature is cryptographically valid. | This ensures the user has the necessary ability & permissions to request this operation. |
| A health check of Ethena hedging & pricing internal systems | This is to ensure Ethena can manage the delta of the operation. |
| The user's Ethereum address is whitelisted. | Only KYC/KYB'd users are able to directly mint & redeem USDe with Ethena. |
| 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. |
| 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. |
| 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. |
| The user's signed order | This ensures users and protocol positively affirm the terms of the agreement. |
| 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. |
| That the signed price is within a specific tolerance of another external pricing source, such as Pyth and Redstone. | This operates as one of many sources of redundancy and fail-safes to ensure the system is functioning correctly at all times. |
| The order will not exceed the defined maximum capacity that is available per block for mint and redeem USDe requests. | Contributes to protocol stability. |
| 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. |
Last updated