Identity and compatibility
Governance can upgrade the futures program at the same address, and new markets are created every month. A robust integration therefore checks the values that identify the deployment, and reads everything else at run time instead of copying it into code.
For the current addresses, see Deployment.
Values that identify the deployment
Section titled “Values that identify the deployment”| Field | Where to read it | Value on Solana mainnet |
|---|---|---|
| Genesis hash | /v1/config genesisHash, and your RPC’s getGenesisHash |
5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d |
| Futures program | /v1/config programs.futures |
Bvp9kiRtJ7dT8unxP4Da39gv2eXDLEHLpcDfzcEuRKMu |
| Oracle program | /v1/config programs.oracle |
45YCerssGjg2M29RFc9D4fAJh7dfFpMJ3ZcZtaTnRXRS |
| USDC mint | /v1/config usdcMint |
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| Governance controller | /v1/config governanceController.program |
8fhNi6QHU5TYNhoPDM4vs89ZBztnpxp3LnBXRgkBVKtx |
| Sponsor | /v1/config sponsor |
The fee payer of every sponsored transaction; read it from the API. |
Petri does this before every signature: it checks that the RPC serves the trusted chain and that the trusted programs are deployed there, from /v1/config or from a deployment manifest you pin with --deployment.
Values to read from each market
Section titled “Values to read from each market”Read every market parameter from the market itself, never from a constant: GET /v1/markets/:market returns them, and the market account holds them.
grid,k,stepValueandvalueDecimals: the price scale and what a lot pays.periodand the oracle program: the settlement source. Each market is bound to one oraclePeriodof its index and expiry.vaultand the USDC mint: where the market’s cash is held.
Refuse a market that the futures program you trust does not own, or one that settles in another USDC mint or reads another oracle program. Petri refuses such markets.
Values that change
Section titled “Values that change”| Value | Changes when |
|---|---|
| The programs’ code | Governance upgrades it. The addresses stay the same. |
| The governance gate epochs | Governance acts. |
| The markets listed | New expiries are created; settled markets stop trading. |
| Market state: book, positions, cash | Every trade. |
Governance gate
Section titled “Governance gate”Every futures instruction carries the program’s canonical governance gate as a read-only account, together with the gate’s current epoch. If the gate is frozen or the epoch is stale, the instruction fails and nothing changes. The futures API binds the current epoch when it prepares a transaction, and Petri does the same for the transactions it builds. A transaction prepared before a governance action can fail afterwards: prepare it again. Never edit a transaction after it has been checked.
Before you sign
Section titled “Before you sign”Deployment identity, current state and the wallet signature are separate checks. A match on one says nothing about the others. Before a wallet signs a prepared transaction:
- Deployment. The genesis hash and program IDs match the values you trust.
- Transaction. It does exactly what was asked, for this owner, in this market. See Prepared transactions.
- Lifetime. The prepared id is less than 90 seconds old, and the transaction has not passed its
lastValidBlockHeight.
The program checks every amount, account and the gate again when the transaction runs. Your checks make sure the wallet is asked to approve what the user actually intended.

