Skip to main content
Prepay lets you deposit SUI and WAL tokens into your managed wallet in advance. When you upload files, extend storage, or perform other on-chain operations, costs are automatically deducted from your balance — no per-request payment prompts.

Tokens

Walrus storage uses two tokens:

SUI

Covers gas fees for every Sui transaction your managed wallet submits.

WAL

Pays Walrus storage nodes for the epochs you purchase. WAL is locked on-chain for the duration of your storage reservation.
With autoConvert: true on your publisher (the default), you only need to hold SUI. The publisher swaps SUI → WAL via on-chain DEX when your WAL balance is insufficient. See Auto-convert SUI → WAL below.
If both SUI and WAL balances are zero, new uploads will fail. Existing stored files remain available until their purchased epochs expire.

How prepay works

1

Find your managed wallet address

Locate your managed wallet address in the dashboard, SDK, or API. This is the Sui address you send tokens to.
2

Deposit SUI and WAL

Transfer tokens from any Sui-compatible wallet (Sui Wallet, Suiet, Ethos, CLI) to your managed wallet address. The balance updates within seconds after on-chain confirmation.
3

Upload and store

Every upload automatically deducts the Walrus storage cost (WAL) and gas fee (SUI) from your prepaid balance. No approval prompts or x402 handshakes required.
4

Monitor and top up

Track your balance via the dashboard, API, or SDK. Tusky sends low-balance notifications so you can top up before running out.
There is no minimum deposit and no maximum. Top up whenever it is convenient — your balance carries forward indefinitely.

Cost breakdown

Every file upload costs:
Total Cost = Walrus Storage Cost (WAL) + Gas Fee (SUI)
ComponentTokenDescription
Walrus storageWALPaid to Walrus storage nodes for the number of epochs you select. Scales linearly with file size and duration.
Gas feeSUISui network transaction fee for publishing the blob on-chain.

Cost estimation

Preview the cost of uploading one or more files before committing. Pass a list of file sizes to get a per-file breakdown and totals:
curl -X POST https://api.tusky.io/v2/uploads/cost \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      { "size": 10485760, "name": "video.mp4" },
      { "size": 2097152, "name": "document.pdf" }
    ],
    "epochs": 5
  }'
Response
{
  "files": [
    { "name": "video.mp4", "size": 10485760, "encodedSize": 52428800, "walCost": "0.045", "gasCost": "0.002" },
    { "name": "document.pdf", "size": 2097152, "encodedSize": 10485760, "walCost": "0.012", "gasCost": "0.002" }
  ],
  "totals": {
    "fileCount": 2,
    "totalSize": 12582912,
    "totalEncodedSize": 62914560,
    "totalWal": "0.057",
    "totalGas": "0.004",
    "totalSui": "0.004"
  },
  "epochs": 5,
  "balance": {
    "walBalance": "120.0",
    "suiBalance": "45.2",
    "sufficient": true,
    "walDeficit": "0",
    "suiDeficit": "0"
  }
}
The response includes your current wallet balance and tells you whether it covers the batch. Use this to build pre-upload validation into your application.

Auto-convert SUI → WAL

If your publisher has autoConvert: true (the default), you don’t need to hold WAL at all. When an upload requires WAL and your balance is insufficient, the publisher automatically swaps SUI → WAL via on-chain DEX at the best available rate. This means you can fund your wallet with SUI only and let the publisher handle WAL acquisition on demand.
ScenarioautoConvert: trueautoConvert: false
WAL balance sufficientUpload proceeds normallyUpload proceeds normally
WAL balance insufficient, SUI availableSUI swapped to WAL, upload proceedsUpload fails with 402
Both balances insufficientUpload fails with 402Upload fails with 402
The swap uses aggregated DEX liquidity (Cetus, DeepBook, and others) for the best available rate. A small amount of additional SUI covers the swap gas. The conversion details are included in the upload receipt.

Checking your balance

Navigate to Settings → Wallet in the Tusky dashboard to see:
  • Current SUI and WAL balances
  • Recent transactions with costs and file references
  • Projected runway based on current usage patterns

Low balance notifications

Tusky monitors your managed wallet and alerts you when balances drop below a configurable threshold:
ChannelDescription
DashboardA banner alert appears at the top of the Tusky dashboard.
EmailA notification is sent to your configured email address.
WebhookConfigure a webhook URL in Settings → Notifications to receive low-balance alerts programmatically.
The default low-balance threshold is 1 SUI. You can adjust it in Settings → Wallet → Notifications.

What happens when balance runs out

ScenarioBehavior
New uploads (WAL low, SUI available, autoConvert on)SUI is swapped to WAL automatically — upload proceeds.
New uploads (both low)Fail with a 402 Payment Required error until you top up.
Existing filesRemain available on Walrus until their purchased storage epochs expire.
Auto-extendPaused — storage will not be renewed if there are insufficient funds.
File downloadsUnaffected — retrieval does not consume SUI or WAL.
Running out of balance never deletes your existing data. Files remain accessible for the full duration of their purchased epochs. Top up at any time to resume uploads and re-enable auto-extend.

What’s next?