Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🪙Use the Priority-Fee Vault as a $US Buyer

Audience: $US buyers, Leaders, priority-fee providers, and integrators.

Goal: Inspect the priority-fee vault, document the quote gap, and prove a wallet-authorized $US-for-SUI swap and its liquidity state.

The priority-fee vault exchanges $US for SUI and records the liquidity and share state that supports eligible priority-fee work. This guide describes the evidence to collect; use the public CLI or SDK readback surface where it exists and record a gap where it does not. Vault mutations must be authorized by the user’s wallet through the public CLI or SDK; a provider-issued Nexus API key can authenticate hosted reads but cannot sign or submit these Sui transactions.

Priority-fee vault quote, swap, and provider shares

1. Inspect the vault

Read and record the vault’s SUI balance, $US balance, exchange rate, available liquidity, and any relevant share or provider state. Capture the vault object ID and the exact source revision used for the read.

If the CLI or SDK does not expose one of these fields, state the inspection gap and use the generated priority-fee vault reference or a supported raw object read. Do not invent a command or infer liquidity from a UI label alone.

2. Record the quote gap

The public CLI and high-level SDK do not expose an ordinary quote command. Do not invent one or call a hosted Nexus API write. Use the supported wallet-authorized nexus network swap-us-for-sui transaction with an owned Coin<US> supplied through --us-coin <OBJECT_ID> and a caller-computed expectation from the observed vault state, or use an equivalent SDK PTB when the selected build exposes it. $US held only in an address balance is not the owned coin-object input for this transaction. The supported $US supply path is the Coin<US> input accepted by swap_us_for_sui; the vault joins the accepted amount to its $US balance and returns any excess. There is no separate public $US liquidity-provider deposit command or surface in the selected contract, so record that gap instead of inventing one. Record that the ordinary quote surface is unavailable, the vault SUI/$US/rate/liquidity values used for the estimate, and any provider or raw-object readback that the selected build supports.

Before constructing or signing the buyer transaction, require the readback to show a nonzero configured exchange rate and sufficient SUI liquidity for the caller's expected output under the selected build's published accounting. If the rate is zero/unconfigured, liquidity is unavailable or insufficient, or the readback cannot establish those preconditions, stop without signing, record the blocked precondition, and wait for provider configuration or a supported read surface.

3. Apply min_sui_out

Compute and set a nonzero min_sui_out to the least SUI output you accept for the transaction; the CLI default of zero is not a safe slippage policy. Keep the value in the signed transaction arguments and preserve it in your evidence. If the swap cannot meet that minimum, the transaction aborts atomically and the vault is not mutated. Re-read the effects and vault state before retrying, then recompute the expectation and minimum rather than resubmitting the stale transaction.

4. Submit and inspect

Submit the swap with the user’s wallet-authorized CLI or SDK transaction. A provider-issued Nexus API key is not a signing authority and cannot submit this mutation. After confirmation, read transaction effects and emitted events. Record the $US spent, SUI received, vault balances, rate/liquidity changes, and any share or fee state.

Compare before and after state. The resulting evidence should reconcile the caller-computed expectation, nonzero min_sui_out, coin effects, vault state, and event fields. If a provider or client hides a field, record the missing evidence rather than claiming the swap was fully verified. For an atomic below-minimum abort, verify the vault and coin state are unchanged before retrying.

5. Deposit priority fees and collect shares

A Leader or priority-fee provider follows a separate SUI-only share path from the buyer swap: the Move entry points create_deposit and collect_deposits create/account PriorityFeeDeposit children and Leader shares. The public network CLI reference exposes collection of existing deposits, and the SDK transaction reference exposes collection, but neither public surface exposes a general deposit-creation command. Treat creation as provider-runtime/operator conditional and non-runnable from this guide unless the provider supplies a reviewed PTB/SDK creation boundary plus exact transaction-effects proof; do not turn the Move entry name into an invented nexus network command. The shares determine the proportional US entitlement, but withdrawal also requires a matching registered Leader capability and zero SUI liquidity in the vault. This provider path is not a separate $US liquidity-provider deposit. Record the SUI deposit, Leader tag, collection event/share delta, matching Leader-capability evidence, later withdrawal, and before/after balances. Provider state is distinct from a buyer’s $US input to swap_us_for_sui and from the Task/Execution payment budget that later accounts for priority charges.

Outcome

You have a reproducible before/after vault record, a documented ordinary-quote gap, an owned $US coin input, a caller-computed expectation and nonzero min_sui_out, and transaction effects/events that prove what the wallet-authorized swap or liquidity supply changed. Any below-minimum abort is shown atomically with no vault mutation before a retry.

Next

Return to Priority-Fee Tokenomics for the protocol model or Fund Agent- and User-Paid Executions for execution funding.

Last updated