Protocols / Derivatives
Derive
Options (and perps and spot) on Derive v3, formerly Lyra. An agent deposits collateral from Ethereum, then trades options through the signed JSON-RPC API, using a session key. Matching happens off-chain and settles through Derive's zk-vApp on Ethereum.
On-chain + APIEVM5 contractsWebsite · Docs
get_protocol({ "protocol": "derive-v3-options" })Risks an agent should know
- Options are cash-settled and expire at 08:00 UTC on the expiry date. Positions can be liquidated if margin falls below maintenance. Liquidations run as auctions.
- Trading and matching are off-chain. Deposits and withdrawals depend on the operator and on the zk-vApp settlement. If the operator goes offline, the escape hatch on the withdrawal outbox is the fallback exit.
- Session keys have an expiry, an IP allowlist option and scopes. A leaked session key can trade within its scopes until it expires or is revoked.
- Margin type differs by market (SM or PM2). Check private/get_margin before opening large option positions.
- Rate limits apply per wallet and per instrument (see the rate limits docs). Plan batch sizes and retries around them.
What an agent can do
| deposit | Deposit USDC or another supported collateral from Ethereum approve ACTION_MANAGER for the ERC20, then call deposit(asset, amount, subaccountId, fallbackRecipient) or depositToNewSubaccount(asset, amount, managerId, owner). Use the protocol asset address from get_all_currencies. Credit shows up after 1 to 2 minutes. Alternative: public/register_deposit_address for a deposit address with no signature. |
| trade-option | Buy or sell an option (or perp or spot) on the orderbook list instruments with public/get_all_instruments (option names look like ETH-20240914-2400-C), sign the order Action with a registered session key (EIP-712, see action signing docs), then call private/order with instrument_name, direction, amount, limit_price, max_fee and subaccount_id. Cancel with private/cancel or private/cancel_all. |
| quote-and-price | Price an order before sending it public/order_quote or private/order_quote returns projected fill price, fees and margin impact without placing the order. Read ticker data with public/get_ticker or public/get_tickers. |
| check-positions | Read subaccount positions, collateral and margin private/get_positions, private/get_collaterals, private/get_subaccount and private/get_margin for a subaccount ID. Options also show Greeks in get_positions. |
| withdraw | Withdraw collateral to an Ethereum address private/withdraw with a signed action (withdraw scope) and recipient set to the L1 address. For other chains use a registered withdraw address from private/register_withdraw_address. If the operator is offline, the escape hatch is a claim on WITHDRAWAL_OUTBOX (see docs; function not confirmed here). |
| session-key | Create a session key that signs trades for a wallet private/set_session_key (signed by the wallet, or submitted through ACTION_MANAGER.submit for contract or multisig owners) with scopes and an expiry. Then log in with session login. Use private/session_keys to list keys. |
Contracts
ethereum · chain id 1
| Contract | Address | Key functions | Try |
|---|---|---|---|
| ACTION_MANAGER (OnchainActionManager) other | 0xE366CcA474968e33b777E13905829A3b800CFAD3 source | writedeposit(address,uint256,uint64,address) writedepositToNewSubaccount(address,uint256,uint32,address) writesubmit(uint256,bytes) | Full ABI |
| VAPP (zk-vApp settlement) other | 0xd330145C17fB6EF2a21ACf1275Ce683A305F58BB source | Full ABI | |
| WITHDRAWAL_OUTBOX bridge | 0x7c743D79C9C595cE332314503d84cBBb4E85FA63 source | Full ABI | |
| SPOT_VAULT vault | 0x2e7dF4fAf35a1599979C7E764444e112d936ec42 source | Full ABI | |
| WITHDRAW_FACTORY factory | 0xFec48bBC648bd2284520d862Ec67fc68F709915e source | readgetWithdrawAddress(bytes32,uint256) | Full ABI |
APIs
| Derive v3 API (JSON-RPC) auth: signature | https://api.derive.xyz/v3 Everything off-chain: read tickers, instruments, positions and margin (public and private/get_* methods); place, replace and cancel orders (private/order, private/replace, private/cancel); RFQ and block trades; withdraw (private/withdraw). Private calls need a session key signature. Served over HTTP POST and WebSocket. Testnet base is https://testnet.api.derive.xyz/v3. |
Notes
Mainnet contract addresses come from the Derive v3 Contracts page (docs.derive.xyz/getting-started/contracts.md). All five addresses return bytecode on Ethereum (eth_getCode via publicnode). ACTION_MANAGER is not verified on Sourcify, so its keyFunctions are copied from Derive's own docs (deposit and depositToNewSubaccount signatures match the docs' Solidity interface), not from a verified ABI. The v2 Matching contract 0xeB8d770ec18DB98Db922E9D83260A585b9F0DeAD appears only as the EIP-712 verifying contract in signatures; it is not a v3 contract and is not listed. Testnet (Sepolia) addresses are not listed. Derive's token addresses are not in the docs page: read them from public/get_all_currencies.
Sources
- https://docs.derive.xyz/getting-started/contracts.md
- https://docs.derive.xyz/getting-started/depositing.md
- https://docs.derive.xyz/trading/transfers-withdrawals.md
- https://docs.derive.xyz/trading/instrument-names.md
- https://docs.derive.xyz/authentication/contract-owned-accounts.md
- https://docs.derive.xyz/api-reference/orderbook/privateorder.md
- https://docs.derive.xyz/llms.txt
- https://app.derive.xyz
- https://api.llama.fi/protocol/derive-v3-options
Researched 2026-11-28. Addresses are copied from the official sources above; check them before moving large amounts.