This document describes the test assets used for testnet market initialization in the SO4.market protocol.
The active testnet path uses custom mintable Soroban tokens (contracts/test_token) managed by a faucet contract (contracts/test_faucet). These are NOT Stellar classic assets or SACs — they are standalone Soroban contracts whose owner is set to the faucet, allowing users to self-claim tokens on testnet.
A Stellar classic asset / SAC path also exists (see § SAC Path) but is not the active testnet deployment.
Do not use either path for mainnet collateral.
All four tokens are deployed together under a single faucet:
| Token Code | Description | Decimals | Role in markets |
|---|---|---|---|
| TUSDC | Test USD Coin | 7 | Short token / collateral (all markets) |
| TWBTC | Test Wrapped Bitcoin | 7 | Long + index token for TWBTC/TUSDC |
| TETH | Test Ether | 7 | Long + index token for TETH/TUSDC |
| TXLM | Test Stellar Lumen | 7 | Long + index token for TXLM/TUSDC |
All test assets use Stellar's standard 7-decimal precision for consistency with the protocol's math:
- 1 token = 10,000,000 base units (7 decimals)
10000000= 1 token1000000000= 100 tokens
You have two supported test-asset paths:
- Native mintable test tokens (ACTIVE testnet path) using
contracts/test_token+contracts/test_faucet. Users self-claim from the faucet; no trustlines required. - SAC test assets using Stellar classic assets wrapped by SACs. Closest to real-world collateral plumbing. See § SAC Path below.
Do not use either path for mainnet collateral.
Deploy one faucet plus all four test tokens (TUSDC, TWBTC, TETH, TXLM):
make test-tokens-all-with-faucet NETWORK=testnet SOURCE=aliceThis will:
- Deploy
test_faucet - Deploy four
test_tokeninstances (TUSDC, TWBTC, TETH, TXLM) - Initialize each token with the faucet contract as owner
- Configure the faucet claim amount for each token
- Save
FAUCET,TUSDC,TWBTC,TETH,TXLM, and*_NATIVEIDs to.deployed/tokens-testnet.env
Then bootstrap all three markets:
make deploy-all NETWORK=testnet SOURCE=alice
make bootstrap NETWORK=testnet SOURCE=alice LONG_CODE=TWBTC SHORT_CODE=TUSDC
make bootstrap NETWORK=testnet SOURCE=alice LONG_CODE=TETH SHORT_CODE=TUSDC SKIP_ROLES=1
make bootstrap NETWORK=testnet SOURCE=alice LONG_CODE=TXLM SHORT_CODE=TUSDC SKIP_ROLES=1Deploy a faucet for one long/short token pair only:
make test-tokens-with-faucet NETWORK=testnet SOURCE=alice LONG_CODE=TWBTC SHORT_CODE=TUSDCUseful overrides:
make test-tokens-with-faucet \
NETWORK=testnet \
SOURCE=alice \
LONG_CODE=TWBTC \
SHORT_CODE=TUSDC \
CLAIM_AMOUNT=1000000000 \
FAUCET_COOLDOWN=17280CLAIM_AMOUNT is in base units. With 7 decimals, 1000000000 is 100 tokens.
FAUCET_COOLDOWN is measured in ledgers.
Users can claim both market tokens after the faucet is deployed:
make faucet-claim-market NETWORK=testnet SOURCE=alice TO=bob LONG_CODE=TWBTC SHORT_CODE=TUSDCOr claim one token directly:
make faucet-claim FAUCET=C... TOKEN=C... TO=bob NETWORK=testnet SOURCE=aliceCreate both TWBTC and TUSDC in one command:
make market-tokens NETWORK=testnet SOURCE=aliceThis will:
- Generate issuer keypairs for TWBTC and TUSDC
- Deploy Stellar Asset Contracts for both tokens
- Trustline and mint 100,000,000,000 (10B) units of each token to the SOURCE account
- Save contract IDs to
.deployed/tokens-testnet.env
Create a single test token:
# Create TWBTC
make token-bootstrap CODE=TWBTC TO=alice NETWORK=testnet SOURCE=alice
# Create TUSDC
make token-bootstrap CODE=TUSDC TO=alice NETWORK=testnet SOURCE=aliceFor more control over the process:
# 1. Generate issuer keypair
make token-issuer CODE=TWBTC NETWORK=testnet
# 2. Deploy the Stellar Asset Contract
make token-deploy CODE=TWBTC NETWORK=testnet SOURCE=alice
# 3. Establish trustline
make token-trust CODE=TWBTC TO=alice NETWORK=testnet SOURCE=alice
# 4. Mint tokens
make token-mint CODE=TWBTC TO=alice AMOUNT=1000000000 NETWORK=testnet SOURCE=alice
# 5. Check balance
make token-balance CODE=TWBTC NETWORK=testnet SOURCE=aliceThe standard testnet deployment workflow uses TWBTC and TUSDC:
# 1. Create test tokens
make market-tokens NETWORK=testnet SOURCE=alice LONG_CODE=TWBTC SHORT_CODE=TUSDC
# 2. Deploy protocol contracts
make deploy-all NETWORK=testnet SOURCE=alice
# 3. Bootstrap the market (grants roles, creates market, sets config)
make bootstrap NETWORK=testnet SOURCE=alice KEEPER=keeper LONG_CODE=TWBTC SHORT_CODE=TUSDC
# 4. Submit initial oracle prices
bash scripts/submit_prices.sh testnet keeperYou can use different test assets by overriding the defaults:
make market-tokens NETWORK=testnet SOURCE=alice LONG_CODE=TCUSTOM SHORT_CODE=TOTHER
make bootstrap NETWORK=testnet SOURCE=alice LONG_CODE=TCUSTOM SHORT_CODE=TOTHERAfter creating tokens, their contract IDs are saved to .deployed/tokens-testnet.env:
TWBTC=CA3D5KRYM6CB7OWQ6TWY7QZ2J7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4K
TWBTC_ASSET=TWBTC:GD5KRYM6CB7OWQ6TWY7QZ2J7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4K
TUSDC=CB7OWQ6TWY7QZ2J7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4
TUSDC_ASSET=TUSDC:GD5KRYM6CB7OWQ6TWY7QZ2J7L4KQZJ7L4KQZJ7L4KQZJ7L4KQZJ7L4KThe bootstrap script reads this file to get the token contract IDs.
To mint more tokens after initial creation:
# Mint 100 TWBTC (1,000,000,000 base units)
make token-mint CODE=TWBTC TO=alice AMOUNT=1000000000 NETWORK=testnet SOURCE=alice
# Mint 1000 TUSDC (10,000,000,000 base units)
make token-mint CODE=TUSDC TO=alice AMOUNT=10000000000 NETWORK=testnet SOURCE=alicemake token-balance CODE=TWBTC NETWORK=testnet SOURCE=alice
make token-balance CODE=TUSDC NETWORK=testnet SOURCE=aliceWhen bootstrapping markets, you can configure:
| Variable | Default | Description |
|---|---|---|
LONG_CODE |
TWBTC |
Ticker code for the long token |
SHORT_CODE |
TUSDC |
Ticker code for the short token |
SEED_LONG |
10000000 |
Long token amount for initial liquidity (1 token) |
SEED_SHORT |
10000000 |
Short token amount for initial liquidity (1 token) |
Example with custom seed amounts:
make bootstrap NETWORK=testnet SOURCE=alice \
LONG_CODE=TWBTC SHORT_CODE=TUSDC \
SEED_LONG=50000000 SEED_SHORT=50000000These test assets are for testnet only. For mainnet:
- Do not use
token-bootstrap - Deploy or look up existing SACs for real Stellar assets
- Configure markets with real asset addresses
Each test token has its own issuer keypair:
- TWBTC issuer:
TWBTC-issuer - TUSDC issuer:
TUSDC-issuer
These are generated automatically and stored in your Stellar CLI key store.
Before minting or transferring tokens, the recipient must have a trustline established. The token-bootstrap target handles this automatically.
All amounts are in base units (7 decimals):
10000000= 1 token100000000= 10 tokens1000000000= 100 tokens
If you see "Missing .deployed/tokens-testnet.env", run:
make market-tokens NETWORK=testnet SOURCE=aliceEnsure you used the same CODE when creating and bootstrapping:
# Create with CODE=TWBTC
make token-bootstrap CODE=TWBTC NETWORK=testnet SOURCE=alice
# Bootstrap with LONG_CODE=TWBTC
make bootstrap NETWORK=testnet SOURCE=alice LONG_CODE=TWBTC SHORT_CODE=TUSDCMint more tokens:
make token-mint CODE=TWBTC TO=alice AMOUNT=1000000000 NETWORK=testnet SOURCE=alice- Make targets:
contracts/mx/tokens.mk - Bootstrap script:
contracts/scripts/bootstrap.sh - Deployment guide:
contracts/mx/README.md - Main README:
contracts/README.md