Skip to main content
Program ID: EomiXBbg94Smu4ipDoJtuguazcd1KjLFDFJt2fCabvJ8 x0-wrapper provides a 1:1 USDC-backed stablecoin (x0-USD) that integrates with the protocol’s transfer hook and confidential transfer infrastructure. Users deposit USDC to mint x0-USD, and burn x0-USD to redeem USDC (minus a redemption fee).

Core Invariant

The protocol enforces a strict reserve invariant at all times: reserve_usdc_balanceoutstanding_wrapper_supply\text{reserve\_usdc\_balance} \geq \text{outstanding\_wrapper\_supply} This ensures every x0-USD token is backed by at least 1 USDC in the reserve. The WrapperStats.reserve_ratio_scaled() method reports the ratio as a scaled integer (10,000 = 1.0x, 10,100 = 1.01x).

Instructions

Minting & Redemption

deposit_and_mint

Deposit USDC → mint x0-USD at a 1:1 ratio. No fee on deposits.
  • Minimum deposit: MIN_DEPOSIT_AMOUNT = 1,000,000 (1 USDC)
  • Transfers USDC from user to reserve account
  • Mints equivalent x0-USD to user’s token account
  • Updates WrapperStats counters

burn_and_redeem

Burn x0-USD → redeem USDC at 1:1 minus redemption fee.
  • Minimum redemption: MIN_REDEMPTION_AMOUNT = 1,000,000 (1 USDC)
  • Maximum per-transaction: MAX_REDEMPTION_PER_TX = 100,000,000,000 (100K USDC)
  • Daily cap: MAX_DAILY_REDEMPTIONS = 1,000,000,000,000 (1M USDC)
  • Redemption fee: WRAPPER_REDEMPTION_FEE_BPS = 80 (0.8%)

Governance (Timelocked)

All governance actions require a 48-hour timelock (ADMIN_TIMELOCK_SECONDS = 172,800). The flow is:
1

Schedule

Admin calls schedule_* to create an AdminAction PDA with a scheduled_timestamp.
2

Wait

48 hours must pass. The action cannot be executed before scheduled_timestamp + ADMIN_TIMELOCK_SECONDS.
3

Execute

Admin calls execute_* to apply the change. The AdminAction is marked as executed.

schedule_fee_change / execute_fee_change

Changes the redemption fee. New fee must be within MIN_WRAPPER_FEE_BPS = 10 (0.1%) to MAX_WRAPPER_FEE_BPS = 500 (5%).

schedule_pause / execute_pause

Pauses or unpauses the wrapper. When paused, deposits and redemptions are disabled.

emergency_pause

Immediate pause — bypasses the 48-hour timelock. Used for critical security incidents.

schedule_emergency_withdraw / execute_emergency_withdraw

Withdraws reserve funds to a specified destination. Subject to the 48-hour timelock.

cancel_admin_action

Cancels any pending (not yet executed) admin action.

Admin Transfer

initiate_admin_transfer

Initiates a two-step admin transfer to a new admin pubkey.

accept_admin_transfer

The new admin accepts the transfer. Until accepted, the original admin retains control.

State Accounts

WrapperConfig

PDA Seeds: ["wrapper_config"]

WrapperStats

PDA Seeds: ["wrapper_stats"] Key methods:
  • reserve_ratio_scaled() — Returns reserve * 10000 / supply (10,000 = 1.0x backing)
  • is_healthy()ratio >= MIN_RESERVE_RATIO_SCALED (10,000)
  • is_warning()ratio < RESERVE_WARNING_THRESHOLD (10,100)
  • maybe_reset_daily_counter() — Resets daily redemption volume at midnight

AdminAction

PDA Seeds: ["admin_action", action_type]

Reserve Monitoring

The protocol emits ReserveAlert events when the reserve ratio drops below warning thresholds:

Events Emitted

Last modified on February 8, 2026