{ "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7", "metadata": { "name": "acidpump_er", "version": "0.2.0", "spec": "0.1.0", "description": "Acidpump: unsold collateral, PumpSwap loss conversion and USD FIFO" }, "instructions": [ { "name": "claim_ownership_developer", "discriminator": [ 45, 5, 121, 163, 213, 54, 1, 107 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "pool", "relations": [ "ownership_pool" ] }, { "name": "ownership_pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 112, 111, 111, 108 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "asset" }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "mint" }, { "name": "token_program" }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "destination", "writable": true } ], "args": [] }, { "name": "claim_ownership_rewards", "discriminator": [ 164, 239, 251, 179, 18, 225, 121, 99 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "ownership_trader" ] }, { "name": "pool", "relations": [ "ownership_pool", "ownership_trader" ] }, { "name": "ownership_pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 112, 111, 111, 108 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "ownership_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "owner" } ] } }, { "name": "asset" }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "mint" }, { "name": "token_program" }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "destination", "writable": true } ], "args": [] }, { "name": "close", "discriminator": [ 98, 165, 201, 177, 108, 65, 206, 96 ], "accounts": [ { "name": "quote_publisher", "signer": true }, { "name": "pool_accounts", "accounts": [ { "name": "caller", "signer": true }, { "name": "pool", "writable": true }, { "name": "authority", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] } ] }, { "name": "settlement" }, { "name": "settlement_inventory", "writable": true, "optional": true }, { "name": "settlement_vault", "writable": true, "optional": true }, { "name": "quote_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 111, 108, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool_accounts.pool", "account": "ClosePoolAccounts" } ] } }, { "name": "pump_program", "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { "name": "market", "writable": true, "relations": [ "position" ] }, { "name": "economics", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 99, 111, 110, 111, 109, 105, 99, 115, 45, 118, 49 ] } ] } }, { "name": "asset" }, { "name": "position", "writable": true }, { "name": "ownership", "accounts": [ { "name": "exposure", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 120, 112, 111, 115, 117, 114, 101 ] }, { "kind": "account", "path": "exposure.owner", "account": "UserExposure" } ] } }, { "name": "settlement_valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "ownership_pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 112, 111, 111, 108 ] }, { "kind": "account", "path": "ownership_pool.pool", "account": "OwnershipPool" } ] } }, { "name": "ownership_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "ownership_trader.pool", "account": "OwnershipTrader" }, { "kind": "account", "path": "ownership_trader.owner", "account": "OwnershipTrader" } ] } }, { "name": "ownership_receipt", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 114, 101, 99, 101, 105, 112, 116 ] }, { "kind": "account", "path": "ownership_receipt.position", "account": "OwnershipReceipt" } ] } } ] }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool_accounts.pool", "account": "ClosePoolAccounts" }, { "kind": "account", "path": "asset" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool_accounts.pool", "account": "ClosePoolAccounts" }, { "kind": "account", "path": "asset" } ] } }, { "name": "fees", "accounts": [ { "name": "gas_reserve", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 103, 97, 115, 45, 114, 101, 115, 101, 114, 118, 101 ] } ] } }, { "name": "perp", "docs": [ "Bound to the pool's own settlement token in the handler." ] }, { "name": "perp_mint", "writable": true }, { "name": "perp_program" }, { "name": "perp_vault", "writable": true }, { "name": "main_pool", "optional": true }, { "name": "main_ownership_pool", "writable": true, "optional": true }, { "name": "main_inventory", "writable": true, "optional": true }, { "name": "main_vault", "writable": true, "optional": true }, { "name": "gas_asset" }, { "name": "gas_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "gas_vault", "writable": true }, { "name": "gas_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "venue", "docs": [ "Created venues only: the venue record and its SDICE buyback vault." ], "writable": true, "optional": true }, { "name": "buyback_vault", "writable": true, "optional": true } ] }, { "name": "bridge", "accounts": [ { "name": "config", "docs": [ "The root config or a venue config; it owns this venue's settlement sequence." ], "writable": true, "relations": [ "custody" ] }, { "name": "custody", "writable": true }, { "name": "trader" }, { "name": "guard", "docs": [ "and opening/closing collateral quotes, not the retired historical floor.", "Its client may alias config here to avoid an unused account lock." ] } ] } ], "args": [ { "name": "sell_count", "type": "u8" }, { "name": "min_swap_out", "type": "u64" }, { "name": "market_accounts", "type": "u8" }, { "name": "fee_sell_count", "type": "u8" }, { "name": "perp_buy_count", "type": "u8" }, { "name": "min_perp", "type": "u64" }, { "name": "min_gas", "type": "u64" } ] }, { "name": "close_backed", "discriminator": [ 93, 94, 18, 43, 122, 50, 118, 203 ], "accounts": [ { "name": "quote_publisher", "signer": true }, { "name": "pool_accounts", "accounts": [ { "name": "caller", "signer": true }, { "name": "pool", "writable": true }, { "name": "authority", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] } ] }, { "name": "settlement" }, { "name": "settlement_inventory", "writable": true, "optional": true }, { "name": "settlement_vault", "writable": true, "optional": true }, { "name": "quote_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 111, 108, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool_accounts.pool", "account": "ClosePoolAccounts" } ] } }, { "name": "pump_program", "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { "name": "market", "writable": true, "relations": [ "position" ] }, { "name": "economics", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 99, 111, 110, 111, 109, 105, 99, 115, 45, 118, 49 ] } ] } }, { "name": "asset" }, { "name": "position", "writable": true }, { "name": "ownership", "accounts": [ { "name": "exposure", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 120, 112, 111, 115, 117, 114, 101 ] }, { "kind": "account", "path": "exposure.owner", "account": "UserExposure" } ] } }, { "name": "settlement_valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "ownership_pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 112, 111, 111, 108 ] }, { "kind": "account", "path": "ownership_pool.pool", "account": "OwnershipPool" } ] } }, { "name": "ownership_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "ownership_trader.pool", "account": "OwnershipTrader" }, { "kind": "account", "path": "ownership_trader.owner", "account": "OwnershipTrader" } ] } }, { "name": "ownership_receipt", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 114, 101, 99, 101, 105, 112, 116 ] }, { "kind": "account", "path": "ownership_receipt.position", "account": "OwnershipReceipt" } ] } } ] }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool_accounts.pool", "account": "ClosePoolAccounts" }, { "kind": "account", "path": "asset" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool_accounts.pool", "account": "ClosePoolAccounts" }, { "kind": "account", "path": "asset" } ] } }, { "name": "fees", "accounts": [ { "name": "gas_reserve", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 103, 97, 115, 45, 114, 101, 115, 101, 114, 118, 101 ] } ] } }, { "name": "perp", "docs": [ "Bound to the pool's own settlement token in the handler." ] }, { "name": "perp_mint", "writable": true }, { "name": "perp_program" }, { "name": "perp_vault", "writable": true }, { "name": "main_pool", "optional": true }, { "name": "main_ownership_pool", "writable": true, "optional": true }, { "name": "main_inventory", "writable": true, "optional": true }, { "name": "main_vault", "writable": true, "optional": true }, { "name": "gas_asset" }, { "name": "gas_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "gas_vault", "writable": true }, { "name": "gas_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "venue", "docs": [ "Created venues only: the venue record and its SDICE buyback vault." ], "writable": true, "optional": true }, { "name": "buyback_vault", "writable": true, "optional": true } ] }, { "name": "bridge", "accounts": [ { "name": "config", "docs": [ "The root config or a venue config; it owns this venue's settlement sequence." ], "writable": true, "relations": [ "custody" ] }, { "name": "custody", "writable": true }, { "name": "trader" }, { "name": "guard", "docs": [ "and opening/closing collateral quotes, not the retired historical floor.", "Its client may alias config here to avoid an unused account lock." ] } ] } ], "args": [ { "name": "sell_count", "type": "u8" }, { "name": "min_swap_out", "type": "u64" }, { "name": "market_accounts", "type": "u8" }, { "name": "fee_sell_count", "type": "u8" }, { "name": "perp_buy_count", "type": "u8" }, { "name": "min_perp", "type": "u64" }, { "name": "min_gas", "type": "u64" }, { "name": "sol_quote", "type": { "defined": { "name": "SolUsdQuote" } } } ] }, { "name": "create_feed", "discriminator": [ 173, 86, 95, 94, 13, 193, 67, 180 ], "accounts": [ { "name": "admin", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "feed", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 102, 101, 101, 100 ] }, { "kind": "arg", "path": "id" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "id", "type": "u16" }, { "name": "symbol", "type": { "array": [ "u8", 12 ] } } ] }, { "name": "create_gas_vault", "discriminator": [ 217, 122, 102, 70, 242, 94, 192, 57 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "pool" }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "gas_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "gas_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 103, 97, 115, 45, 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "create_inventory", "discriminator": [ 199, 244, 185, 148, 32, 239, 38, 138 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "pool" }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "asset" }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "create_market", "discriminator": [ 103, 226, 97, 235, 200, 188, 251, 254 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config" }, { "name": "pool" }, { "name": "feed" }, { "name": "market", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "create_pool", "discriminator": [ 233, 146, 209, 142, 207, 104, 64, 188 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 111, 108 ] }, { "kind": "arg", "path": "id" } ] } }, { "name": "settlement" }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "quote_mint" }, { "name": "quote_program" }, { "name": "quote_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "id", "type": "u16" } ] }, { "name": "create_venue", "docs": [ "\"Create a market\": a new venue backed by a registered pump.fun token." ], "discriminator": [ 162, 203, 21, 140, 131, 95, 73, 87 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "root" ] }, { "name": "creator" }, { "name": "root", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "root_pool", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 111, 108 ] }, { "kind": "const", "value": [ 0, 0 ] } ] } }, { "name": "asset", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "account", "path": "asset.mint", "account": "Asset" } ] } }, { "name": "mint" }, { "name": "config", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] }, { "kind": "account", "path": "mint" } ] } }, { "name": "venue", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 101, 110, 117, 101 ] }, { "kind": "account", "path": "config" } ] } }, { "name": "pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 111, 108 ] }, { "kind": "account", "path": "config" }, { "kind": "const", "value": [ 0, 0 ] } ] } }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "swap_mint" }, { "name": "quote_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "quote_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 111, 108, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "buyback_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 121, 98, 97, 99, 107 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "payout_mint" }, { "name": "payout_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "deposit_collateral", "discriminator": [ 156, 131, 142, 116, 146, 247, 162, 120 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "custody" ] }, { "name": "config", "relations": [ "custody" ] }, { "name": "pool", "relations": [ "custody", "inventory" ] }, { "name": "custody", "writable": true }, { "name": "asset", "relations": [ "inventory" ] }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "source", "writable": true }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "amount", "type": "u64" } ] }, { "name": "deposit_gas_revenue", "discriminator": [ 48, 227, 246, 111, 59, 180, 12, 158 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "gas_reserve", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 103, 97, 115, 45, 114, 101, 115, 101, 114, 118, 101 ] } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "amount", "type": "u64" } ] }, { "name": "enable_platform_collateral", "docs": [ "Enable only the configured core settlement asset as a bet token.", "Devnet's platform mint has no mainnet source token before launch." ], "discriminator": [ 46, 161, 181, 75, 44, 219, 7, 39 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "pool", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 111, 108 ] }, { "kind": "const", "value": [ 0, 0 ] } ] } }, { "name": "asset", "writable": true } ], "args": [] }, { "name": "enable_sol_collateral", "discriminator": [ 50, 193, 253, 116, 121, 60, 34, 5 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "asset", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "const", "value": [ 6, 155, 136, 87, 254, 171, 129, 132, 251, 104, 127, 99, 70, 24, 192, 53, 218, 196, 57, 220, 26, 235, 59, 85, 152, 160, 240, 0, 0, 0, 0, 1 ] } ] } } ], "args": [] }, { "name": "er_change_core_stake", "discriminator": [ 171, 155, 234, 211, 226, 73, 223, 0 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "er_trader" ] }, { "name": "config", "relations": [ "er_trader" ] }, { "name": "pool", "relations": [ "er_trader" ] }, { "name": "er_trader", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "amount", "type": "u64" }, { "name": "unstake", "type": "bool" } ] }, { "name": "er_close", "discriminator": [ 176, 122, 84, 36, 29, 90, 191, 247 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "er_trader", "writable": true }, { "name": "er_risk", "writable": true }, { "name": "er_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "history", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "guard", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "core_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool.settlement", "account": "Pool" } ] } }, { "name": "config" }, { "name": "pool" } ], "args": [ { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "expires", "type": "i64" } ] }, { "name": "er_commit", "discriminator": [ 31, 119, 232, 31, 14, 20, 124, 253 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "relations": [ "er_trader", "guard" ] }, { "name": "er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 102, 101, 101, 45, 112, 97, 121, 101, 114 ] } ] } }, { "name": "er_trader", "writable": true }, { "name": "guard", "writable": true }, { "name": "magic_fee_vault", "writable": true }, { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" }, { "name": "magic_context", "writable": true, "address": "MagicContext1111111111111111111111111111111" } ], "args": [] }, { "name": "er_commit_prepaid", "discriminator": [ 220, 229, 57, 81, 89, 158, 12, 63 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "relations": [ "er_trader" ] }, { "name": "er_trader", "writable": true }, { "name": "magic_fee_vault", "writable": true }, { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" }, { "name": "magic_context", "writable": true, "address": "MagicContext1111111111111111111111111111111" } ], "args": [] }, { "name": "er_delegate_collateral_guard", "discriminator": [ 221, 216, 150, 108, 191, 161, 156, 107 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "owner" }, { "name": "config" }, { "name": "buffer_guard", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "guard" } ], "program": { "kind": "const", "value": [ 97, 56, 117, 106, 226, 97, 190, 125, 99, 105, 151, 29, 125, 143, 196, 13, 133, 213, 224, 127, 145, 167, 204, 214, 227, 221, 217, 13, 136, 29, 192, 22 ] } } }, { "name": "delegation_record_guard", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110 ] }, { "kind": "account", "path": "guard" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "delegation_metadata_guard", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 45, 109, 101, 116, 97, 100, 97, 116, 97 ] }, { "kind": "account", "path": "guard" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "guard", "writable": true }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_delegate_collateral_history", "discriminator": [ 179, 138, 200, 207, 137, 130, 63, 39 ], "accounts": [ { "name": "admin", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "asset", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "account", "path": "asset.mint", "account": "Asset" } ] } }, { "name": "buffer_history", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "history" } ], "program": { "kind": "const", "value": [ 97, 56, 117, 106, 226, 97, 190, 125, 99, 105, 151, 29, 125, 143, 196, 13, 133, 213, 224, 127, 145, 167, 204, 214, 227, 221, 217, 13, 136, 29, 192, 22 ] } } }, { "name": "delegation_record_history", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110 ] }, { "kind": "account", "path": "history" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "delegation_metadata_history", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 45, 109, 101, 116, 97, 100, 97, 116, 97 ] }, { "kind": "account", "path": "history" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "history", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "asset" } ] } }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_delegate_fee_payer", "discriminator": [ 235, 255, 84, 203, 23, 169, 216, 228 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "buffer_er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "er_fee_payer" } ], "program": { "kind": "const", "value": [ 97, 56, 117, 106, 226, 97, 190, 125, 99, 105, 151, 29, 125, 143, 196, 13, 133, 213, 224, 127, 145, 167, 204, 214, 227, 221, 217, 13, 136, 29, 192, 22 ] } } }, { "name": "delegation_record_er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110 ] }, { "kind": "account", "path": "er_fee_payer" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "delegation_metadata_er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 45, 109, 101, 116, 97, 100, 97, 116, 97 ] }, { "kind": "account", "path": "er_fee_payer" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 102, 101, 101, 45, 112, 97, 121, 101, 114 ] } ] } }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_delegate_quote", "discriminator": [ 70, 129, 90, 61, 68, 165, 62, 73 ], "accounts": [ { "name": "admin", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "asset", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "account", "path": "asset.mint", "account": "Asset" } ] } }, { "name": "buffer_er_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "er_quote" } ], "program": { "kind": "const", "value": [ 97, 56, 117, 106, 226, 97, 190, 125, 99, 105, 151, 29, 125, 143, 196, 13, 133, 213, 224, 127, 145, 167, 204, 214, 227, 221, 217, 13, 136, 29, 192, 22 ] } } }, { "name": "delegation_record_er_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110 ] }, { "kind": "account", "path": "er_quote" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "delegation_metadata_er_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 45, 109, 101, 116, 97, 100, 97, 116, 97 ] }, { "kind": "account", "path": "er_quote" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "er_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "asset" } ] } }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_delegate_risk", "discriminator": [ 165, 37, 195, 98, 92, 230, 213, 246 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config" }, { "name": "buffer_er_risk", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "er_risk" } ], "program": { "kind": "const", "value": [ 97, 56, 117, 106, 226, 97, 190, 125, 99, 105, 151, 29, 125, 143, 196, 13, 133, 213, 224, 127, 145, 167, 204, 214, 227, 221, 217, 13, 136, 29, 192, 22 ] } } }, { "name": "delegation_record_er_risk", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110 ] }, { "kind": "account", "path": "er_risk" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "delegation_metadata_er_risk", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 45, 109, 101, 116, 97, 100, 97, 116, 97 ] }, { "kind": "account", "path": "er_risk" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "er_risk", "writable": true }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_delegate_trader", "discriminator": [ 214, 127, 159, 254, 8, 196, 236, 1 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "owner", "signer": true }, { "name": "config" }, { "name": "buffer_er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "er_trader" } ], "program": { "kind": "const", "value": [ 97, 56, 117, 106, 226, 97, 190, 125, 99, 105, 151, 29, 125, 143, 196, 13, 133, 213, 224, 127, 145, 167, 204, 214, 227, 221, 217, 13, 136, 29, 192, 22 ] } } }, { "name": "delegation_record_er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110 ] }, { "kind": "account", "path": "er_trader" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "delegation_metadata_er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 45, 109, 101, 116, 97, 100, 97, 116, 97 ] }, { "kind": "account", "path": "er_trader" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "er_trader", "writable": true }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_force_core_close", "discriminator": [ 85, 60, 171, 156, 24, 175, 15, 216 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "er_trader", "writable": true }, { "name": "er_risk", "writable": true }, { "name": "er_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "history", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "guard", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "core_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool.settlement", "account": "Pool" } ] } }, { "name": "config" }, { "name": "pool" } ], "args": [ { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "expires", "type": "i64" } ] }, { "name": "er_forfeit_history_gap", "discriminator": [ 182, 169, 210, 60, 61, 225, 165, 243 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "er_trader" ] }, { "name": "er_trader", "writable": true }, { "name": "guard", "writable": true }, { "name": "er_risk" }, { "name": "oracle" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "expires", "type": "i64" } ] }, { "name": "er_initialize_collateral_guard", "discriminator": [ 173, 250, 96, 243, 132, 59, 197, 53 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "owner" }, { "name": "config" }, { "name": "guard", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_initialize_collateral_history", "discriminator": [ 0, 61, 104, 140, 242, 228, 73, 245 ], "accounts": [ { "name": "admin", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "asset", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "account", "path": "asset.mint", "account": "Asset" } ] } }, { "name": "history", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "asset" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_initialize_fee_payer", "discriminator": [ 36, 95, 48, 66, 191, 138, 192, 231 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 102, 101, 101, 45, 112, 97, 121, 101, 114 ] } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "lamports", "type": "u64" } ] }, { "name": "er_initialize_quote", "discriminator": [ 217, 105, 104, 16, 57, 108, 94, 129 ], "accounts": [ { "name": "admin", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "asset", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "account", "path": "asset.mint", "account": "Asset" } ] } }, { "name": "er_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "asset" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_initialize_risk", "discriminator": [ 102, 202, 191, 241, 8, 53, 138, 187 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config" }, { "name": "er_risk", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_initialize_trader", "discriminator": [ 30, 182, 8, 133, 44, 83, 102, 134 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "owner", "signer": true, "relations": [ "er_custody" ] }, { "name": "config", "relations": [ "er_custody" ] }, { "name": "pool", "relations": [ "er_custody" ] }, { "name": "er_trader", "writable": true }, { "name": "er_custody" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "er_observe", "discriminator": [ 220, 229, 210, 124, 252, 89, 232, 31 ], "accounts": [ { "name": "er_trader", "writable": true }, { "name": "er_risk" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "er_observe_collateral", "discriminator": [ 215, 112, 137, 216, 20, 131, 76, 226 ], "accounts": [ { "name": "er_trader" }, { "name": "guard", "writable": true }, { "name": "history", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "history.asset", "account": "CollateralHistory" } ] } }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "er_open", "discriminator": [ 106, 132, 210, 79, 61, 90, 195, 6 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "er_trader", "guard" ] }, { "name": "config", "relations": [ "er_trader", "er_risk", "guard" ] }, { "name": "er_trader", "writable": true }, { "name": "er_risk", "writable": true }, { "name": "asset", "relations": [ "er_quote", "history" ] }, { "name": "er_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "asset" } ] } }, { "name": "history", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "asset" } ] } }, { "name": "guard", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "core_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool.settlement", "account": "Pool" } ] } }, { "name": "gas_authority", "signer": true }, { "name": "pool", "docs": [ "The venue pool; its settlement token is this venue's core stake." ] } ], "args": [ { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "market", "type": "u16" }, { "name": "amount", "type": "u64" }, { "name": "leverage", "type": "u16" }, { "name": "long", "type": "bool" }, { "name": "limit_price", "type": "u64" }, { "name": "min_value", "type": "u64" }, { "name": "max_value", "type": "u64" }, { "name": "expires", "type": "i64" } ] }, { "name": "er_publish_mainnet_quote", "discriminator": [ 79, 75, 0, 19, 146, 165, 232, 76 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] }, "relations": [ "er_quote", "history" ] }, { "name": "er_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "history", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "observation", "type": { "defined": { "name": "MainnetCollateralObservation" } } } ] }, { "name": "er_publish_quote", "discriminator": [ 135, 60, 103, 81, 131, 45, 87, 30 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] }, "relations": [ "er_quote", "history" ] }, { "name": "er_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "history", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "base_reserve", "type": "u64" }, { "name": "quote_reserve", "type": "u64" }, { "name": "fee_bps", "type": { "array": [ "u16", 3 ] } }, { "name": "publish_time", "type": "i64" }, { "name": "source_slot", "type": "u64" } ] }, { "name": "er_recover_collateral", "discriminator": [ 162, 190, 60, 191, 221, 211, 167, 173 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "relations": [ "er_trader", "guard" ] }, { "name": "er_trader" }, { "name": "guard", "writable": true }, { "name": "history", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "history.asset", "account": "CollateralHistory" } ] } }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "recovery", "type": { "defined": { "name": "CollateralRecovery" } } } ] }, { "name": "er_release_legacy_trader", "discriminator": [ 16, 226, 93, 167, 71, 138, 94, 47 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config" }, { "name": "owner" }, { "name": "er_trader", "writable": true }, { "name": "er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 102, 101, 101, 45, 112, 97, 121, 101, 114 ] } ] } }, { "name": "magic_fee_vault", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" }, { "name": "magic_context", "writable": true, "address": "MagicContext1111111111111111111111111111111" } ], "args": [] }, { "name": "er_release_prepaid", "discriminator": [ 110, 47, 45, 184, 200, 235, 166, 59 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "er_trader" ] }, { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "relations": [ "er_trader" ] }, { "name": "er_trader", "writable": true }, { "name": "magic_fee_vault", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" }, { "name": "magic_context", "writable": true, "address": "MagicContext1111111111111111111111111111111" } ], "args": [] }, { "name": "er_release_trader", "discriminator": [ 197, 59, 131, 50, 25, 219, 62, 24 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config" }, { "name": "owner" }, { "name": "er_trader", "writable": true }, { "name": "er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 102, 101, 101, 45, 112, 97, 121, 101, 114 ] } ] } }, { "name": "magic_fee_vault", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" }, { "name": "magic_context", "writable": true, "address": "MagicContext1111111111111111111111111111111" } ], "args": [] }, { "name": "er_release_wallet_capacity", "discriminator": [ 51, 3, 135, 173, 92, 254, 117, 60 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] }, "relations": [ "er_fee_payer" ] }, { "name": "owner" }, { "name": "er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "guard", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 103, 117, 97, 114, 100 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "er_fee_payer", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 102, 101, 101, 45, 112, 97, 121, 101, 114 ] } ] } }, { "name": "magic_fee_vault", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" }, { "name": "magic_context", "writable": true, "address": "MagicContext1111111111111111111111111111111" } ], "args": [] }, { "name": "er_sample", "discriminator": [ 62, 209, 32, 12, 13, 91, 50, 111 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "relations": [ "er_risk", "sol_quote", "sol_history" ] }, { "name": "er_risk", "writable": true }, { "name": "btc_oracle" }, { "name": "zec_oracle" }, { "name": "sol_oracle" }, { "name": "eth_oracle" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "sol_quote", "writable": true, "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "const", "value": [ 208, 30, 38, 182, 177, 226, 205, 59, 184, 48, 50, 15, 127, 226, 226, 233, 94, 251, 23, 167, 232, 245, 254, 224, 172, 121, 245, 118, 226, 82, 98, 38 ] } ] } }, { "name": "sol_history", "writable": true, "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "const", "value": [ 208, 30, 38, 182, 177, 226, 205, 59, 184, 48, 50, 15, 127, 226, 226, 233, 94, 251, 23, 167, 232, 245, 254, 224, 172, 121, 245, 118, 226, 82, 98, 38 ] } ] } } ], "args": [] }, { "name": "er_sync", "discriminator": [ 59, 75, 163, 83, 44, 235, 229, 98 ], "accounts": [ { "name": "er_trader", "writable": true }, { "name": "er_risk", "writable": true }, { "name": "er_custody" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "er_waive_unverified_profit", "discriminator": [ 46, 195, 165, 126, 0, 26, 211, 226 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "er_trader", "writable": true }, { "name": "er_risk", "writable": true }, { "name": "er_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "history", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 104, 105, 115, 116, 111, 114, 121 ] }, { "kind": "account", "path": "er_quote.asset", "account": "ErQuote" } ] } }, { "name": "guard", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "core_quote", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool.settlement", "account": "Pool" } ] } }, { "name": "config" }, { "name": "pool" } ], "args": [ { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "expires", "type": "i64" } ] }, { "name": "er_withdraw", "discriminator": [ 0, 82, 92, 215, 247, 115, 181, 153 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "er_trader" ] }, { "name": "er_trader", "writable": true }, { "name": "er_risk", "writable": true }, { "name": "asset" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "amount", "type": "u64" }, { "name": "expires", "type": "i64" } ] }, { "name": "initialize", "discriminator": [ 175, 175, 109, 31, 13, 152, 155, 237 ], "accounts": [ { "name": "admin", "writable": true, "signer": true }, { "name": "config", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "quote_mint" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "publisher", "type": "pubkey" } ] }, { "name": "initialize_custody", "discriminator": [ 229, 218, 228, 120, 208, 239, 223, 234 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "owner", "signer": true }, { "name": "config" }, { "name": "pool" }, { "name": "custody", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "initialize_economics_v1", "discriminator": [ 190, 73, 160, 80, 167, 202, 252, 61 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "economics", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 99, 111, 110, 111, 109, 105, 99, 115, 45, 118, 49 ] } ] } }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "deadband", "type": "bool" } ] }, { "name": "initialize_exposure", "discriminator": [ 50, 48, 165, 218, 35, 160, 206, 228 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "owner" }, { "name": "exposure", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 120, 112, 111, 115, 117, 114, 101 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "initialize_gas", "discriminator": [ 67, 242, 233, 114, 95, 149, 101, 18 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "gas_reserve", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 103, 97, 115, 45, 114, 101, 115, 101, 114, 118, 101 ] } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "initialize_ownership", "discriminator": [ 34, 252, 241, 191, 160, 70, 71, 125 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "position" }, { "name": "ownership_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "position.pool", "account": "Position" }, { "kind": "account", "path": "position.owner", "account": "Position" } ] } }, { "name": "ownership_receipt", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 114, 101, 99, 101, 105, 112, 116 ] }, { "kind": "account", "path": "position" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "initialize_ownership_pool", "discriminator": [ 163, 145, 224, 50, 32, 112, 159, 165 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "pool" }, { "name": "ownership_pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 112, 111, 111, 108 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "initialize_sol_intermediate", "discriminator": [ 15, 17, 177, 219, 156, 248, 150, 108 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "pool", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 111, 108 ] }, { "kind": "const", "value": [ 0, 0 ] } ] } }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "sol_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 111, 108, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "migrate_core_account", "discriminator": [ 29, 191, 141, 204, 69, 47, 108, 49 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "payer", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "target", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "kind", "type": "u8" } ] }, { "name": "migrate_wallet_capacity", "discriminator": [ 141, 247, 49, 112, 12, 112, 190, 19 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "payer", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "owner" }, { "name": "er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "custody", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 117, 115, 116, 111, 100, 121 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "guard", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 45, 103, 117, 97, 114, 100 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "observe", "docs": [ "Frozen ER intents cannot be re-observed or repriced on the base layer." ], "discriminator": [ 204, 78, 178, 115, 194, 147, 65, 74 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "market", "relations": [ "position" ] }, { "name": "feed", "relations": [ "market" ] }, { "name": "position", "writable": true } ], "args": [] }, { "name": "open", "docs": [ "Trading is only available through delegated ER state." ], "discriminator": [ 228, 220, 155, 71, 199, 189, 60, 45 ], "accounts": [ { "name": "exposure", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 120, 112, 111, 115, 117, 114, 101 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "owner", "writable": true, "signer": true, "relations": [ "exposure" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "pool", "writable": true, "relations": [ "market" ] }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "market", "writable": true }, { "name": "feed", "relations": [ "market" ] }, { "name": "asset" }, { "name": "collateral_feed" }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "source", "writable": true }, { "name": "position", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 115, 105, 116, 105, 111, 110 ] }, { "kind": "account", "path": "owner" }, { "kind": "arg", "path": "nonce" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "_nonce", "type": "u64" }, { "name": "_amount", "type": "u64" }, { "name": "_leverage", "type": "u16" }, { "name": "_long", "type": "bool" }, { "name": "_limit_price", "type": "u64" }, { "name": "_min_value", "type": "u64" }, { "name": "_max_value", "type": "u64" } ] }, { "name": "pause", "discriminator": [ 211, 22, 221, 251, 74, 121, 193, 47 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config", "docs": [ "The root or any venue config; each venue pauses independently." ], "writable": true } ], "args": [ { "name": "paused", "type": "bool" } ] }, { "name": "prepare_settlement", "discriminator": [ 171, 178, 160, 24, 97, 190, 39, 143 ], "accounts": [ { "name": "payer", "writable": true, "signer": true }, { "name": "owner", "relations": [ "custody" ] }, { "name": "config", "relations": [ "custody" ] }, { "name": "pool", "relations": [ "market", "custody" ] }, { "name": "market" }, { "name": "asset" }, { "name": "trader" }, { "name": "custody" }, { "name": "position", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "nonce", "type": "u64" }, { "name": "slot", "type": "u8" } ] }, { "name": "process_undelegation", "discriminator": [ 196, 28, 41, 206, 48, 37, 51, 167 ], "accounts": [ { "name": "base_account", "writable": true }, { "name": "buffer", "pda": { "seeds": [ { "kind": "const", "value": [ 117, 110, 100, 101, 108, 101, 103, 97, 116, 101, 45, 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "base_account" } ], "program": { "kind": "const", "value": [ 181, 183, 0, 225, 242, 87, 58, 192, 204, 6, 34, 1, 52, 74, 207, 151, 184, 53, 6, 235, 140, 229, 25, 152, 204, 98, 126, 24, 147, 128, 167, 62 ] } } }, { "name": "payer", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "account_seeds", "type": { "vec": "bytes" } } ] }, { "name": "publish", "discriminator": [ 129, 177, 182, 160, 184, 224, 219, 5 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "feed", "writable": true } ], "args": [ { "name": "price", "type": "u64" }, { "name": "timestamp", "type": "i64" }, { "name": "source_slot", "type": "u64" }, { "name": "base_reserve", "type": "u64" }, { "name": "quote_reserve", "type": "u64" }, { "name": "real_quote_reserve", "type": "u64" }, { "name": "quote_usd", "type": "u64" }, { "name": "quote_decimals", "type": "u8" }, { "name": "fee_bps", "type": { "array": [ "u16", 3 ] } } ] }, { "name": "recover_core_trader", "discriminator": [ 168, 53, 14, 203, 90, 3, 157, 24 ], "accounts": [ { "name": "request", "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "payer", "docs": [ "DLP verifies this is the original delegation rent payer." ], "writable": true, "signer": true }, { "name": "config" }, { "name": "owner" }, { "name": "er_trader", "writable": true }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "undelegation_request", "writable": true }, { "name": "delegation_record", "writable": true }, { "name": "delegation_metadata", "writable": true }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ] }, { "name": "commit_state", "writable": true }, { "name": "commit_record", "writable": true } ], "args": [ { "name": "expected_hash", "type": { "array": [ "u8", 32 ] } } ] }, { "name": "recycle_position", "docs": [ "Reinvest completed position/receipt rent in the next trade, atomically.", "The following PrepareSettlement and InitializeOwnership are mandatory: a sponsored", "account's rent cannot be withdrawn as a free SOL grant." ], "discriminator": [ 135, 16, 190, 198, 115, 84, 217, 101 ], "accounts": [ { "name": "executor", "writable": true, "signer": true }, { "name": "owner", "relations": [ "position", "ownership_receipt" ] }, { "name": "pool", "relations": [ "position", "ownership_receipt" ] }, { "name": "position", "writable": true, "relations": [ "ownership_receipt" ] }, { "name": "ownership_receipt", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 114, 101, 99, 101, 105, 112, 116 ] }, { "kind": "account", "path": "position" } ] } }, { "name": "next_position" }, { "name": "next_receipt", "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 114, 101, 99, 101, 105, 112, 116 ] }, { "kind": "account", "path": "next_position" } ] } }, { "name": "instructions", "address": "Sysvar1nstructions1111111111111111111111111" } ], "args": [ { "name": "new_nonce", "type": "u64" } ] }, { "name": "redeem", "discriminator": [ 184, 12, 86, 149, 70, 196, 97, 225 ], "accounts": [ { "name": "owner", "writable": true, "signer": true, "relations": [ "position" ] }, { "name": "pool", "writable": true, "relations": [ "position" ] }, { "name": "authority", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "position", "writable": true }, { "name": "collateral", "relations": [ "position" ] }, { "name": "asset" }, { "name": "feed", "relations": [ "asset" ] }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "destination", "writable": true }, { "name": "quote_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "pump_program", "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { "name": "conversion_vault", "writable": true, "optional": true }, { "name": "converted_destination", "writable": true, "optional": true }, { "name": "collateral_mint", "optional": true }, { "name": "collateral_program", "optional": true } ], "args": [ { "name": "amount", "type": "u64" }, { "name": "max_debit", "type": "u64" }, { "name": "expires", "type": "i64" }, { "name": "convert", "type": "bool" }, { "name": "sell_count", "type": "u8" }, { "name": "min_out", "type": "u64" } ] }, { "name": "redeem_usdc", "docs": [ "Permissionless FIFO settlement. All sizing and destination checks are on chain;", "a keeper pays network fees but cannot redirect funds or choose the claim debit." ], "discriminator": [ 101, 142, 246, 184, 198, 56, 92, 174 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "config", "docs": [ "Any config: every venue shares the root's USD quote mint." ] }, { "name": "pool", "writable": true, "relations": [ "position" ] }, { "name": "authority", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "position", "writable": true }, { "name": "asset" }, { "name": "valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "quote_mint" }, { "name": "quote_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "quote_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "destination", "writable": true }, { "name": "pump_program", "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { "name": "sol_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 111, 108, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "pool" } ] } } ], "args": [] }, { "name": "redelegate_core_trader", "discriminator": [ 207, 207, 69, 37, 187, 171, 200, 144 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "payer", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "owner" }, { "name": "buffer_er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 102, 102, 101, 114 ] }, { "kind": "account", "path": "er_trader" } ], "program": { "kind": "const", "value": [ 97, 56, 117, 106, 226, 97, 190, 125, 99, 105, 151, 29, 125, 143, 196, 13, 133, 213, 224, 127, 145, 167, 204, 214, 227, 221, 217, 13, 136, 29, 192, 22 ] } } }, { "name": "delegation_record_er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110 ] }, { "kind": "account", "path": "er_trader" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "delegation_metadata_er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 45, 109, 101, 116, 97, 100, 97, 116, 97 ] }, { "kind": "account", "path": "er_trader" } ], "program": { "kind": "account", "path": "delegation_program" } } }, { "name": "er_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 114, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "owner" } ] } }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "refill_sponsor", "discriminator": [ 212, 210, 18, 240, 37, 50, 86, 2 ], "accounts": [ { "name": "publisher", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "gas_reserve", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 103, 97, 115, 45, 114, 101, 115, 101, 114, 118, 101 ] } ] } } ], "args": [ { "name": "amount", "type": "u64" } ] }, { "name": "refresh_limits", "discriminator": [ 64, 119, 140, 118, 3, 136, 124, 143 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "market", "writable": true } ], "args": [] }, { "name": "register_asset", "discriminator": [ 21, 80, 155, 149, 117, 207, 235, 16 ], "accounts": [ { "name": "admin", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "feed" }, { "name": "asset", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "account", "path": "mint" } ] } }, { "name": "mint" }, { "name": "token_program" }, { "name": "valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "source_mint", "type": "pubkey" }, { "name": "source_pool", "type": "pubkey" }, { "name": "collateral_enabled", "type": "bool" } ] }, { "name": "register_quote_collateral", "docs": [ "Register only the configured six-decimal settlement quote as dollar collateral." ], "discriminator": [ 28, 16, 235, 126, 146, 250, 34, 239 ], "accounts": [ { "name": "admin", "writable": true, "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "feed", "pda": { "seeds": [ { "kind": "const", "value": [ 102, 101, 101, 100 ] }, { "kind": "const", "value": [ 104, 0 ] } ] } }, { "name": "mint" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "asset", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 115, 115, 101, 116 ] }, { "kind": "account", "path": "mint" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "request_core_undelegation", "discriminator": [ 9, 207, 50, 111, 48, 102, 1, 144 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "payer", "docs": [ "DLP verifies this is the original delegation rent payer." ], "writable": true, "signer": true }, { "name": "config" }, { "name": "owner" }, { "name": "er_trader", "writable": true }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "undelegation_request", "writable": true }, { "name": "delegation_record", "writable": true }, { "name": "delegation_metadata", "writable": true }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "request_trader_release", "discriminator": [ 95, 128, 145, 52, 68, 189, 88, 221 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "payer", "docs": [ "DLP verifies this is the original delegation rent payer." ], "writable": true, "signer": true }, { "name": "config" }, { "name": "owner" }, { "name": "er_trader", "writable": true }, { "name": "owner_program", "address": "7YWUnPaP5tQjJTC5kZu235P5Qix2VpoJk5rTMgkXeCw7" }, { "name": "undelegation_request", "writable": true }, { "name": "delegation_record", "writable": true }, { "name": "delegation_metadata", "writable": true }, { "name": "delegation_program", "address": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "route_buyback", "docs": [ "Buy and burn SDICE with a venue's 1% allocation, without spending root inventory." ], "discriminator": [ 9, 253, 29, 56, 37, 228, 80, 8 ], "accounts": [ { "name": "publisher", "signer": true, "relations": [ "root" ] }, { "name": "root", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "venue", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 101, 110, 117, 101 ] }, { "kind": "account", "path": "venue.config", "account": "Venue" } ] } }, { "name": "pool" }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "buyback_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 98, 117, 121, 98, 97, 99, 107 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "root_pool", "pda": { "seeds": [ { "kind": "const", "value": [ 112, 111, 111, 108 ] }, { "kind": "const", "value": [ 0, 0 ] } ] } }, { "name": "root_authority", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "root_pool" } ] } }, { "name": "sdice" }, { "name": "sdice_mint", "writable": true }, { "name": "sdice_program" }, { "name": "sdice_valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "root_inventory", "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "root_pool" }, { "kind": "account", "path": "sdice" } ] } }, { "name": "root_vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "root_pool" }, { "kind": "account", "path": "sdice" } ] } }, { "name": "root_quote", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 115, 111, 108, 45, 113, 117, 111, 116, 101 ] }, { "kind": "account", "path": "root_pool" } ] } }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "pump_program", "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "amount", "type": "u64" }, { "name": "min_out", "type": "u64" } ] }, { "name": "settle_withdrawal", "discriminator": [ 107, 168, 201, 20, 9, 243, 200, 142 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "config", "relations": [ "custody" ] }, { "name": "pool", "relations": [ "custody", "inventory" ] }, { "name": "custody", "writable": true }, { "name": "trader" }, { "name": "asset", "relations": [ "inventory" ] }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "destination", "writable": true } ], "args": [ { "name": "nonce", "type": "u64" }, { "name": "slot", "type": "u8" } ] }, { "name": "stake_ownership", "discriminator": [ 196, 205, 6, 111, 62, 68, 79, 77 ], "accounts": [ { "name": "owner", "signer": true, "relations": [ "ownership_trader" ] }, { "name": "pool", "relations": [ "ownership_pool", "ownership_trader", "inventory" ] }, { "name": "ownership_pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 112, 111, 111, 108 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "ownership_trader", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 116, 114, 97, 100, 101, 114 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "owner" } ] } }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "pool.settlement", "account": "Pool" } ] } } ], "args": [ { "name": "amount", "type": "u128" }, { "name": "unstake", "type": "bool" } ] }, { "name": "sweep_dust", "discriminator": [ 9, 49, 242, 88, 156, 84, 109, 15 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "pool", "writable": true, "relations": [ "position" ] }, { "name": "position", "writable": true } ], "args": [] }, { "name": "sweep_surplus", "discriminator": [ 144, 67, 197, 177, 218, 200, 50, 24 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "pool", "relations": [ "ownership_pool" ] }, { "name": "settlement" }, { "name": "valuation", "accounts": [ { "name": "dex_pool" }, { "name": "dex_base" }, { "name": "dex_quote" }, { "name": "fee_config" }, { "name": "dex_mint" }, { "name": "global_config" }, { "name": "usd_pool" }, { "name": "usd_mint" }, { "name": "usd_base" }, { "name": "usd_quote" }, { "name": "source_global" }, { "name": "source_fees" } ] }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "settlement" } ] } }, { "name": "ownership_pool", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 111, 119, 110, 101, 114, 115, 104, 105, 112, 45, 112, 111, 111, 108 ] }, { "kind": "account", "path": "pool" } ] } } ], "args": [] }, { "name": "withdraw_gas_surplus", "discriminator": [ 18, 111, 98, 119, 225, 48, 198, 121 ], "accounts": [ { "name": "admin", "signer": true, "relations": [ "config" ] }, { "name": "config", "pda": { "seeds": [ { "kind": "const", "value": [ 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "gas_reserve", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 103, 97, 115, 45, 114, 101, 115, 101, 114, 118, 101 ] } ] } }, { "name": "recipient", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "amount", "type": "u64" } ] }, { "name": "withdraw_prepaid_gas", "discriminator": [ 41, 41, 30, 225, 205, 29, 232, 29 ], "accounts": [ { "name": "owner", "writable": true, "signer": true, "relations": [ "er_trader" ] }, { "name": "publisher", "signer": true, "relations": [ "config" ] }, { "name": "config", "relations": [ "er_trader" ] }, { "name": "er_trader", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [] }, { "name": "withdraw_released_collateral", "discriminator": [ 144, 20, 161, 216, 210, 156, 241, 141 ], "accounts": [ { "name": "caller", "signer": true }, { "name": "owner", "docs": [ "keeper can pay for recovery but can only return funds to this owner." ], "relations": [ "trader", "custody" ] }, { "name": "config", "relations": [ "trader", "custody" ] }, { "name": "pool", "relations": [ "trader", "custody", "inventory" ] }, { "name": "trader", "writable": true }, { "name": "custody", "writable": true }, { "name": "asset", "relations": [ "inventory" ] }, { "name": "mint" }, { "name": "token_program" }, { "name": "inventory", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 105, 110, 118, 101, 110, 116, 111, 114, 121 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "authority", "pda": { "seeds": [ { "kind": "const", "value": [ 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "pool" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "pool" }, { "kind": "account", "path": "asset" } ] } }, { "name": "destination", "writable": true }, { "name": "execution", "accounts": [ { "name": "magic_program", "address": "Magic11111111111111111111111111111111111111" } ] } ], "args": [ { "name": "amount", "type": "u64" } ] } ], "accounts": [ { "name": "Asset", "discriminator": [ 234, 180, 241, 252, 139, 224, 160, 8 ] }, { "name": "CollateralGuard", "discriminator": [ 143, 121, 181, 102, 118, 182, 200, 117 ] }, { "name": "CollateralHistory", "discriminator": [ 220, 201, 113, 38, 141, 118, 152, 137 ] }, { "name": "Config", "discriminator": [ 155, 12, 170, 224, 30, 250, 204, 130 ] }, { "name": "EconomicsV1", "discriminator": [ 143, 44, 211, 130, 89, 88, 115, 151 ] }, { "name": "ErCustody", "discriminator": [ 43, 68, 143, 60, 222, 61, 7, 146 ] }, { "name": "ErFeePayer", "discriminator": [ 47, 207, 198, 147, 167, 213, 183, 223 ] }, { "name": "ErQuote", "discriminator": [ 200, 2, 185, 89, 151, 215, 25, 8 ] }, { "name": "ErRisk", "discriminator": [ 104, 143, 217, 226, 149, 194, 8, 197 ] }, { "name": "ErTrader", "discriminator": [ 41, 231, 232, 222, 232, 109, 188, 102 ] }, { "name": "Feed", "discriminator": [ 69, 191, 16, 227, 132, 187, 84, 227 ] }, { "name": "GasReserve", "discriminator": [ 113, 164, 5, 193, 188, 120, 108, 18 ] }, { "name": "Inventory", "discriminator": [ 97, 218, 167, 233, 216, 170, 49, 27 ] }, { "name": "Market", "discriminator": [ 219, 190, 213, 55, 0, 227, 198, 154 ] }, { "name": "OwnershipPool", "discriminator": [ 129, 52, 172, 74, 7, 129, 20, 26 ] }, { "name": "OwnershipReceipt", "discriminator": [ 24, 24, 88, 223, 195, 255, 26, 206 ] }, { "name": "OwnershipTrader", "discriminator": [ 22, 147, 26, 40, 179, 121, 213, 197 ] }, { "name": "Pool", "discriminator": [ 241, 154, 109, 4, 17, 177, 109, 188 ] }, { "name": "Position", "discriminator": [ 170, 188, 143, 228, 122, 64, 247, 208 ] }, { "name": "UserExposure", "discriminator": [ 120, 108, 154, 176, 50, 173, 115, 181 ] }, { "name": "Venue", "discriminator": [ 8, 155, 85, 226, 234, 173, 42, 242 ] } ], "events": [ { "name": "CollateralHistoryRecovered", "discriminator": [ 159, 32, 121, 247, 198, 43, 253, 6 ] }, { "name": "CollateralProfitWaived", "discriminator": [ 149, 210, 65, 102, 225, 76, 116, 252 ] }, { "name": "CoreCoverageApplied", "discriminator": [ 180, 82, 85, 174, 157, 2, 161, 62 ] }, { "name": "EconomicsActivated", "discriminator": [ 111, 231, 166, 18, 183, 93, 87, 78 ] }, { "name": "ErHistoryGapForfeited", "discriminator": [ 124, 72, 154, 106, 52, 108, 135, 33 ] }, { "name": "GasRevenueDeposited", "discriminator": [ 8, 12, 92, 22, 180, 249, 166, 129 ] }, { "name": "GasSurplusWithdrawn", "discriminator": [ 84, 160, 140, 92, 72, 68, 192, 55 ] }, { "name": "LossSplit", "discriminator": [ 33, 32, 151, 87, 142, 150, 219, 90 ] }, { "name": "OwnershipAwarded", "discriminator": [ 138, 239, 221, 131, 127, 234, 94, 35 ] }, { "name": "PositionRecycled", "discriminator": [ 147, 7, 48, 213, 254, 49, 28, 24 ] }, { "name": "ProfitPolicyApplied", "discriminator": [ 207, 164, 51, 83, 207, 181, 140, 69 ] }, { "name": "Redeemed", "discriminator": [ 14, 29, 183, 71, 31, 165, 107, 38 ] }, { "name": "RevenueSplit", "discriminator": [ 228, 74, 98, 74, 119, 222, 149, 232 ] }, { "name": "SdiceBuyback", "discriminator": [ 236, 69, 100, 154, 187, 232, 179, 196 ] }, { "name": "Settled", "discriminator": [ 232, 210, 40, 17, 142, 124, 145, 238 ] }, { "name": "VenueCreated", "discriminator": [ 43, 254, 195, 223, 129, 54, 53, 83 ] }, { "name": "VenueLossSplit", "discriminator": [ 124, 68, 183, 131, 115, 213, 30, 119 ] }, { "name": "WalletCapacityExpanded", "discriminator": [ 139, 79, 34, 6, 215, 230, 120, 23 ] } ], "errors": [ { "code": 6000, "name": "ProductionDisabled", "msg": "Devnet experiment only" }, { "code": 6001, "name": "Arithmetic", "msg": "Arithmetic overflow" }, { "code": 6002, "name": "Binding", "msg": "Invalid account or token binding" }, { "code": 6003, "name": "Leverage", "msg": "Leverage must be 1 to 1000" }, { "code": 6004, "name": "Quote", "msg": "Price or collateral quote unavailable" }, { "code": 6005, "name": "Stale", "msg": "Waiting for a fresh price" }, { "code": 6006, "name": "Replay", "msg": "Replayed source observation" }, { "code": 6007, "name": "Paused", "msg": "New positions paused" }, { "code": 6008, "name": "Amount", "msg": "Invalid bet amount" }, { "code": 6009, "name": "PriceLimit", "msg": "Price moved beyond your limit" }, { "code": 6010, "name": "Exposure", "msg": "Position or open-interest limit exceeded" }, { "code": 6011, "name": "Closed", "msg": "Position is already closed" }, { "code": 6012, "name": "History", "msg": "Observation history gap; settlement cannot be proven" }, { "code": 6013, "name": "Unauthorized", "msg": "Unauthorized wallet" }, { "code": 6014, "name": "SameSlot", "msg": "Wait two slots before closing" }, { "code": 6015, "name": "QuoteExpired", "msg": "Quote expired" }, { "code": 6016, "name": "NoClaim", "msg": "No unpaid claim" }, { "code": 6017, "name": "QueueOrder", "msg": "Earlier FIFO claims must be paid first" }, { "code": 6018, "name": "Inventory", "msg": "Insufficient free inventory" }, { "code": 6019, "name": "ClaimLimit", "msg": "Payout exceeds approved USD claim debit" }, { "code": 6020, "name": "Maker", "msg": "A valid funded maker signature is required" }, { "code": 6021, "name": "GasBudget", "msg": "Gas reserve spending limit or balance reached" } ], "types": [ { "name": "Asset", "type": { "kind": "struct", "fields": [ { "name": "id", "type": "u16" }, { "name": "feed", "type": "pubkey" }, { "name": "mint", "type": "pubkey" }, { "name": "token_program", "type": "pubkey" }, { "name": "source_mint", "type": "pubkey" }, { "name": "source_pool", "type": "pubkey" }, { "name": "quote_mint", "type": "pubkey" }, { "name": "dex_pool", "type": "pubkey" }, { "name": "collateral_enabled", "type": "bool" }, { "name": "decimals", "type": "u8" }, { "name": "bump", "type": "u8" } ] } }, { "name": "CollateralFloor", "type": { "kind": "struct", "fields": [ { "name": "nonce", "type": "u64" }, { "name": "value", "type": "u64" }, { "name": "cursor", "type": "u64" }, { "name": "incomplete", "type": "bool" }, { "name": "closed_at", "type": "i64" }, { "name": "exit", "type": "u64" }, { "name": "covered_at", "type": "i64" }, { "name": "entry_price", "docs": [ "USD/token in 1e12 units, captured from the entry observation. Supply,", "historical swap fees and bag size cannot change this price baseline." ], "type": "u64" } ] } }, { "name": "CollateralGuard", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "config", "type": "pubkey" }, { "name": "floors", "type": { "array": [ { "defined": { "name": "CollateralFloor" } }, 10 ] } }, { "name": "bump", "type": "u8" } ] } }, { "name": "CollateralHistory", "type": { "kind": "struct", "fields": [ { "name": "config", "type": "pubkey" }, { "name": "asset", "type": "pubkey" }, { "name": "sequence", "type": "u64" }, { "name": "source_slot", "type": "u64" }, { "name": "publish_time", "type": "i64" }, { "name": "last_gap", "docs": [ "A position spanning a monitoring outage cannot claim an unverified win." ], "type": "u64" }, { "name": "last_gap_start", "type": "i64" }, { "name": "is_quote", "type": "bool" }, { "name": "decimals", "type": "u8" }, { "name": "samples", "type": { "vec": { "defined": { "name": "CollateralSample" } } } }, { "name": "bump", "type": "u8" } ] } }, { "name": "CollateralHistoryRecovered", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "asset", "type": "pubkey" }, { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "opened_source_slot", "type": "u64" }, { "name": "closed_at", "type": "i64" }, { "name": "exit", "type": "u64" }, { "name": "value", "type": "u64" }, { "name": "evidence_hash", "type": { "array": [ "u8", 32 ] } } ] } }, { "name": "CollateralProfitWaived", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" } ] } }, { "name": "CollateralRecovery", "docs": [ "The existing trusted publisher attests an archived replay. This is not a", "trustless historical-state proof. Every immutable close field is bound to", "prevent cross-position reuse, and recovery can only reduce the stored floor." ], "type": { "kind": "struct", "fields": [ { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "opened_source_slot", "type": "u64" }, { "name": "closed_at", "type": "i64" }, { "name": "exit", "type": "u64" }, { "name": "value", "type": "u64" }, { "name": "evidence_hash", "type": { "array": [ "u8", 32 ] } } ] } }, { "name": "CollateralSample", "type": { "kind": "struct", "fields": [ { "name": "base", "type": "u64" }, { "name": "quote", "type": "u64" }, { "name": "fees", "type": { "array": [ "u16", 3 ] } }, { "name": "publish_time", "type": "i64" }, { "name": "mainnet", "type": { "defined": { "name": "MainnetCollateralContext" } } } ] } }, { "name": "Config", "type": { "kind": "struct", "fields": [ { "name": "admin", "type": "pubkey" }, { "name": "publisher", "type": "pubkey" }, { "name": "quote_mint", "type": "pubkey" }, { "name": "paused", "type": "bool" }, { "name": "bump", "type": "u8" }, { "name": "next_settlement_seq", "type": "u64" } ] } }, { "name": "CoreCoverageApplied", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "owner", "type": "pubkey" }, { "name": "closing_usd", "type": "u64" }, { "name": "core_tokens", "type": "u64" }, { "name": "covered_usd", "type": "u64" }, { "name": "uncovered_usd", "type": "u64" } ] } }, { "name": "CoreCoverageState", "type": { "kind": "struct", "fields": [ { "name": "debited_tokens", "type": "u64" }, { "name": "incurred_usd", "type": "u64" }, { "name": "repaid_usd", "type": "u64" } ] } }, { "name": "CoreStakeState", "type": { "kind": "struct", "fields": [ { "name": "tokens", "type": "u64" }, { "name": "acknowledged_debits", "type": "u64" }, { "name": "incurred_usd", "type": "u64" }, { "name": "repaid_usd", "type": "u64" } ] } }, { "name": "CustodyAsset", "type": { "kind": "struct", "fields": [ { "name": "asset", "type": "pubkey" }, { "name": "deposited_credits", "type": "u64" }, { "name": "returned_credits", "type": "u64" }, { "name": "available", "docs": [ "Total user custody, including collateral reserved by open ER positions." ], "type": "u64" }, { "name": "generation", "type": "u64" } ] } }, { "name": "EconomicsActivated", "type": { "kind": "struct", "fields": [ { "name": "activated_at", "type": "i64" }, { "name": "deadband", "type": "bool" } ] } }, { "name": "EconomicsV1", "type": { "kind": "struct", "fields": [ { "name": "activated_at", "type": "i64" }, { "name": "deadband", "type": "bool" }, { "name": "bump", "type": "u8" } ] } }, { "name": "ErBalance", "type": { "kind": "struct", "fields": [ { "name": "asset", "type": "pubkey" }, { "name": "credited_deposits", "type": "u64" }, { "name": "credited_returns", "type": "u64" }, { "name": "available", "type": "u64" }, { "name": "generation", "type": "u64" } ] } }, { "name": "ErCustody", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "config", "type": "pubkey" }, { "name": "pool", "type": "pubkey" }, { "name": "assets", "type": { "array": [ { "defined": { "name": "CustodyAsset" } }, 16 ] } }, { "name": "receipts", "type": { "array": [ { "defined": { "name": "ErReceipt" } }, 10 ] } }, { "name": "bump", "type": "u8" }, { "name": "core_coverage", "type": { "defined": { "name": "CoreCoverageState" } } }, { "name": "generation", "type": "u64" } ] } }, { "name": "ErFeePayer", "type": { "kind": "struct", "fields": [ { "name": "config", "type": "pubkey" }, { "name": "bump", "type": "u8" } ] } }, { "name": "ErHistoryGapForfeited", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "slot", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "margin", "type": "u64" }, { "name": "exit", "type": "u64" }, { "name": "cursor", "type": "u64" }, { "name": "sequence", "type": "u64" } ] } }, { "name": "ErMarket", "type": { "kind": "struct", "fields": [ { "name": "price", "type": "u64" }, { "name": "publish_time", "type": "i64" }, { "name": "source_slot", "type": "u64" }, { "name": "sequence", "type": "u64" }, { "name": "prices", "docs": [ "Sequence s is stored at s % 64. The current sequence identifies exactly", "which 64 entries remain, so storing a second u64 per entry is redundant." ], "type": { "array": [ "u64", 64 ] } }, { "name": "long_oi", "type": "u64" }, { "name": "short_oi", "type": "u64" }, { "name": "long_cap", "type": "u64" }, { "name": "short_cap", "type": "u64" } ] } }, { "name": "ErQuote", "type": { "kind": "struct", "fields": [ { "name": "config", "type": "pubkey" }, { "name": "asset", "type": "pubkey" }, { "name": "is_quote", "type": "bool" }, { "name": "base_reserve", "type": "u64" }, { "name": "quote_reserve", "type": "u64" }, { "name": "fee_bps", "type": { "array": [ "u16", 3 ] } }, { "name": "publish_time", "type": "i64" }, { "name": "source_slot", "type": "u64" }, { "name": "bump", "type": "u8" }, { "name": "mainnet", "type": { "defined": { "name": "MainnetCollateralContext" } } } ] } }, { "name": "ErReceipt", "type": { "kind": "struct", "fields": [ { "name": "nonce", "type": "u64" }, { "name": "position", "type": "pubkey" }, { "name": "kind", "type": "u8" }, { "name": "settled", "type": "bool" } ] } }, { "name": "ErRisk", "type": { "kind": "struct", "fields": [ { "name": "config", "type": "pubkey" }, { "name": "next_close_seq", "type": "u64" }, { "name": "cap_refreshed_at", "type": "i64" }, { "name": "markets", "docs": [ "Always initialized with exactly ER_MARKETS elements. Vec deserializes", "each market directly onto the heap instead of materializing a large array." ], "type": { "vec": { "defined": { "name": "ErMarket" } } } }, { "name": "bump", "type": "u8" } ] } }, { "name": "ErSlot", "type": { "kind": "struct", "fields": [ { "name": "state", "type": "u8" }, { "name": "kind", "type": "u8" }, { "name": "nonce", "type": "u64" }, { "name": "asset", "type": "pubkey" }, { "name": "market", "type": "u16" }, { "name": "margin", "type": "u64" }, { "name": "entry_value", "type": "u64" }, { "name": "entry", "type": "u64" }, { "name": "bust", "type": "u64" }, { "name": "leverage", "type": "u16" }, { "name": "long", "type": "bool" }, { "name": "opened_at", "type": "i64" }, { "name": "opened_source_slot", "type": "u64" }, { "name": "cursor", "type": "u64" }, { "name": "bust_observed", "type": "bool" }, { "name": "exit", "type": "u64" }, { "name": "closed_at", "type": "i64" }, { "name": "close_seq", "type": "u64" }, { "name": "liquidated", "type": "bool" } ] } }, { "name": "ErTrader", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "config", "type": "pubkey" }, { "name": "pool", "type": "pubkey" }, { "name": "next_nonce", "type": "u64" }, { "name": "notional", "type": "u64" }, { "name": "assets", "type": { "array": [ { "defined": { "name": "ErBalance" } }, 16 ] } }, { "name": "slots", "type": { "array": [ { "defined": { "name": "ErSlot" } }, 10 ] } }, { "name": "bump", "type": "u8" }, { "name": "core_stake", "type": { "defined": { "name": "CoreStakeState" } } }, { "name": "custody_generation", "type": "u64" } ] } }, { "name": "Feed", "type": { "kind": "struct", "fields": [ { "name": "id", "type": "u16" }, { "name": "symbol", "type": { "array": [ "u8", 12 ] } }, { "name": "price", "type": "u64" }, { "name": "publish_time", "type": "i64" }, { "name": "source_slot", "type": "u64" }, { "name": "base_reserve", "type": "u64" }, { "name": "quote_reserve", "type": "u64" }, { "name": "real_quote_reserve", "type": "u64" }, { "name": "quote_usd", "type": "u64" }, { "name": "quote_decimals", "type": "u8" }, { "name": "fee_bps", "type": { "array": [ "u16", 3 ] } }, { "name": "sequence", "type": "u64" }, { "name": "observations", "type": { "array": [ { "defined": { "name": "Observation" } }, 64 ] } }, { "name": "bump", "type": "u8" } ] } }, { "name": "GasReserve", "type": { "kind": "struct", "fields": [ { "name": "sol_received", "type": "u64" }, { "name": "sol_spent", "type": "u64" }, { "name": "perp_bought", "type": "u64" }, { "name": "day", "type": "i64" }, { "name": "daily_spent", "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "GasRevenueDeposited", "type": { "kind": "struct", "fields": [ { "name": "admin", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "total_received", "type": "u64" } ] } }, { "name": "GasSurplusWithdrawn", "type": { "kind": "struct", "fields": [ { "name": "admin", "type": "pubkey" }, { "name": "recipient", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "remaining", "type": "u64" }, { "name": "operating_floor", "type": "u64" }, { "name": "total_outflows", "docs": [ "Includes operational refills and explicit surplus withdrawals, not just network fees." ], "type": "u64" } ] } }, { "name": "Inventory", "type": { "kind": "struct", "fields": [ { "name": "pool", "type": "pubkey" }, { "name": "asset", "type": "pubkey" }, { "name": "locked", "type": "u64" }, { "name": "treasury", "type": "u64" }, { "name": "losses", "type": "u64" }, { "name": "paid", "type": "u64" }, { "name": "dust", "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "LossSplit", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "loss", "type": "u64" }, { "name": "market_tokens", "type": "u64" }, { "name": "gas_tokens", "type": "u64" }, { "name": "perp_tokens", "type": "u64" }, { "name": "perp_bought", "type": "u64" }, { "name": "sol_received", "type": "u64" } ] } }, { "name": "MainnetCollateralContext", "type": { "kind": "struct", "fields": [ { "name": "real_quote_reserve", "type": "u64" }, { "name": "pool_source_slot", "type": "u64" }, { "name": "usd_per_quote_atom_e21", "docs": [ "USD per quote-token atom, scaled by 1e21. For SOL this equals the old", "SOL/USD e12 field exactly; for USDC it is 1e15. Layout and existing bytes", "are unchanged. Other quote tokens need an executable conversion route;", "a spot multiplier must not replace a multi-pool collateral sale." ], "type": "u64" }, { "name": "conversion_publish_time", "type": "i64" }, { "name": "conversion_source_slot", "type": "u64" } ] } }, { "name": "MainnetCollateralObservation", "type": { "kind": "struct", "fields": [ { "name": "base_reserve", "type": "u64" }, { "name": "quote_reserve", "docs": [ "Real reserve plus the signed virtual adjustment, in quote-token atoms." ], "type": "u64" }, { "name": "fee_bps", "type": { "array": [ "u16", 3 ] } }, { "name": "publish_time", "type": "i64" }, { "name": "observation", "type": "u64" }, { "name": "context", "type": { "defined": { "name": "MainnetCollateralContext" } } } ] } }, { "name": "Market", "type": { "kind": "struct", "fields": [ { "name": "id", "type": "u16" }, { "name": "pool", "type": "pubkey" }, { "name": "feed", "type": "pubkey" }, { "name": "long_oi", "type": "u64" }, { "name": "short_oi", "type": "u64" }, { "name": "long_cap", "type": "u64" }, { "name": "short_cap", "type": "u64" }, { "name": "cap_refreshed_at", "type": "i64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "Observation", "type": { "kind": "struct", "fields": [ { "name": "sequence", "type": "u64" }, { "name": "price", "type": "u64" } ] } }, { "name": "OwnershipAwarded", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "pool", "type": "pubkey" }, { "name": "owner", "type": "pubkey" }, { "name": "pool_tokens", "type": "u64" }, { "name": "issued", "type": "u128" } ] } }, { "name": "OwnershipPool", "type": { "kind": "struct", "fields": [ { "name": "pool", "type": "pubkey" }, { "name": "supply", "type": "u128" }, { "name": "total_staked", "type": "u128" }, { "name": "acc_reward", "type": "u128" }, { "name": "fee_pending", "type": "u64" }, { "name": "reward_pool", "type": "u64" }, { "name": "pending_liabilities", "type": "u64" }, { "name": "dev_fees", "type": "u64" }, { "name": "activated_at", "type": "i64" }, { "name": "tail_progress_usd", "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "OwnershipReceipt", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "pool", "type": "pubkey" }, { "name": "owner", "type": "pubkey" }, { "name": "pool_tokens", "type": "u64" }, { "name": "issued", "type": "u128" }, { "name": "awarded", "type": "bool" }, { "name": "bump", "type": "u8" } ] } }, { "name": "OwnershipTrader", "type": { "kind": "struct", "fields": [ { "name": "pool", "type": "pubkey" }, { "name": "owner", "type": "pubkey" }, { "name": "available", "type": "u128" }, { "name": "staked", "type": "u128" }, { "name": "issued", "type": "u128" }, { "name": "reward_index", "type": "u128" }, { "name": "pending", "type": "u64" }, { "name": "claimed", "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "Pool", "type": { "kind": "struct", "fields": [ { "name": "id", "type": "u16" }, { "name": "settlement", "type": "pubkey" }, { "name": "authority_bump", "type": "u8" }, { "name": "queue_head", "type": "u64" }, { "name": "queue_tail", "type": "u64" }, { "name": "queue_usd", "type": "u64" }, { "name": "trades", "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "Position", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "pool", "type": "pubkey" }, { "name": "market", "type": "pubkey" }, { "name": "collateral", "type": "pubkey" }, { "name": "nonce", "type": "u64" }, { "name": "margin", "type": "u64" }, { "name": "entry_value", "type": "u64" }, { "name": "close_value", "type": "u64" }, { "name": "entry", "type": "u64" }, { "name": "bust", "type": "u64" }, { "name": "leverage", "type": "u16" }, { "name": "long", "type": "bool" }, { "name": "state", "type": "u8" }, { "name": "opened_at", "type": "i64" }, { "name": "opened_slot", "type": "u64" }, { "name": "cursor", "type": "u64" }, { "name": "bust_observed", "type": "bool" }, { "name": "closed_at", "type": "i64" }, { "name": "exit", "type": "u64" }, { "name": "returned", "type": "u64" }, { "name": "profit", "type": "u64" }, { "name": "loss", "type": "u64" }, { "name": "swapped_out", "type": "u64" }, { "name": "remaining", "type": "u64" }, { "name": "queue_seq", "type": "u64" }, { "name": "bump", "type": "u8" }, { "name": "er_slot", "type": "u8" }, { "name": "er_close_seq", "type": "u64" }, { "name": "collateral_close_value", "type": "u64" }, { "name": "coverage_tokens", "type": "u64" }, { "name": "coverage_usd", "type": "u64" }, { "name": "uncovered_usd", "type": "u64" } ] } }, { "name": "PositionRecycled", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "next_position", "type": "pubkey" }, { "name": "data", "type": "bytes" }, { "name": "issued", "type": "u128" } ] } }, { "name": "ProfitPolicyApplied", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "version", "type": "u8" }, { "name": "deadband", "type": "bool" }, { "name": "net_profit", "type": "u64" } ] } }, { "name": "Redeemed", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "asset", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "debit_usd", "type": "u64" }, { "name": "converted_out", "type": "u64" } ] } }, { "name": "RevenueSplit", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "acid_received", "type": "u64" }, { "name": "pool_tokens", "type": "u64" }, { "name": "staker_tokens", "type": "u64" }, { "name": "burned_tokens", "type": "u64" } ] } }, { "name": "SdiceBuyback", "type": { "kind": "struct", "fields": [ { "name": "venue", "type": "pubkey" }, { "name": "quote_spent", "type": "u64" }, { "name": "sdice_burned", "type": "u64" }, { "name": "root_treasury", "type": "u64" } ] } }, { "name": "Settled", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "profit_usd", "type": "u64" }, { "name": "loss", "type": "u64" }, { "name": "returned", "type": "u64" }, { "name": "liquidated", "type": "bool" } ] } }, { "name": "SolUsdQuote", "docs": [ "The existing publisher signs this price in the settlement transaction itself.", "Pool reserves are read on chain; no separate base price-update transaction is", "needed. This preserves the same SOL/USD convention used for ER entry quotes." ], "type": { "kind": "struct", "fields": [ { "name": "price", "type": "u64" }, { "name": "publish_time", "type": "i64" } ] } }, { "name": "UserExposure", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "notional", "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "Venue", "type": { "kind": "struct", "fields": [ { "name": "config", "type": "pubkey" }, { "name": "pool", "type": "pubkey" }, { "name": "mint", "type": "pubkey" }, { "name": "asset", "type": "pubkey" }, { "name": "creator", "type": "pubkey" }, { "name": "created_at", "type": "i64" }, { "name": "pool_bps", "type": "u16" }, { "name": "staker_bps", "type": "u16" }, { "name": "burn_bps", "type": "u16" }, { "name": "gas_bps", "type": "u16" }, { "name": "buyback_bps", "type": "u16" }, { "name": "buyback_received", "docs": [ "Swap-quote atoms moved into the buyback vault by settlements." ], "type": "u64" }, { "name": "buyback_spent", "docs": [ "Swap-quote atoms spent on SDICE by `route_buyback`." ], "type": "u64" }, { "name": "sdice_burned", "docs": [ "SDICE atoms purchased and burned (never credited to root treasury)." ], "type": "u64" }, { "name": "bump", "type": "u8" } ] } }, { "name": "VenueCreated", "type": { "kind": "struct", "fields": [ { "name": "config", "type": "pubkey" }, { "name": "venue", "type": "pubkey" }, { "name": "pool", "type": "pubkey" }, { "name": "mint", "type": "pubkey" }, { "name": "creator", "type": "pubkey" } ] } }, { "name": "VenueLossSplit", "type": { "kind": "struct", "fields": [ { "name": "position", "type": "pubkey" }, { "name": "venue", "type": "pubkey" }, { "name": "loss", "type": "u64" }, { "name": "token_tokens", "type": "u64" }, { "name": "gas_tokens", "type": "u64" }, { "name": "buyback_tokens", "type": "u64" }, { "name": "token_bought", "type": "u64" }, { "name": "sol_received", "type": "u64" }, { "name": "buyback_quote", "type": "u64" } ] } }, { "name": "WalletCapacityExpanded", "type": { "kind": "struct", "fields": [ { "name": "owner", "type": "pubkey" }, { "name": "slots", "type": "u16" } ] } } ] }