Track 2 · What you can do3 of 6

Token rules & royalties

Attach a rule to a token and the network enforces it automatically on every transfer, sale, or burn. The rule travels with the token, so it works in any wallet or marketplace.

Most tokens are just balances. XChain lets you bind a small program (a rule) to a token, and the network runs that rule automatically before the token can be sent, traded, or burned. Because the rule is part of the token itself, it holds everywhere the token goes, not just in the app that created it.

Someone tries to send, trade, or burn the token
The token's rule runs first and decides
Allowed: the action settles · Denied: it's rejected, with nothing changed

How it works

You write the rule as a small contract, called a guard, and bind it to your token. From then on, before any transfer, sale, or burn, the network runs your guard. It can approve the action, reject it outright, or attach a condition such as a payment split. Because the guard runs as part of consensus, every validator reaches the same answer, and there is no way to route around it.

Royalties that travel with the token

The most common rule is a royalty. When your token is listed for sale, the guard returns a split of the proceeds (say five percent to the original creator and the rest to the seller), and the network applies it automatically when the sale fills. Unlike off-chain royalty standards that a marketplace can simply ignore, this split is part of the trade itself. (It applies to on-chain token proceeds; native-coin payments are out of scope.)

You set the limits; the network keeps them

A rule can refuse a transfer to the wrong recipient, cap how much it is ever allowed to take, and declare exactly which follow-on actions it may trigger; its reach is bounded and predictable. If a guard denies an action, everything it touched is rolled back cleanly, as though it never ran.

An honest set of limits

Guards are instantaneous: they cannot pause to fetch outside data or make a cross-chain call mid-decision, because the answer has to be the same for every validator at once. A royalty split is decided when an order is created, not renegotiated on each fill. And binding a rule is not a permanent lock. An owner can unbind it after a cooldown, so treat a rule as the issuer's standing policy rather than an unbreakable vow.

What you can build

Enforced creator royalties on art and collectibles, tokens that may only move between approved addresses for compliance, vesting and lockups, or any token whose rules need to hold no matter where it changes hands.

Open the wallet ← All topics