Purpose
Attestations have 30 second expirations on Ethereum mainnet and 15 seconds on Binance Smart chain. Using wallets from custody providers may make ensuring transaction submission difficult depending on how fast custody providers process transactions. The limit order contracts allow users to avoid the challenging time limit by submitting orders on-chain with a limit price, and Ondo will fulfill the order on behalf of the user through the normal attestation process. The contract enforces that an order will always be fulfilled at or better than the user’s set limit price.Creating Limit Orders
Use the GMLimitOrder contract. The functions for creating orders are:
ExactIn functions specify the amount of input tokens to spend, ExactOut functions specify the amount of output tokens to receive.
Canceling Orders
Order Status
Events
Newly created orders:event OrderCancelled(uint256 indexed orderId, address indexed cancelledBy);
Contract Addresses
GMLimitOrder Ethereum:0xf0Bc39Fc911F6437C84d16188dD8294F7110f451
GMLimitOrder BNB: 0xA2aA93cbB069B4BF246258E4D9cD093B914DcDFE
FAQ
Q: Are my account rate limits affected by submitting limit orders?A: No. Because the attestation API is not required in this flow, your account rate limits are not affected. Q: Can I submit limit orders on Solana?
A: Currently, the limit order contracts are deployed on Ethereum and BNB only. Q: What addresses can submit limit orders?
A: Onboarded, AllowListed wallets only can submit limit orders. Q: Does submitting limit orders affect my session limits?
A: Limit orders do not require an attestation at the time of submission, so submitting orders does not affect your session limits. Q: What is the maximum duration I can set an order to have?
A: Query the
GMLimitOrder function maxOrderDuration to see the current maximum order duration.
