CoreWriter
How an EVM contract trades and moves funds on VordCore — transfers, USDC between the EVM and the core, orders and vault actions — on the testnet.
CoreWriter lets a contract on the EVM lane work with VordCore: move VORD and USDC between the EVM and the core, place and cancel orders, deposit into vaults. It runs on the testnet; on the main network the EVM lane does not run contracts yet.
The contract
CoreWriter sits at 0x7777777777777777777777777777777777777777. It has one function:
interface ICoreWriter {
function sendRawAction(bytes calldata data) external;
}data is one action: the byte 0x02, then the action id as three bytes (big-endian), then the action's parameters
ABI-encoded. The action is taken for the caller — for a contract, the contract's own account on the core. Only a
direct call works (a delegate call or a static call reverts), and a contract can make up to 64 accepted calls per batch.
Every accepted call emits RawAction(address indexed contract, bytes payload).
Actions
| Id | Action | Parameters | When it applies |
|---|---|---|---|
| 1 | VORD transfer | address to, uint256 amount | in the same block |
| 2 | VORD from the EVM to the core | uint256 amount (send it as the call's value) | in the same block |
| 3 | VORD from the core to the EVM | uint256 amount | in the same block |
| 4 | USDC from the EVM to the core | uint64 usdc6 | in the same block |
| 5 | USDC from the core to the EVM | uint64 usdc6 | in the same block |
| 10 | Limit order | uint32 pair, bool isBuy, uint64 limitPx, uint64 size, bool reduceOnly, uint8 tif, uint128 cloid | at least 3 seconds later |
| 11 | Cancel by order id | uint32 pair, uint64 orderId | at least 3 seconds later |
| 12 | Cancel by client id | uint32 pair, uint128 cloid | at least 3 seconds later |
| 13 | Vault deposit | uint64 vault, uint64 usdc6 | at least 3 seconds later |
| 14 | Vault withdraw | uint64 vault, uint128 shares | at least 3 seconds later |
For a limit order, the price and size carry 8 decimals, tif is 1 for post only, 2 for good till cancelled and 3 for
immediate or cancel, and cloid is your own id (1 or more). An unknown id reverts. An action that fails when the core
applies it is dropped; the EVM transaction itself still succeeded, so read the result back from the core.
USDC on the EVM lane is a standard ERC-20 at 0x2000000000000000000000000000000000000000 with 6 decimals; it is
created only by action 5 and destroyed only by action 4, so it always matches the USDC that left the core. Wrapped VORD
is at 0x2000000000000000000000000000000000000001.
A contract that places orders
Your first contract builds one step by step: a Solidity contract that funds its core account and places and cancels limit orders, checked against the testnet before it is deployed.
Try an action without sending anything
You can see exactly what an action costs and whether CoreWriter accepts it with eth_call and eth_estimateGas;
neither sends a transaction or needs a funded key:
# pip install vordium==1.4.6 requests
import requests
from eth_abi import encode
from eth_utils import keccak
EVM = "https://rpc-testnet.vordium.com/evmrpc" # the testnet's EVM lane
CORE_WRITER = "0x7777777777777777777777777777777777777777"
def rpc(method, params):
return requests.post(EVM, json={"jsonrpc": "2.0", "id": 1, "method": method, "params": params}, timeout=15).json()
# action 10: a post-only limit buy of 0.01 ETH (pair 1) at 2,000 USDC — price and size with 8 decimals
action = b"\x02" + (10).to_bytes(3, "big") + encode(
["uint32", "bool", "uint64", "uint64", "bool", "uint8", "uint128"], [1, True, 2_000 * 10**8, 10**6, False, 1, 42])
data = "0x" + keccak(b"sendRawAction(bytes)")[:4].hex() + encode(["bytes"], [action]).hex()
call = {"from": "0x000000000000000000000000000000000000dEaD", "to": CORE_WRITER, "data": data}
print("chain id:", int(rpc("eth_chainId", [])["result"], 16))
result = rpc("eth_call", [call, "latest"])
print("accepted:", "result" in result)
print("gas:", int(rpc("eth_estimateGas", [call])["result"], 16))To send it for real you need test VORD for gas on the EVM lane.
Network facts last checked against the network 2026-10-22 13:00:37 UTC · mainnet spec v28 · testnet spec v8