API reference
Program instructions
| Instruction | Who | Arguments | Effect |
|---|---|---|---|
initialize | deployer | defaults | creates Config and the vault |
set_paused | authority | paused | blocks or unblocks new bets and new markets |
set_defaults | authority | defaults | defaults for future markets, within the ceilings |
propose_authority, accept_authority | authority, then the new key | new_authority | two-step handover |
create_market | anyone | feed_id, strike, expiry | one market per (feed, strike, expiry) |
open_purse | bettor | enc_key | creates the bettor's purse |
deposit | bettor | computation_offset, amount | public transfer in, then a sealed credit |
place_bet | bettor | computation_offset, bet, bet_key, bet_nonce | sealed bet and ticket |
tally | anyone | computation_offset | seals a due batch and asks for its sums |
settle_market | anyone | the Pyth update account | applies the print rule |
refund_market | anyone | none | refunds a market after the 7-day grace with no print |
claim | anyone | computation_offset | pays one position into its purse |
withdraw | bettor | computation_offset, amount | public transfer out if the purse holds it |
release_purse | anyone | none | frees a purse whose computation went unanswered for an hour |
sweep_fees | anyone | none | moves accrued fees to the fixed treasury |
Each computation has a matching *_callback that only the Arcium program can deliver.
Events
| Event | Fields |
|---|---|
MarketCreated | market, feed_id, strike, expo, close_time, expiry |
Deposited | owner, amount |
Credited | owner |
BetQueued | market, owner, batch |
BetSettled | market, owner, batch, accepted |
BatchSealed | market, batch, tickets |
OddsPublished | market, batch, tickets, yes_pool, no_pool |
MarketSettled | market, outcome, price, conf, publish_time, fee, dropped_tickets |
Claimed | market, owner |
WithdrawSettled | owner, amount, paid |
ComputationAborted | account |
Released | account |
FeesSwept | amount |
Constants
| Name | Value | Meaning |
|---|---|---|
BATCH_SLOTS | 8 | seats per batch |
MIN_BATCH_FLOOR | 3 | lowest minimum batch the program accepts |
MAX_FEE_BPS | 500 | fee ceiling, 5% |
MIN_EPOCH_SECS, MAX_EPOCH_SECS | 30, 86,400 | epoch range |
MAX_PRINT_DELAY_SECS | 60 | latest a settling print may land after the deadline |
MAX_SETTLE_CONF_BPS | 100 | widest confidence band a settling print may carry |
SETTLE_WINDOW_SECS | 15 | How long after the deadline a print may be published and still settle the market |
RESOLVE_GRACE_SECS | 604,800 | 7 days before a market without a print can be refunded |
STUCK_AFTER_SECS | 3,600 | wait before an unanswered computation can be released |
Site endpoints
| Path | Returns |
|---|---|
/api/health | status, network, program id, stage |
/api/landing | live Pyth SOL, BTC and ETH prices read from their Solana accounts |
/.well-known/curtain.json | program id and deployment status |