Smart Contract Trading
The Delegate Signer feature is currently only available on EVM chains. Solana programs have a different architecture and do not require this pattern.
delegateSigner prior to interacting with Orderly.
Limitations
Implementation
Create delegate signer link
Your Smart Contract needs to call the An example Smart Contract is deployed on Arbitrum Sepolia, however it implements an insecure After calling the function on your Smart Contract for the linking, you need to remember this transaction hash.
delegateSigner function on the Orderly Vault contract.
The interface is described below:EVM contract ABI files can be found on our GitHub. All contracts are verified, so you can also see the ABI on their respective explorers.
execAction function, which allows arbitrary code execution.A minimal implementation of a Smart Contract will look like this:Accept the link from the Delegate Signer EOA
Confirm the link by signing the EIP-712 with your Delegate Signer’s wallet and send the information via
delegate_signer API. You will also need to send the transaction hash from previous step.This step will optionally create the account for the Smart Contract, if it does not yet exist. If it already exists it will just update the linked EOA account.Add Orderly Key
Add Delegate Orderly Key via REST API.
Deploy funds
You can either implement a function in your Smart Contract to call the
deposit function of the Vault contract or you can call the depositTo function from any address and deposit into your Smart Contract’s account wallet.
For the latter you will also require the account_id from the registration step.Settle PnL/Withdraw
Settle PnL and withdraw via special Delegate Signer endpoints. Sign EIP-712 domains with Delegate Signer wallet.