/Developers. · 05.

Multi-token outputs: one order, three assets

Give SHIB, receive WBTC, WETH and DAI in the proportions you choose. How weighted outputs are encoded, validated and filled.

iLayer.io~4 min3 chapters
weightsoutputs[]numeraire
/Multi-token./Weights = 100.SHIB in1 signaturesource chain/order.outputsweightsWBTC · 20WETH · 30DAI · 50sum ≠ 100 → rejectedswapped from numeraire
/Multi-token.SHIB in1 signaturesource chain/order.outputsweightsWBTC · 20WETH · 30DAI · 50sum ≠ 100 → rejectedswapped from numeraire

An Order’s outputs is an array, not a single token. That lets a user express a portfolio in one intent: “turn this into 20% BTC, 30% ETH, 50% DAI.” In the RFQ the amounts become relative weights; the solver network turns them into exact quotes.

/01 · Chapter.

Encoding weights

"outputs": [
  { "tokenAddress": "WBTC address", "amount": 20, "type": "FUNGIBLE_TOKEN", "tokenId": 0 },
  { "tokenAddress": "WETH address", "amount": 30, "type": "FUNGIBLE_TOKEN", "tokenId": 0 },
  { "tokenAddress": "DAI address",  "amount": 50, "type": "FUNGIBLE_TOKEN", "tokenId": 0 }
]

When more than one output is present, amount is a weight. The weights must sum to 100 or the request is rejected. The solvers reply with the concrete amounts of each token their quote delivers, and those amounts are what ends up in the signed Order.

/02 · Chapter.

How a solver fills it

Solvers keep a single numeraire balance, usually USDC or USDT. For an order that gives SHIB and wants WETH and WBTC, the solver runs one multicall transaction on the destination chain: swap numeraire into WETH and WBTC in the required amounts, then fillOrder(). On the source chain the incoming SHIB is swapped back into the numeraire. The user gets three tokens; the solver’s books stay in one.

/03 · Chapter.

Where it shows up

  • Wallets consolidating a portfolio into a target allocation on a new chain.
  • DeFi frontends offering a “basket” product in one click.
  • Rebalancers that would otherwise multi-bridge, creating several orders instead.

The Spoke checks that every output balance matches the Order before releasing anything. Excess or positive slippage stays in the Spoke.

/Read next.

How solvers fill orders and make money.

The ecosystem track opens on the other side of the order book.

All posts