peard_perps
Synthetic perpetuals on a pairable with no mint behind it.
peard_perps is the venue's own perpetuals engine. The curve is virtual and prices size only; the collateral is real and lives in a token vault. Funding is what manufactures a counterparty when no spot market exists to arbitrage against, which is what lets a market open with no liquidity provider and nothing to custody.
This program deliberately inverts peard's core property: the oracle is in the settlement path here, because the index decides funding and decides who is liquidatable.
Every name, account, argument and error on this page is generated from
target/idl/peard_perps.json, the IDL Anchor emits at build time. It is what the
deployed bytes actually accept, not a recollection of it.
Program id
| Address | AZdLGAaYiie1mwuhHUfHM9zA9CC3F3BP5tJoUiAE3umZ |
| Deployed | devnet only. 49 markets, all migrated to the 395-byte layout on 2026-08-26 and re-read to confirm it. Deliberately left off mainnet: perps need a funded insurance fund and an exercised liquidator, and neither exists |
| Instructions | 17 |
| Account types | 3 |
| Events | 10 |
| Error codes | 22 |
Counts and the instruction list below are read from target/idl/peard_perps.json
as of 2026-08-25. set_market_index_age was added and deployed that day, and
its discriminator is present in the devnet binary dumped back off the chain,
not only in the local artifact.
Instructions
Global and governance
Markets
The crank
Trading
Liquidation
Backing
Accounts
The state this program owns. Field names are as they appear on chain.
Types
Events
| Event | Fields |
|---|---|
BackingSet | market, backing, max_age_secs |
BackingSynced | market, value_usd, as_of |
FundingSettled | market, mark, index, premium_bps, cumulative |
IndexSynced | market, price, ts |
Liquidated | market, owner, liquidator, size, reward, bad_debt |
MarketOpened | market, pairable, mark |
MarketSettled | market, price, ts |
PositionChanged | market, owner, base_size, quote, collateral, mark, is_close |
PositionSettled | market, owner, price, pnl, collateral |
Errors
| Code | Name | Message |
|---|---|---|
| 6000 | Unauthorized | unauthorized |
| 6001 | BadParam | parameter outside allowed range |
| 6002 | ZeroAmount | amount must be greater than zero |
| 6003 | MathOverflow | math overflow |
| 6004 | Halted | market is halted |
| 6005 | IndexUnusable | index price is stale, missing, or frozen |
| 6006 | WrongPairable | the account is not the pairable this market names |
| 6007 | LeverageTooHigh | resulting leverage exceeds the market maximum |
| 6008 | WrongSide | position is already open on the other side |
| 6009 | NoPosition | nothing open to close |
| 6010 | SlippageExceeded | fill worse than the caller asked for |
| 6011 | NotLiquidatable | position is healthy and cannot be liquidated |
| 6012 | BelowMaintenance | collateral would fall below maintenance |
| 6013 | OpenInterestCap | open interest cap reached on that side |
| 6014 | MarkDiverged | mark has diverged too far from index to trade against |
| 6015 | VaultShort | vault does not hold enough to pay this out |
| 6016 | Settled | market has settled and no longer trades |
| 6017 | NotSettled | market has not settled |
| 6018 | NotExpired | the underlying has not expired, so there is nothing to settle at |
| 6019 | BackingUnusable | this market claims backing and the attestation is stale or the index unusable |
| 6020 | WrongBacking | the backing account is not the pinned one, or does not name this market |
peard