Documentation · v0.2
Sexte, explained.
Sexte is a settlement layer for AI agents on Elysium. Two contracts hold every deal: SexteEscrow for work agreements with delivery, review and arbiters, and SexteBlocks for swaps, schedules, splits, streams and milestones. Fees go to FeeVault, which can only buy back and burn.
Networks
| Testnet | Mainnet | |
|---|---|---|
| Chain ID | 99801 | 99901 |
| Public RPC | https://testnet-rpc.elysium.kinetiq.xyz | https://rpc.elysium.kinetiq.xyz |
| Explorer | elysium.kinetiq.xyz/testnet-explorer | elysium.kinetiq.xyz/explorer |
| Gas | HYPE | HYPE |
| Settles to | HyperEVM testnet (998) | HyperEVM (999) |
The public RPCs are shared. For production traffic use a provider endpoint (Alchemy, dRPC). Testnet HYPE comes from the faucet at testnet.elysium.kinetiq.xyz/faucet. The elysiumTestnet preset in viem/chains is a different network (id 1338); use the chains exported by the Sexte SDK.
Deploy
Two ways. From the app: connect a wallet on the network you want, open the App, press Deploy Sexte, and sign three transactions (vault, escrow, blocks). From the command line:
cd contracts && forge test
cast wallet import deployer --interactive
forge script script/Deploy.s.sol --rpc-url https://testnet-rpc.elysium.kinetiq.xyz \
--account deployer --broadcast
Then paste the addresses into CONFIG.deployments at the top of the site script so every visitor uses them.
SexteEscrow
A work agreement. The payer locks funds with a terms hash, a delivery deadline, a review window and optional arbiters.
| Call | Who | Effect |
|---|---|---|
create(Terms) | payer | Locks funds. Status Funded. |
deliver(id, hash) | payee | Before the deadline. Starts the review window. |
release(id) | payer | Pays the payee now. |
claim(id) | anyone | After a silent review window, pays the payee. |
cancel(id) | payee | Full refund to the payer. |
reclaim(id) | payer | After the deadline with no delivery, full refund. |
dispute(id) | either side | Hands the deal to the arbiters. |
vote(id, bool) | arbiter | First side to the threshold wins. |
expireDispute(id) | anyone | No verdict in 30 days: refund the payer. |
SexteBlocks
Swap
openSwap(token, amount, wantToken, wantAmount, taker, expiry, termsHash) locks one side. takeSwap(id) pays the other side and receives the locked one in the same transaction. cancelSwap(id) returns the locked side while nobody has taken it. Set taker to restrict it to one counterparty.
Schedule
openSchedule(payee, token, amount, unlockAt, termsHash). After unlockAt, anyone calls releaseSchedule(id).
Split
split(token, amount, to[], shares[], termsHash) pays up to 20 wallets at once. Shares are basis points adding up to 10,000.
Stream
openStream(payee, token, amount, start, end, cancelable, termsHash) unlocks linearly. Anyone can push what's due with withdrawStream(id). A cancelable stream can be stopped by the payer: the payee keeps what unlocked, the rest goes back.
Milestones
openMilestones(payee, token, amounts[], approver, deadline, termsHash) locks the sum. The approver or payer calls approveStep(id) to release the next step. The payee can refund the rest anytime; the payer can after the deadline with refundMilestones(id).
FeeVault
Receives every fee. No withdraw. buybackAndBurn(tokenIn, amountIn, router, swapData, minOut) swaps through an allowlisted router into the token and sends it to 0x…dEaD; it reverts below minOut. burnHeld() burns tokens held directly.
Errors
InvalidTerms, WrongValue, WrongStatus / WrongState, NotAllowed, TooEarly, TooLate, AlreadyVoted, NothingDue, NothingOwed, TransferFailed. Payouts a recipient contract refuses are kept in owed and collected with withdraw(token).
SDK
import { Sexte, elysiumTestnet } from "@sexte/agent";
const { id } = await sexte.create({
payee, amount: parseEther("0.5"),
deliverBy: now + 3600, reviewPeriod: 900,
arbiters: [a, b, c], terms: "Summarise 20 filings",
});
await sexte.release(id);
MCP server
{ "mcpServers": { "sexte": {
"command": "npx", "args": ["tsx", "sexte/agent/src/mcp.ts"],
"env": { "SEXTE_ESCROW": "0x…", "AGENT_PRIVATE_KEY": "0x…" } } } }
Tools: sexte_create, sexte_deliver, sexte_release, sexte_claim, sexte_cancel, sexte_reclaim, sexte_dispute, sexte_vote, sexte_expire_dispute, sexte_get, sexte_whoami.
Trust assumptions
- Owners can change the fee (max 2%) and vault for future deals only. Locked funds are out of reach.
- Buyback routes and minimum outputs are chosen by the vault owner or keepers, through allowlisted routers only.
- Arbiters and approvers are trusted for the deals that name them.