PROPFUN

Solana Jupiter Perps USDC SOL ETH BTC

For developers

Everything the app does, any program or script can do. This page lists the accounts and instructions of the PROPFUN program as its interface file (IDL) describes them; the app's own client is web/app/app/lib/seat.ts and builds every instruction from that file.

Program

ProgramNot deployed yet. The address appears here at launch.
VenueJupiter Perpetuals, PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu
PricesThe Doves price feed each Jupiter custody names (the price Jupiter fills at)
MoneyUSDC, EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

Accounts and their addresses

AccountSeeds (program addresses)What it holds
Config"config"Jupiter accounts pinned at launch, the allocation cap, pool books and running totals
Authority"authority"No data; signs for the pool vault and the fee escrow
Pool vault"pool_vault"The pool's idle USDC
Fee escrow"fee_escrow"Fees of exams still running
Season"season", season id (u32, little endian)The season's rules and its started, passed, failed and voided counts
Exam"exam", season, traderOne paper account per trader per season
Seat"seat", season, traderOne funded seat per trader per season
Seat wallet"seat_authority", seatThe address that owns the seat's Jupiter positions; its USDC sits in its associated token account
LP record"lp", ownerPool shares and the time of the last deposit

A seat's Jupiter positions are Jupiter's own addresses for the seat wallet: "position", seat wallet, JLP pool, custody, collateral custody, side (1 long, 2 short). Its orders are Jupiter requests: "position_request", position, the seat's request counter (u64), 1 to open or 2 to close.

Instructions

InstructionWho signsArgumentsExtra accounts at the end
close_seasonAdmin--
close_seatSeat trader; anyone once cut-the mark accounts
depositAnyoneamount: u64-
exam_tradeTradermarket: u8, side: u8, size_usd: u64, increase: bool[custody, oracle] for SOL, ETH, BTC
grade_examAnyone-[custody, oracle] for SOL, ETH, BTC
initializeUpgrade authority, onceallocation_cap_bps: u16-
issue_seatTrader with a passed exam--
mark_seatAnyone-the mark accounts
open_seasonAdminrules: Rules-
report_haltAnyonemarket: u8-
report_resumeAnyone-[custody, oracle] for SOL, ETH, BTC
seat_closeSeat trader; anyone once cut (whole position)market: u8, side: u8, size_usd: u64, entire: bool, price_limit: u64[request, request USDC account] while a request is pending
seat_openSeat tradermarket: u8, side: u8, size_usd: u64, collateral_usdc: u64, price_limit: u64the mark accounts
set_adminAdminnew_admin: pubkey-
split_profitSeat trader-the mark accounts
start_examTrader--
void_examAnyonemarket: u8-
withdrawShare owner, 7 days after the last depositshares: u64-

The mark accounts, in order: the pending request and its USDC account when the seat has one in flight, then [position, custody, oracle] for every open position slot (slot = market x 2 + side - 1, markets SOL 0, ETH 1, BTC 2), lowest slot first.

Market numbers: SOL 0, ETH 1, BTC 2. Sides: 1 long, 2 short. Dollar amounts and prices are USD with 6 decimals.

Sending transactions

Fetch the blockhash at confirmed and send with a confirmed preflight. Wallets sign and send (signAndSendTransaction); the site never handles a signed transaction.

Errors

CodeNameMessage
6000InvalidRulesSeason rules are out of range.
6001SeasonClosedThis season is closed to new exams.
6002ExamNotActiveThe exam is not running.
6003ExamOverThe exam time is over; grade it.
6004MarketNotAllowedThat market is not on this season's list.
6005ZeroSizeA trade must have a size.
6006OppositeSideOpenClose the open position on the other side first.
6007NoPositionThere is no position to reduce.
6008ReduceTooLargeThat is more than the open position.
6009LeverageCapTotal position size would pass the leverage cap.
6010StalePriceThe price is too old to trade on.
6011VenueHaltedThe venue is halted for this market.
6012VenueNotHaltedThe venue is not halted.
6013HaltTooShortThe halt has not lasted long enough to void the exam.
6014HaltAlreadyReportedA halt is already being timed.
6015NoHaltReportedNo halt is being timed.
6016TargetNotReachedThe profit target is not reached.
6017TooFewTradingDaysNot enough distinct trading days yet.
6018NotFlatClose every position before claiming.
6019ExamNotPassedThe exam has not passed.
6020PoolCapacityThe pool has no room for another seat right now.
6021SeatNotActiveThe seat is not active.
6022SeatNotCutThe seat has not been cut.
6023RequestPendingWait for the last request to finish.
6024RequestStillOpenThe request has not finished yet.
6025PriceLimitOutOfBandThe price limit is outside the allowed band around the oracle.
6026InsufficientCollateralNot enough USDC in the seat for that collateral.
6027WouldBreachLimitThis trade would put the seat under its loss limit.
6028NoProfitThere is no profit to split.
6029AccountMismatchAccount does not match the expected address.
6030WrongOwnerAccount is not owned by the expected program.
6031BadAccountDataAccount data is malformed.
6032MathOverflowArithmetic overflow.
6033ZeroAmountAmount must be greater than zero.
6034InsufficientLiquidityNot enough idle USDC in the pool.
6035InsufficientSharesNot enough shares.
6036NotTraderOnly the seat's trader may do this.
6037SeatCutA seat whose limit is broken can only close positions.
6038NothingToGradeNothing to grade yet: no limit broken, target not reached, time not up.
6039WithdrawLockedShares can be withdrawn seven days after the last deposit.
6040ExamBreachedThe exam is below a loss limit; grade it.
6041CollateralTooThinEach Jupiter position needs at least a tenth of its size as collateral.