One Move package covers the Sui side. A single shared Escrow object, created when the package is published, holds the deposit float, the referral voucher float, the settlement marker table, and the redeemed voucher table. Deposits pay into the escrow and refunds pay out of it; fulfillments are paid by the treasury address from its own balance, with the package enforcing exactly-once settlement and emitting the events the indexer reads. Prefer the router_address (package id) returned on the quote and the escrow and treasury returned by GetChains over these constants. All functions live in module hular and take the coin type as a type argument; the only configured token is native USDC.

Deposit

Joins the coin into the escrow’s balance for T and emits Deposit with the amount and sender. The quote hash must be exactly 32 bytes. There is no swap-first variant and no native SUI variant on Sui.

Operator functions

Restricted to the treasury address, listed for completeness.
fulfill transfers the payout coin and, when nonzero, the SUI gas drop coin to the recipient. refund pays the recipient out of the escrow’s deposit balance. Both insert a settlement marker keyed by the quote hash and abort if one already exists: a quote hash settles exactly once per chain, whichever of fulfill or refund lands first. release moves settled deposit float from the escrow to the treasury.

Settlement markers and pruning

Each marker stores the epoch it was settled in. Markers are the on-chain replay guard, and because every operator transaction also carries an expiration epoch, a marker older than the retention window can be safely removed to reclaim its storage rebate:
prune is permissionless and aborts with ERetentionNotElapsed until 180 epochs (about six months) have passed since settlement. The storage rebate is credited to the pruning transaction.

Voucher redemption

Referral fees accrue off-chain and are paid on Sui through signed vouchers, redeemed by the referrer’s own wallet against a treasury-funded float held inside the escrow:
The signature is ed25519 over the following bytes, verified against any registered voucher signer key: Voucher ids are marked in a permanent table, so each voucher redeems exactly once. Vouchers never expire, and the redeemed-id table is never pruned. fund_vouchers is permissionless; defund_vouchers returns float to the treasury.

Admin

The AdminCap is transferred to the treasury at deploy time. Voucher signers are append-only: rotating the key adds the new one, and vouchers signed by earlier keys stay redeemable.

Events

coin_type is the full coin type string of the type argument, without a 0x prefix.

Abort codes