Skip to content

Testing status

Automated application tests

bun test covers:

  • Financial values exposed by the app and API never display below zero.
  • Fixed returns are prorated from 10% simple APY for each supported term.
  • Every term's early-exit penalty decays from 25% to 10%, then zero at maturity.
  • The 10 bp marketplace fee rounds up.
  • O2 U128 reconstruction and deployed PriceUpdated payload decoding.
  • Conservative bid conversion from 18 to six decimals.
  • Missing, stale, future, inverted, and excessive-spread price rejection.
  • Exact testnet/mainnet O2 source IDs and separation from Vault assets.
  • Equal testnet FUEL/stFUEL pricing with distinct quote-bound asset IDs and mainnet stFUEL rejection.
  • Ten-block finality range, three-attempt transient failure handling, and freshness-bounded cached fallback.

Sway tests

Using forc 0.68.1:

  • Vault: four tests for supported terms, penalty boundaries, rounded penalties, and Fuel SDK-compatible oracle signatures.
  • BondMarket: one test for the rounded-up 10 bp fee.
  • TestAssets: three tests for faucet quantities, distinct sub-IDs, and the exact 1,000,000 tUSDC reserve amount.

Local-node integration

bun run test:integration uses fuel-core 0.43.1 and the same contract bytecode as testnet. It verifies:

  • One-use tFUEL/tstFUEL faucet allocations.
  • User rejection and owner authorization for tUSDC minting.
  • Deployment with generated storage slots and contract initialization.
  • Exactly 1_000_000_000_000 raw tUSDC deposited into the Vault.
  • One FUEL and one stFUEL position opened with the same simulated O2-derived, non-$1 signed price.
  • Exact persistence of that equal price in both positions' opening_price_e6.
  • position_count and direct get_position reads.
  • Successful early-unbonding claim after advancing node time by 15 days.
  • Successful maturity claim after advancing node time beyond the term.

Live oracle smoke test

bun run test:oracle:live fetches and validates current O2 PriceUpdated events for both Fuel testnet and mainnet. Local Wrangler checks additionally verify the public price response, 15-second Worker cache, equal testnet FUEL/stFUEL rates, distinct signed asset IDs, and mainnet's unsigned read-only profile. It is intentionally separate from bun test because it requires live HyperFuel availability.

Fresh Fuel testnet smoke tests

The deployment in config/deployments.json was tested live for:

  • Thirty consecutive O2 price API reads without an unavailable response.
  • Position 3 opened with 1_000_000_000_000 raw tFUEL and a live O2-derived price_e6 of 787; the contract stored that exact opening price. Transaction: 0xeba08a74a91f170b391447df431dc6788e717c276cd3ca0ec505e2a362aaee9f.
  • Position 4 opened with 1_000_000_000_000 raw tstFUEL at the same O2 FUEL price_e6 of 787, bound to the distinct tstFUEL asset. Transaction: 0x69ed08de4b17c85152fb2ffd654c1c1511e2534a13285aaa0c6245cbb5a9392e.
  • Position 5 opened through the frontend-compatible fresh-quote deposit path with 1_000_000_000 raw tFUEL at price_e6=789. Transaction: 0x4f89754d137457f0c6d30cf3b76be063368ddbb710aa02547ffb979dd42adb43.
  • Test-asset faucet and earlier signed FUEL position openings.
  • Direct position discovery from position_count, the wallet's NFT UTXO, and get_position.
  • List, cancel, relist, and buy on BondMarket.
  • A 1_000_000_000 raw FUEL sale producing a 1_000_000 raw fee and 999_000_000 raw seller proceeds.
  • Position NFT transfer to a retained testnet smoke wallet.
  • A signed stFUEL position opening and early-unbonding start.
  • Correct live rejection of premature calls with NOT_MATURED and STILL_UNBONDING.
  • HyperFuel replay into idle D1 state containing two positions and two historical orders.
  • Exactly 1_000_000_000_000 raw tUSDC still held by the fresh Vault.
  • Browser loading on fuel.place and fuel-vault.pages.dev with the O2 source, FUEL/USDC price, and observation time visible, without console, page, or network errors at desktop and 390 px.

Pending live time-dependent tests

Public testnet time cannot be advanced. Successful live claims therefore remain pending:

  • Position 2 unbonding claim: available September 28, 2026.
  • Position 1 maturity claim: available March 13, 2027.

General transaction controls remain disabled until the required live release gates are accepted. Mainnet remains disabled and audit pending.

Managed custody · Testnet preview · Audit pending