Skip to content

Test assets ​

Fuel Credit uses permissionlessly mintable native test assets for local development and Fuel testnet. They have no monetary value and are deliberately named tFUEL and tUSDC to avoid confusion with real assets.

Testnet contracts ​

AssetDecimalsAsset IDMint contract
tFUEL90x76e89d72f28e965cf5460dd22dabe1e4bcf5a4892f30e6143b54139ee93f8dd10x3de8daf38a73a91e467c3a6251cbc3b38843d26e3d0df94e9c3467986d4ad862
tUSDC60x5cb49ab4a92a8ab30d372309cf1cde9dff85d7f7e61084d925bfc0481fbc43ec0x6fb2f8dbd964ce51d9d1cccdbe0ae1b5b35dfb59da9b4694cea0b5c98c0a5e53

The active testnet FuelCredit contract is configured exclusively for these two asset IDs.

Minting ​

Each contract exposes SRC-20-compatible metadata/supply reads and SRC-3-compatible mint/burn calls. The interfaces were validated against the pinned Sway toolchain; the current released standards package itself does not compile with that older toolchain. Any wallet can call:

text
mint(recipient, Some(DEFAULT_SUB_ID), amount)

A mint must be positive and no larger than 1,000,000,000,000,000 base units per call. The cap limits accidental oversized calls; callers may mint repeatedly because these tokens are test-only.

The caller needs Fuel testnet base asset to pay transaction gas. If the connected account has insufficient gas, the app redirects to the official Fuel faucet with its bech32 address prefilled and a callback to the same app route explicitly marked network=testnet. The app stores a short-lived, one-time intent in session storage, validates the returning account and nonce, removes the callback parameters, waits for the gas balance, and then requests the tFUEL mint. Fuel Wallet and Fuelet still require transaction confirmation; a returning Burner account resumes automatically. Reloading or replaying a consumed callback cannot mint again. The Testnet/Mainnet application toggle beside the theme control changes the displayed environment; selecting Mainnet disables faucet and transaction actions because mainnet is not released.

The recipient may be any Fuel identity. The app's faucet contract 0x64ff6e04e0b27c4f164e24724bec268fdfa2262a4875447885ae3d2af54e05af mints only 10,000 tFUEL per request. It does not give borrowers tUSDC.

The active Fuel Credit pool was funded with 500,000 tUSDC. Borrowers receive tUSDC when a loan opens and return that tUSDC through partial or full repayment.

The guarded lifecycle check uses a persistent, gitignored .secrets/fuel-credit/testnet/test-borrower.json wallet so interrupted runs remain recoverable:

bash
FUEL_CREDIT_TESTNET_LIFECYCLE_CONFIRM=run-testnet-lifecycle \
  bun run scripts/testnet-lifecycle.ts

Deployment flow ​

Local and testnet deployment builds and deploys two test-asset contracts first, derives each default-sub-ID asset ID, then deploys FuelCredit with those IDs. Contract IDs, asset IDs, transactions, and metadata are saved in the environment deployment record.

The previous testnet FuelCredit deployment configured for verified assets is retained in deployment history and marked superseded; it must not be funded or used.

The canonical deployment record is protected from overwrite. Other operators can select their own record while deploying the same stack:

bash
FUEL_CREDIT_TESTNET_DEPLOYMENT_PATH=deployments/my-testnet.json \
FUEL_CREDIT_TESTNET_DEPLOY_CONFIRM=redeploy-testnet-with-test-assets \
  bun run testnet

Mainnet boundary ​

Fuel Credit tooling has no mainnet deployment path for the test-asset contract. Mainnet FuelCredit remains configured for Fuel Labs' verified FUEL and USDC asset IDs. Never treat tFUEL or tUSDC as real, bridged, redeemable, or valuable assets.

Versioned testnet API ​

All public protocol API routes are versioned. Version v1 is the current stable interface:

RoutePurpose
GET https://testnet.api.fuel.credit/v1/healthTestnet service and configured contract status
GET https://testnet.api.fuel.credit/v1/attestationCurrent signed FUEL/USD price attestation

The custom hostname and TLS certificate are active. The same v1 routes remain available at the service's workers.dev hostname as an operational fallback.

The app requests signed attestations on demand. The service chooses the price and current Fuel block timestamp; callers cannot supply either value. Its signer is stored only as a Worker secret. Mainnet uses its separately configured contract-bound Worker endpoint; testnet and mainnet remain separate signing services.

The testnet lifecycle has completed successfully using a live service-issued attestation:

  1. permissionless tFUEL/tUSDC minting;
  2. pool funding;
  3. oracle price attestation;
  4. loan opening and atomic tUSDC principal transfer;
  5. partial repayment;
  6. full repayment with collateral still locked until a separate maturity claim.

Canonical testnet loan 1 completed this lifecycle. Loan 0 is a partially repaid active position from an interrupted validation run; its ephemeral borrower key was not retained, so it can only be permissionlessly finalized at maturity. Both positions use valueless test assets.

Open-source infrastructure on Fuel.