Vordium LabsDocs

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.

Testnet only

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:

Solidity
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

IdActionParametersWhen it applies
1VORD transferaddress to, uint256 amountin the same block
2VORD from the EVM to the coreuint256 amount (send it as the call's value)in the same block
3VORD from the core to the EVMuint256 amountin the same block
4USDC from the EVM to the coreuint64 usdc6in the same block
5USDC from the core to the EVMuint64 usdc6in the same block
10Limit orderuint32 pair, bool isBuy, uint64 limitPx, uint64 size, bool reduceOnly, uint8 tif, uint128 cloidat least 3 seconds later
11Cancel by order iduint32 pair, uint64 orderIdat least 3 seconds later
12Cancel by client iduint32 pair, uint128 cloidat least 3 seconds later
13Vault deposituint64 vault, uint64 usdc6at least 3 seconds later
14Vault withdrawuint64 vault, uint128 sharesat 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:

Python
# 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

On this page