DIM · Dagon Inference Marketplace

Payouts

When the settler redeems a voucher, the im-channels program transfers settled_total − redeemed from the buyer's vault token account to the channel's seller_payout_token in the same transaction. That is the whole payout path. Nothing is pooled, nothing waits for a payout cycle, and the protocol takes no fee.

Where the money lands

  • One account per gateway. payoutToken in gateway.json is published as every route's payout_token. Buyers' channels name it, and the program pays only that account.
  • The right mint. It must be a classic SPL token account for the mint compiled into the program you settle on. The current devnet deployment, 2grG8aUKE1HRjE8FqG4h5C2tmfAUG7PLsS8yL4nKrjdW, uses the project's 6-decimal test mint 2LYaM1PTo4WwkoUx87E4pV39vWPDsohWVLyjUyA4MLUu. A mainnet build pinned to USDC compiles but is not deployed or audited.
  • Any owner. The token account can belong to any wallet you control; it does not need to be one of the gateway's keys, and the gateway never needs its owner's secret key.

Check what has arrived:

spl-token balance --address PAYOUT_TOKEN_ACCOUNT --url devnet

To move funds on, use your wallet as usual, for example spl-token transfer. There is no DIM withdrawal step.

Keep the settler funded

The settler key signs and pays for every redemption transaction. On a local validator each redemption cost 10,000 lamports. Watch its balance and top it up before it runs dry; an unfunded settler defers settlement until the close deadline makes vouchers unpayable.

solana balance "$(solana-keygen pubkey gateway/keys/settler.json)" --url devnet

The channel lifecycle, from your side

Phase What you can do What you must do
Open, before service_end (T) Admit Holds, sign receipts, accept vouchers. Keep the gateway and settler running.
After T, or once closing has begun Nothing new: Holds get 402 channel_closed. Keep accepting vouchers and redeeming until the close deadline.
Closing, before the close deadline D Accept and redeem vouchers. Redeem every acknowledged voucher before D.
After D Vouchers are expired and cannot be paid. Nothing; anyone may call finalize, which returns budget − redeemed to the buyer's vault and closes the channel.

begin_close sets D = min(T, now) + G, where G (1 second to 30 days) is the grace the buyer chose when opening. The vault owner, the Mandate's agent or the channel's seller_settler may call it; anyone may call close_on_revoked once the channel's Mandate is revoked or expired. A buyer's top-up only adds budget to an open channel.

The reference gateway does not expose a command to begin closing a channel with its settler key. To force a close you would sign begin_close with the settler key through your own Solana tooling against the tracked IDL (programs/idl/im_channels.json).

What you can never lose to the buyer

  • Redeemed funds are yours: the program never moves money out of your token account.
  • An acknowledged voucher is a signed claim on the channel up to its budget. The program enforces settled_total ≤ budget, and the budget cannot be withdrawn by the buyer while the channel is open; finalize returns only budget − redeemed, and only after D.
  • What you can lose is unvouchered work (bounded by the channel's remaining budget, see admission) and acknowledged vouchers you fail to redeem before D.

Program versions

Per decision 0004, a new settlement program is installed at a new address; existing channels are never migrated and keep settling on the program that opened them. A gateway process settles against one programId, and its signing domain is fixed at startup from the RPC's genesis hash and that program. Keep the gateway for an older program running until every channel on it is finalized, and keep its genesis hash, program ID, mint and IDL available independently of discovery. A release recommendation (decision 0005) never moves existing funds.