X

Docs

App
flatcoinZooko's flatcoin, live on Meteora via pump.fun.

How FLAT is meant to work, how to open a vault from a Solana wallet, and what this deployment is not.

What FLAT is

FLAT is a flatcoin: a semi-stable asset that is not pegged to any fiat currency. It is minted against bridged ZEC and aims to dampen ZEC's volatility rather than track the dollar. The design is a collateralized debt position, the same shape as RAI, forked from the ZAI shielded-stability-primitive proposal onto Solana.

Two constraints are treated as non-negotiable. The mechanism has to stay fully decentralized, and it cannot depend on an honest-majority oracle. Those constraints rule out a dollar peg. They do not rule out a useful medium of exchange.

Connect a wallet

Use the button in the top-right. Phantom, Solflare, Backpack, and any other wallet that injects the Solana wallet standard will appear. Connecting does not send a transaction and does not grant the site the right to move funds. Opening, repaying, or closing a vault asks you to sign a message that names the action, the amounts, and a short-lived nonce.

Open a vault

  1. Connect a Solana wallet.
  2. On Open a vault, enter the wZEC you are locking and the FLAT you want to mint. The mint cannot exceed 69% of collateral, which is also the 145% minimum ratio.
  3. Approve the signature. The server checks the signature against your public key, then records the vault. You can repay or close from the same page; both require another signature from the same key.

This deployment records positions against the wallet that signed them. A full on-chain program — locking real wZEC in a PDA and minting an SPL FLAT — is the next step, not the current one. Treat the vaults here as the controller's working model, signed and attributable, not as custody of mainnet ZEC.

The controller

The redemption rate is a proportional–integral controller. It reads the gap between the ZEC/FLAT pool's six-hour time-weighted price and the redemption price, and turns one dial. Gains are fixed at deploy. There is no governance vote that can change them, and no reporter set whose opinion of the ZEC price has to be trusted.

Above target, the rate goes negative: minting gets cheaper, holding gets slightly costly, supply expands. Below target it runs the other way. The rate is bounded at ±40% APR so a violent move in ZEC cannot ask the system to do something physically absurd overnight.

HTTP API

GET /api/vaults?owner=List vaults for a Solana public key.
POST /api/vaultsOpen a vault. Body: owner, signature, nonce, collateralZec, mintFlat.
POST /api/vaults/:idaction: "repay" | "close", plus the same signature fields and repayFlat.

The signed message is a colon-separated string: flatcoin:action:owner:nonce:vaultId:collateral:mint:repay. Nonces are millisecond timestamps and expire after ten minutes.

Limits of this fork

Solana was chosen so the controller could run against real wallets and cheap liquidations. What it does not give us is privacy. Every vault and every signature is public. The original proposal wants this mechanism enshrined in Zcash, shielded. This site is the argument that the controller is worth that conversation — not a substitute for it.

Read the ZAI proposal →