How YUAN works

A synthetic perpetuals venue on BNB Smart Chain, margined in qYUAN, where one unhedged pool is the house.

Overview

YUAN is a synthetic perpetuals venue on BNB Smart Chain. A position is a bet between you and one protocol-owned pool of qYUAN tokens, opened and closed at the Hyperliquid best-bid/best-ask midpoint, leaned by a small skew that depends on how one-sided the book is. There is no order book, no funding, no external hedge: the pool is the counterparty to every trade and keeps what traders lose.

Positions are isolated: fixed margin, fixed leverage, closed whole. Leverage runs up to 10000x on BTC and ETH, 5000x on BNB, 2000x on SOL and XRP and 1000x on DOGE, HYPE and SUI, adjusted down by the keeper when realised volatility rises. Margin, PnL and fees are in qYUAN; market prices are in USD. Minimum margin is ¥10 and minimum notional ¥1,000 (qYUAN, scaled at deploy). Trading is one click and gasless: you sign intents with a browser session key and a relayer lands them.

MarketsBTC, ETH, BNB, SOL, XRP, DOGE, HYPE, SUI
Margin / settlementqYUAN (BEP-20, launched on flap.sh); yIOU (YUAN IOU) accepted as margin
PricesUSD — Hyperliquid mid, Pyth-guarded
Max leverage10000x BTC / ETH · 5000x BNB · 2000x SOL / XRP · 1000x DOGE / HYPE / SUI (ceilings; live cap set by keeper)
Min margin / notional¥10 / ¥1,000 qYUAN
Win fee1.5% of the net win, half to LOSS stakers
Profit capmin(50x margin, 0.5% of pool equity)

Price

A set of signers publishes the Hyperliquid midpoint for each market as EIP-712 typed data (marketId, mid, bid, ask, timestamp). The Exchange accepts a price only when a quorum of signers agree, the timestamp is at most a few seconds old, bid is at most mid is at most ask, and the midpoint sits within a bounded deviation of the Pyth price for the same asset.

If any of these checks fails the market flips to close-only: nobody can open, everybody can close, liquidations still run. The signers are an oracle, not a precompile; the Pyth guard bounds what a faulty quorum can do, it does not remove the trust.

Mechanics

The normal path is an intent (next section): you sign the terms, the relayer submits them together with a fresh signed price, and the fill happens in that one transaction. Neither you nor the relayer chooses the fill: it is the signed midpoint in that block, leaned by the skew, and it must respect the limit price and deadline inside your signature or the transaction reverts.

The permissionless fallback is the two-step request. You submit a request (market, side, margin, leverage, limit, deadline ≤ 60 s) with your wallet; margin locks; a keeper executes it at the next signed midpoint; if the limit or deadline is violated it reverts and you cancel to unlock margin. Closes work the same way. Positions are isolated, so a loss never exceeds the margin of that position.

The bust price is set at open. It is the zero-equity price moved toward entry by a buffer, where the buffer is capped at half of 1/L. At 10000x the distance to zero equity is 1 bp, so the bust sits 0.5 bp from entry. Crossing it forfeits the margin; a liquidation fee is carved from it for whoever calls the liquidation. Liquidations use the raw mid, not the skewed mark.

Open (intent)sign OpenIntent → relayer calls openBySig with a signed price; fills in one tx, no gas
Close (intent)sign CloseIntent → relayer calls closeBySig; fills in one tx
Open (fallback)requestOpen → keeper executes at next signed mid, within deadline (max 60 s)
Close (fallback)requestClose → keeper executes at next signed mid, within deadline
Cancelafter the deadline, by the owner; unlocks margin
Bust (long)entry · (1 − 1/L + buffer), buffer ≤ 1/(2L)
Bust (short)entry · (1 + 1/L − buffer), buffer ≤ 1/(2L)
Liquidationanyone, at raw mid, once the bust is crossed

Intents & session keys

An intent is an EIP-712 message (OpenIntent: market, side, margin, leverage, limit price, deadline, nonce, builder, useQueued; CloseIntent: position, deadline, nonce) signed against the IntentBook domain. The relayer verifies it, simulates it with the freshest signed price and submits Exchange.openBySig / closeBySig. The terms are inside your signature: the relayer can execute or not execute, nothing else. Deadlines are 30 s; a nonce can be used once.

To avoid a wallet popup per trade, the app generates a session key in your browser and asks your wallet to sign one RegisterSessionKey message (valid up to 30 days). A session key may sign open and close intents only. It can never deposit, withdraw, register another key or touch yIOU, LOSS or fLP. Revoke it any time from the Gasless card; clearing browser storage forgets it, and you simply register a new one. If the relayer is down the terminal falls back to on-chain requests with your wallet.

DomainYUAN Intents v1, chainId 56, IntentBook
Session keybrowser-held, 30 days max, intents only
Limit pricelong: max entry, short: min entry; checked on the skewed mark
Deadline / nonce30 s / single use
FallbackrequestOpen / requestClose with the wallet, keeper executes

The house

The pool does not hedge. Instead it prices and limits risk in four ways, all of which are visible on the House page and computed by the same integer math as the contracts (@fold/core).

Skew pricing

Every fill happens at a skewed mark rather than the raw mid. The skew is k · (netBefore + netAfter) / (2 · equity), where net is long OI minus short OI and equity is pool equity, clamped to ±maxSkew. Positive skew puts the mark above mid, so longs pay more and shorts receive more. The skew is applied on open and on close, so order flow that worsens the imbalance pays, and flow that reduces it is paid. Liquidations happen at the raw mid.

Volatility-adaptive leverage

The owner sets a leverage ceiling and a bust-buffer floor per market. Every minute the keeper measures realised volatility and sets the live cap within [ceiling / 20, ceiling] and the live buffer within [floor, 20 · floor]. Tightening is immediate; loosening lags. Existing positions keep the parameters they opened with.

Profit cap

A single position can win at most min(50 × margin, 0.5% of pool equity), after haircuts and before the win fee. The cap bounds what one trade can take out of the pool and therefore how much yIOU one trade can create.

Payout haircut and win fee

Wins on tiny moves are discounted: inside a 0.3 bp deadband nothing is paid (BBO jitter protection), and above it the kept share is 0.9 · m / (m + 2 bp) where m is the favourable move. There is no hold-time haircut: a position held for one second settles exactly like one held for a day. The 1.5% win fee is charged on the result; half goes to LOSS stakers, half to the fee recipient (less the referrer's share, see Referrals).

Skewk · (netBefore + netAfter) / (2 · equity), clamped to ±maxSkew; on open and close
Live leveragekeeper, every minute, within [ceiling/20, ceiling]
Live bust bufferkeeper, every minute, within [floor, 20·floor]
Profit capmin(50 × margin, 0.5% × pool equity)
Win pathdeadband 0.3 bp → keep curve 0.9 · m / (m + 2 bp) → profit cap → 1.5% fee
Win fee1.5%, half to LOSS stakers

qYUAN token

qYUAN is the venue's margin and settlement token: a BEP-20 with 18 decimals on BNB Smart Chain, launched on flap.sh. It starts on the flap bonding curve and graduates to a PancakeSwap V3 pool once 800M of the 1B supply are in circulation. Every deposit into the Exchange is qYUAN (other collateral is swapped into qYUAN on Pancake V3 by the CollateralAdapter on the way in), every position's margin is qYUAN, PnL settles in qYUAN, the pool holds qYUAN, win fees and referral payments are qYUAN. Market prices — BTC, ETH, BNB, SOL and the rest — stay in USD, from the Hyperliquid midpoint.

The app writes qYUAN amounts with the ¥ mark (¥1,000.00) and USD prices with $. The mark is the brand, not a conversion. Where a live qYUAN/USD read is available (PancakeSwap V3 or V2, or the flap.sh curve before graduation) the app shows it next to balances as a reference; when no source answers it shows nothing.

Holding margin in qYUAN means a trader carries qYUAN/USD exposure on top of the position. A 10000x BTC long that is flat on BTC still moves with qYUAN against the dollar, and so does the pool's capacity to pay. Treat qYUAN balances as qYUAN, not as dollars.

TokenqYUAN — ticker of the YUAN margin token; BEP-20, 18 decimals, BNB Smart Chain
Claim tokenyIOU (YUAN IOU): 1:1 claim on qYUAN from the pool, tradable on PancakeSwap yIOU/qYUAN
Launchflap.sh bonding curve → PancakeSwap V3 at 800M / 1B circulating
Used fordeposits, margin, PnL, pool equity, fees, referral payouts, LOSS rewards
Not used formarket prices (USD, Hyperliquid mid, Pyth-guarded)
AddressNEXT_PUBLIC_QYUAN_TOKEN at build time; unset = practice mode

yIOU — YUAN IOU

The pool pays winners from its available liquidity, which is equity minus the reserve requirement (a fixed ratio of locked margin) and minus capital parked in yield adapters that it first pulls back. If a win is larger than what is available right now, the trader is paid what the pool has and the rest is minted as yIOU (YUAN IOU), the pool's payout-queue claim token.

yIOU is an ERC20 claim on the pool, redeemable one-for-one for qYUAN as losses, deposits and yield refill available liquidity. It is transferable, so a holder who wants out now can sell the claim — a yIOU/qYUAN pool on PancakeSwap is the natural venue for that. Redemption is permissionless: anyone can call redeem for any holder, and the holder receives the qYUAN. The pool page shows the outstanding yIOU and how much the pool can redeem at this moment.

yIOU is not cash. It is paid in order of whoever calls redeem while liquidity exists, and if the pool never refills it is never paid. The profit cap and the reserve requirement exist to keep it small relative to the pool.

yIOU as margin

You can park yIOU in the Exchange (depositQueued) and open positions against it with the "Fund with yIOU" toggle. No cash moves to the pool; the position is debt-funded. On a loss the lost amount of your claim is burned — the pool's debt shrinks by exactly that much, which is the pool's gain — and LOSS is minted on it as usual. On a win your claim comes back in full and the profit is paid like any other win. A liquidation burns the whole claim, with no liquidation fee. OI caps and the reserve check still apply.

Referrals

Any address can refer. Share yuanpreps.com/?ref=0xYOU; the app remembers the ref and puts it in the trader's first OpenIntent as the builder. The Exchange records referrerOf once, on that first open, and never changes it. From then on 25% (builderFeeBps, owner-set, ≤ 50%) of every fee the trader generates — win fees and liquidation fees — is paid to the referrer through the normal payout path (qYUAN when the pool has it, yIOU otherwise). The rest splits as before. Your link, referred count and earnings are on the Portfolio page.

Cold start

The pool starts empty and LP deposits are closed (LiquidityPool.depositsOpen = false). It bootstraps from trader losses: every losing close and liquidation fills it, winners it cannot pay yet hold yIOU, and LOSS mints fastest while the pool is small. Expect early wins to arrive partly as yIOU. The owner may open LP deposits later through the timelock; fLP withdrawals are never blocked by this flag.

Oracle transparency

Every open, close and liquidation emits PriceUsed with the exact mid, bid, ask, timestamp and Pyth reference it settled on, so every price that ever moved money is on chain next to the fill. PriceFeed.refPrice exposes the Pyth value the guard compares against. The Oracle page lists the signer set, threshold, max age and per-market deviation limit, compares the live Hyperliquid mid with Pyth in your browser, and shows the recent PriceUsed and market-status events.

LOSS and fLP

LOSS

LOSS is minted to a trader on every realised loss (close at a loss, bust or liquidation). The rate per qYUAN lost starts high and decays as the pool's high-water gain grows, so early losers receive more per qYUAN than later ones. LOSS is unchanged by the YUAN rename: transferable from day one, and staking it earns the stakers' half of every win fee, paid in qYUAN, claimable at any time.

fLP

fLP is the pool share. Deposits of qYUAN mint shares at the current share price (equity / supply, in qYUAN); withdrawals burn them at the same price and are blocked when they would push available liquidity below the reserve requirement. The pool tracks a high-water mark that drives the LOSS mint curve. Idle capital above the reserve may sit in whitelisted yield adapters, and is pulled back before any yIOU is minted.

LOSS mintto losers, per qYUAN lost, on a decaying curve
LOSS staking50% of win fees, in qYUAN
fLP pricepool equity / fLP supply, in qYUAN
fLP withdrawblocked if available would fall below the reserve requirement
Yieldidle capital above reserve, whitelisted adapters only

Risk register

  • Leverage. At 10000x the bust is 0.5 bp from entry; a 0.005% move busts the position. Most positions at the top of the leverage range will bust.
  • Oracle. Prices come from a signed quorum, not a precompile. A compromised quorum together with a Pyth outage can settle at a wrong price within the deviation bound.
  • Unhedged pool. The pool holds the other side of every trade. A one-sided book and a large move can drain it. yIOU is a claim on future liquidity, not cash, and may never be fully redeemed.
  • Margin token. Margin, PnL and the pool are held in qYUAN while prices are in USD. A position that is flat in USD terms still gains or loses with qYUAN/USD; a fall in qYUAN shrinks the dollar value of your balance, your wins and the pool's capacity to pay. The app shows a live qYUAN/USD read from PancakeSwap (or the flap.sh curve) as a reference only.
  • Keeper / relayer liveness. Intents and requests depend on a keeper submitting them. If it stalls, intents expire harmlessly (nothing was locked) and you fall back to on-chain requests, which anyone may execute; a position you want to close stays open until a price is submitted.
  • Session key. The key lives in your browser storage. Anyone with access to it can open and close positions on your balance until expiry or revocation; it cannot withdraw. Revoke it on shared machines.
  • Contracts. YUAN's contracts are new and unaudited. Parameters change through a timelock, but bugs are not excluded.
  • Regulation. A bookmaker at 10000x is regulated as gambling in many places. It is your responsibility to know whether you may use it.

Do not deposit anything you need.

Terms

Software is provided as is, without warranty of any kind. Smart contracts are immutable except through the published timelock. You alone are responsible for your keys, your positions and your jurisdiction. Nothing on this site is investment advice.

Restricted regions

The interface is not offered to persons in the United States, the United Kingdom, mainland China, or any jurisdiction where leveraged synthetic derivatives or online gambling are prohibited. Using a VPN to circumvent this is a breach of the terms.