PageSourceSearch

https://derp.trade/_next/static/chunks/4ae816a93c49520d.js?dpl=dpl_C3DEj7azJqqkdwYPuPjkkTbDPkcJ

js derp.trade collected 2026-10-06 18:37:31 UTC 60,417 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,274986,e=>{e.v(JSON.parse('{"address":"DERP2sf1Nak1R7s5HVgQD9WcQM1X9CKh5Ru5PNafAsPg","metadata":{"name":"derp_contracts","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"adjust_market","discriminator":[0,114,202,102,153,117,32,141],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_amm_bank_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_signer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mint"},{"name":"oracle_state","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_adjustment","type":"i64"}]},{"name":"create_market","discriminator":[103,226,97,235,200,188,251,254],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"oracle_state","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"usdt_amm_bank_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"deposit","discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"position_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"mint"},{"name":"bonding_curve","optional":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"price_update"},{"name":"usdt_amm_bank_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_collateral_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,99,111,108,108,97,116,101,114,97,108,95,97,99,99,111,117,110,116]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"usdt_payer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]}
1,{"name":"idl_types","docs":["IDL-only instruction used to force otherwise-unreferenced types into the generated IDL."],"discriminator":[87,80,137,234,245,100,61,228],"accounts":[],"args":[{"name":"args","type":{"defined":{"name":"IdlTypesArgs"}}}]},{"name":"initialize","discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"liquidate","discriminator":[223,179,226,125,48,46,39,74],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"owner","docs":["it\'s verified against the global config stored owner."]},{"name":"position_holder","docs":["this account needs to be unchecked to allow for liquidation","of arbitrary accounts (provided the threshold is met.)"]},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"position_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_holder"},{"kind":"account","path":"market_state"}]}},{"name":"usdt_amm_bank_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_collateral_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,99,111,108,108,97,116,101,114,97,108,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_holder"},{"kind":"account","path":"market_state"}]}},{"name":"platform_fee_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]}]}},{"name":"user_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114]},{"kind":"account","path":"position_holder"}]}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mint"},{"name":"oracle_state","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"market_status","discriminator":[66,197,138,116,168,154,238,188],"accounts":[{"name":"global_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"market_state","pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"oracle_state","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"usdt_amm_bank_account","pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"token_program"}],"args":[],"returns":{"defined":{"name":"MarketStatusResponse"}}},{"name":"order","discriminator":[26,124,48,51,126,66,100,15],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"owner","docs":["it\'s verified against the global config stored owner."]},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"position_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"mint"},{"name":"oracle_state","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,
1115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"referrer"},{"name":"usdt_amm_bank_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_collateral_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,99,111,108,108,97,116,101,114,97,108,95,97,99,99,111,117,110,116]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"usdt_payer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform_fee_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]}]}},{"name":"referral_fee_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"referrer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"order_params","type":{"defined":{"name":"OrderSizedParams"}}},{"name":"leverage_bps","type":"u64"},{"name":"referral_fee_bps","type":"u64"}]},{"name":"order_delegate","discriminator":[176,175,123,237,155,81,107,136],"accounts":[{"name":"signer","docs":["The executor submitting the order. Pays fees and rent, but has no","authority over the position or any holder funds."],"writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"owner","docs":["it\'s verified against the global config stored owner."]},{"name":"position_holder","docs":["must have signed the delegate ticket carried by this transaction."],"writable":true},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"position_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_holder"},{"kind":"account","path":"market_state"}]}},{"name":"mint"},{"name":"oracle_state","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"usdt_amm_bank_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_collateral_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,99,111,108,108,97,116,101,114,97,108,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_holder"},{"kind":"account","path":"market_state"}]}},{"name":"usdt_holder_account","docs":["The position holder\'s USDT account: the destination for withdrawn","collateral. Never debited."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_holder"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform_fee_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]}]}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"instructions","docs":["so it\'s guaranteed to exist."],"address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"kind","type":{"defined":{"name":"DelegateOrderKind"}}}]},{"name":"order_reduced","discriminator":[90,218,201,182,95,82,148,182],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"market_state","writable":true},{"name":"position_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"oracle_state"},{"name":"referrer"},{"name":"usdt_amm_bank_account","writable":true},{"name":"usdt_collateral_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,99,111,108,108,97,116,101,114,97,108,95,97,99,99,111,117,110,116]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"usdt_payer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform_fee_account","writable":true},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]}]}},{"name":"referral_fee_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"referrer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"order_params","type":{"defined":{"name":"OrderReducedParams"}}}]}
1,{"name":"order_routed","discriminator":[178,171,255,163,97,119,51,0],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"market_state","writable":true},{"name":"position_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"oracle_state"},{"name":"referrer"},{"name":"usdt_amm_bank_account","writable":true},{"name":"usdt_collateral_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,99,111,108,108,97,116,101,114,97,108,95,97,99,99,111,117,110,116]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"usdt_payer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform_fee_account","writable":true},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]}]}},{"name":"referral_fee_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"referrer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"order_params","type":{"defined":{"name":"OrderRoutedParams"}}}]},{"name":"push_bonk","discriminator":[141,168,127,98,26,63,55,20],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"oracle_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"quote_mint"},{"name":"bonding_pool_state","pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"mint"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[5,4,59,149,77,202,38,225,239,145,181,44,79,143,137,175,138,111,90,200,198,33,86,241,113,207,15,33,172,81,201,34]}}},{"name":"platform_config"},{"name":"cpmm_pool_token"},{"name":"cpmm_pool_quote"},{"name":"price_update"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"push_derp_feed","discriminator":[29,122,211,239,28,179,124,124],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"oracle_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"instructions","docs":["so it\'s guaranteed to exist."],"address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"push_external","discriminator":[126,89,143,228,57,33,179,96],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"oracle_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"pool_token"},{"name":"pool_sol"},{"name":"price_update"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"push_meteora_dbc","discriminator":[35,21,227,58,204,6,2,133],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"oracle_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"virtual_pool_state"},{"name":"virtual_config"},{"name":"damm_pool"},{"name":"price_update"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]}
1,{"name":"push_pump","discriminator":[195,165,88,97,7,28,127,219],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"oracle_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pumpswap_pool_token"},{"name":"pumpswap_pool_sol"},{"name":"price_update"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"push_raydium_amm_v4","discriminator":[4,97,224,184,31,234,209,152],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"oracle_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101,45,115,116,97,116,101]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"amm_pool","docs":["account owner is the Raydium AMM v4 program and reading its stored","vault/mint fields."]},{"name":"pool_coin_vault","docs":["addresses stored in the AMM pool account."]},{"name":"pool_pc_vault","docs":["addresses stored in the AMM pool account."]},{"name":"price_update"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"set_config","discriminator":[108,158,154,175,212,98,52,66],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"SetConfigParams"}}}]},{"name":"set_creator","discriminator":[254,148,255,112,207,142,170,165],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]}]}},{"name":"signer_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"mint"},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_creator","type":"pubkey"},{"name":"fees_amount","type":"u64"}]},{"name":"vault_deposit","discriminator":[231,150,41,113,180,104,162,120],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"usdt_payer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_vault_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vault_user_deposit_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,117,115,101,114,95,100,101,112,111,115,105,116]},{"kind":"account","path":"vault"},{"kind":"account","path":"signer"},{"kind":"account","path":"mint"}]}},{"name":"vault"},{"name":"mint","optional":true},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]}
1,{"name":"vault_withdraw","discriminator":[98,28,187,98,87,69,46,64],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"usdt_payer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_vault_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vault_user_deposit_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,117,115,101,114,95,100,101,112,111,115,105,116]},{"kind":"account","path":"vault"},{"kind":"account","path":"signer"},{"kind":"account","path":"mint"}]}},{"name":"vault"},{"name":"usdt_delegate","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,100,101,108,101,103,97,116,101]},{"kind":"account","path":"usdt_vault_account"}]}},{"name":"mint","optional":true},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"withdraw","discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"market_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,107,101,116]},{"kind":"account","path":"mint"}]}},{"name":"position_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"mint"},{"name":"bonding_curve","optional":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"usdt_amm_bank_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,97,109,109,95,98,97,110,107,95,97,99,99,111,117,110,116]},{"kind":"account","path":"mint"}]}},{"name":"usdt_collateral_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,116,95,99,111,108,108,97,116,101,114,97,108,95,97,99,99,111,117,110,116]},{"kind":"account","path":"signer"},{"kind":"account","path":"market_state"}]}},{"name":"usdt_payer_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"withdraw_fees","discriminator":[198,212,171,109,144,215,174,89],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"global_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]}]}},{"name":"user_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"signer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdt_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114]},{"kind":"account","path":"signer"}]}},{"name":"usdt_mint","address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"withdraw_referral_fees","type":"bool"},{"name":"withdraw_liquidation_cashback","type":"bool"}]}
1],"accounts":[{"name":"GlobalConfig","discriminator":[149,8,156,202,160,252,176,217]},{"name":"MarketState","discriminator":[0,125,123,215,95,96,164,194]},{"name":"OracleState","discriminator":[97,156,157,189,194,73,8,15]},{"name":"PlatformConfig","discriminator":[160,78,128,0,248,83,230,160]},{"name":"PoolConfig","discriminator":[26,108,14,123,116,230,129,43]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"PositionState","discriminator":[154,47,151,70,8,128,206,231]},{"name":"PriceUpdateV2","discriminator":[34,241,35,99,157,126,244,205]},{"name":"UserState","discriminator":[72,177,85,249,76,167,186,126]},{"name":"VaultUserDepositState","discriminator":[35,184,123,152,79,34,12,172]},{"name":"VirtualPool","discriminator":[213,224,5,209,98,69,119,92]}],"events":[{"name":"DelegateOrderExecutedEvent","discriminator":[157,39,169,185,97,170,153,118]},{"name":"LiquidateEvent","discriminator":[158,94,144,4,147,52,5,255]},{"name":"OrderExecutionEvent","discriminator":[234,55,249,20,231,210,185,87]}],"errors":[{"code":6000,"name":"MissingPosition","msg":"The position was not found."},{"code":6001,"name":"InvalidPrice","msg":"Invalid price provided."},{"code":6002,"name":"PriceUnavailable","msg":"Could not calculate the price."},{"code":6003,"name":"PriceArithmeticError","msg":"Arithmetic overflow or underflow occurred when calculating the price."},{"code":6004,"name":"MissingPoolAccounts","msg":"Required pool accounts were not provided, no way to determine price."},{"code":6005,"name":"ArithmeticError","msg":"Arithmetic overflow or underflow occurred."},{"code":6006,"name":"WrongPool","msg":"Wrong pool address provided."},{"code":6007,"name":"MarketMismatch","msg":"Market mismatch detected."},{"code":6008,"name":"Unauthorized","msg":"Unauthorized access to this operation."},{"code":6009,"name":"AlreadyInitialized","msg":"Account already initialized."},{"code":6010,"name":"InsufficientFunds","msg":"Insufficient funds for this operation."},{"code":6011,"name":"CannotWithdraw","msg":"Cannot withdraw funds from a margin account with an open position."},{"code":6012,"name":"NotLiquidable","msg":"Position cannot be liquidated."},{"code":6013,"name":"BadReferralFee","msg":"Wrong referral fee set."},{"code":6014,"name":"WrongStaticPool","msg":"Wrong static pool address provided."},{"code":6015,"name":"CurveNotAccepted","msg":"Bonding curve is not accepted for this token."},{"code":6016,"name":"CurveRequired","msg":"Bonding curve is required for this token."},{"code":6017,"name":"SourceMismatch","msg":"Price source does not match the previous source."},{"code":6018,"name":"MintOracleMismatch","msg":"This mint does not support this oracle."},{"code":6019,"name":"OracleVersionMismatch","msg":"This version of the oracle state is not supported."},{"code":6020,"name":"OraclePriceExpired","msg":"The oracle price is too old to be used in this transaction."},{"code":6021,"name":"UnexpectedData","msg":"Unexpected data in external source."},{"code":6022,"name":"SignatureVerificationFailed","msg":"Wrong signature provided for data."},{"code":6023,"name":"OracleTooEarly","msg":"The oracle price is too new to be used in this transaction."},{"code":6024,"name":"OrderPreconditionsNotMet","msg":"The order does not meet preconditions for execution."},{"code":6025,"name":"OrderPriceConditionsNotMet","msg":"The order does not meet price conditions for execution."},{"code":6026,"name":"InvalidParameters","msg":"Invalid parameters provided."},{"code":6027,"name":"OracleVerificationFailed","msg":"Oracle verification failed."},{"code":6028,"name":"SettlementFailed","msg":"Order settlement failed."},{"code":6029,"name":"SettlementDoublePayment","msg":"Settlement rejected because of double payment."},{"code":6030,"name":"OrderNotExecutable","msg":"Order cannot be executed."},{"code":6031,"name":"SlippageToleranceExceeded","msg":"The order could not be executed, because it failed slippage protection checks."},{"code":6032,"name":"InvalidSwapRoute","msg":"Invalid swap route provided."},{"code":6033,"name":"InvalidTicket","msg":"The provided ticket is malformed or invalid."},{"code":6034,"name":"TicketExpired","msg":"The provided ticket has expired."},{"code":6035,"name":"TicketUnauthorized","msg":"The ticket signature chain does not authorize this order."},{"code":6036,"name":"TicketPositionMismatch","msg":"The ticket does not match the current position."}],"types":[{"name":"AMMEquityTracker","docs":["Struct used for tracking the AMM delta equity,","i.e. how much cash would be required if every position","was closed at the same time.","","Negative values of `delta_amm_equity` increase bid-ask spreads and margin rates","in an attempt to raise more funds and soften equity demand."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bank","docs":["Amount of funds owned by the AMM as a result of fee payments, liquidations, negative realized P/L etc."],"type":"u128"},{"name":"long_cost_basis","docs":["The cost basis (size * fill price) of open longs"],"type":"u128"},{"name":"short_cost_basis","docs":["The cost basis (size * fill price) of open shorts"],"type":"u128"},{"name":"open_interest","docs":["Total sizes of all open positions"],"type":{"defined":{"name":"OpenInterest"}}}]}},{"name":"BaseFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"second_factor","type":"u64"},{"name":"third_factor","type":"u64"},{"name":"first_factor","type":"u16"},{"name":"base_fee_mode","type":"u8"},{"name":"padding_0","type":{"array":["u8",5]}}]}},{"name":"Config","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_maintenance_margin_rate","docs":["Base rate of maintenance margin, will be modified based on market conditions."],"type":"i128"},{"name":"max_maintenance_margin_rate","docs":["Maximum rate of maintenance margin."],"type":"i128"},{"name":"maintenance_margin_hole_sensitivity_bps","docs":["How much the maintenance margin will increase with increasing AMM cash deficit."],"type":"u64"},{"name":"max_quote_deviation_bps","docs":["Max deviation of bid and ask from the index price when calculating quote."],"type":"u64"},{"name":"platform_fee_rate","docs":["This fee will be collected on order open and close and withdrawable by the platform owner."],"type":"i128"},{"name":"liquidity_fee_rate","docs":["This fee will be collected on order open and close and added to the AMM funds."],"type":"i128"},{"name":"imr_risk_step_size","docs":["The size of a single risk step in USD.","","When calculating the initial margin rate, the risk step of a given position is calculated","from its notional, and used to increase the margin rate for each step.","","Stored in `SIZE_SCALE`."],"type":"u128"},{"name":"imr_risk_step_rate","docs":["The rate at which IMR will increate with each risk step."],"type":"i128"},{"name":"funding_rate_cap","docs":["Maximum HOURLY funding rate"],"type":"i128"},{"name":"impact_notional_usd","docs":["The amount of USD used for calculating impact prices.","","For example, for calculating the funding premium, this amount will be used","to calculate an ask and bid for a simulated order of this size. This yields","prices that better reflect real market conditions than instantaneous quotes."],"type":"u128"},{"name":"liquidation_interval","docs":["How often liquidations are executed (in seconds). This is meant to be an overestimate,","since it\'s used for inital margin safety buffers."],"type":"u64"},{"name":"funding_interval","docs":["How often funding payments are collected (in seconds)."],"type":"u64"}]}},{"name":"DelegateOrderExecutedEvent","type":{"kind":"struct","fields":[{"name":"position_holder","type":"pubkey"},{"name":"delegate","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"kind","type":{"defined":{"name":"DelegateOrderKind"}}}
1,{"name":"execution_price","type":"u128"},{"name":"withdrawn_amount","type":"u64"}]}},{"name":"DelegateOrderKind","docs":["Which order ticket type the delegate signed."],"type":{"kind":"enum","variants":[{"name":"Conditional"},{"name":"Close"}]}},{"name":"DynamicFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"padding2","type":{"array":["u8",8]}},{"name":"bin_step_u128","type":"u128"}]}},{"name":"GlobalConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"config","type":{"defined":{"name":"Config"}}},{"name":"owner","type":"pubkey"}]}},{"name":"IdlTypesArgs","type":{"kind":"struct","fields":[{"name":"price_attestation","type":{"defined":{"name":"PriceAttestation"}}}]}},{"name":"LiquidateEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"size","type":"u128"},{"name":"side","docs":["The close side, which is the reverse of the liquidated position\'s side."],"type":{"defined":{"name":"Side"}}},{"name":"execution_price","type":"u128"},{"name":"notional","type":"u128"},{"name":"realized_pnl","docs":["The full collateral taken from the liquidated position, expressed as negative PnL.","Cashback remains included in this loss."],"type":"i128"},{"name":"fee","type":{"defined":{"name":"LiquidationFees"}}}]}},{"name":"LiquidationFees","docs":["Liquidation fees computed from seized collateral.","","Rates:","- platform_fee: 30%","- creator_fee: 10%","- cashback: 10%","- liquidity_fee: remainder (~50%)"],"type":{"kind":"struct","fields":[{"name":"platform_fee","docs":["Platform fee collected from the collateral."],"type":"u128"},{"name":"creator_fee","docs":["Creator fee collected from the collateral and given to the coin creator."],"type":"u128"},{"name":"cashback","docs":["Liquidation cashback paid back to the user."],"type":"u128"},{"name":"liquidity_fee","docs":["Remainder of the collateral after deducting the fees, to be added to the bank."],"type":"u128"}]}},{"name":"LiquidityDistributionConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"sqrt_price","type":"u128"},{"name":"liquidity","type":"u128"}]}},{"name":"LockedVestingConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_per_period","type":"u64"},{"name":"cliff_duration_from_migration_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"_padding","type":"u64"}]}},{"name":"MarkPriceEMA","docs":["A utility to calculate the mark price using EMA.","","The mark price is calculated using `oracle_price + EMA((ask + bid)/2 - oracle_price)`.","This technique is also used by Hyperliquid as one of the components of their mark.","","This was chosen because it allows for fast reactions to the oracle price,","while smoothing over the AMM quote. This way, large quote changes by the AMM","are reflected in the mark, but aren\'t likely to cause instant liquidations","or similar issues."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"last_diff_ema","type":"i128"},{"name":"last_updated","type":"u64"},{"name":"version","type":"u64"}]}},{"name":"MarketState","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"equity","type":{"defined":{"name":"AMMEquityTracker"}}},{"name":"mark","type":{"defined":{"name":"MarkPriceEMA"}}},{"name":"cumulative_funding_rate","type":"i128"},{"name":"last_funding_timestamp","type":"i64"},{"name":"version","type":"u64"},{"name":"mint","type":"pubkey"},{"name":"creator","docs":["Creator address, zeroed if unset."],"type":"pubkey"},{"name":"creator_fees_pending","docs":["Amount of creator fees that have not been withdrawn yet"],"type":"u128"},{"name":"creator_fees_total","docs":["Total amount of creator fees that have been collected"],"type":"u128"},{"name":"frozen_position_collateral","docs":["Collateral of the frozen position; 0 = not frozen or pending unfreeze."],"type":"u128"},{"name":"frozen_oi","docs":["Total OI when freeze was activated (= frozen position\'s size); 0 = not frozen and not pending unfreeze."],"type":"u128"}
1,{"name":"freeze_end_price","docs":["Mark price when the freeze most recently ended; 0 = no pending unfreeze."],"type":"u128"},{"name":"frozen_user","docs":["The user whose position is frozen or pending unfreeze; zeroed if no freeze and no pending unfreeze."],"type":"pubkey"}]}},{"name":"MarketStatusResponse","type":{"kind":"struct","fields":[{"name":"bid_price","type":"u128"},{"name":"ask_price","type":"u128"},{"name":"oracle_price","type":"u128"},{"name":"mark_price","type":"u128"},{"name":"funding_rate","type":"i128"},{"name":"last_funding_timestamp","type":"i64"},{"name":"cumulative_funding_rate","type":"i128"},{"name":"initial_margin_rate","type":"i128"},{"name":"skew_rate","type":"i128"},{"name":"open_interest_long","type":"u128"},{"name":"open_interest_short","type":"u128"},{"name":"open_interest_notional","type":"u128"},{"name":"maintenance_margin_rate","type":"i128"},{"name":"amm_liquidity","docs":["The full liquidity of the AMM, including the bank and collateral for open positions"],"type":"u128"},{"name":"delta_amm_equity","docs":["The AMM\'s current delta equity"],"type":"i128"},{"name":"equity_bank","docs":["The amount of funds owned by the AMM bank"],"type":"u128"},{"name":"equity_long_cost_basis","docs":["The cost basis of the open long positions"],"type":"u128"},{"name":"equity_short_cost_basis","docs":["The cost basis of the open short positions"],"type":"u128"},{"name":"frozen_user","docs":["The user whose position is frozen; zeroed if no freeze"],"type":"pubkey"},{"name":"frozen_position_collateral","docs":["Collateral of the frozen position; 0 = no active freeze"],"type":"u128"},{"name":"freeze_end_price","docs":["Mark price when the freeze most recently ended; 0 = no pending unfreeze"],"type":"u128"}]}},{"name":"OpenInterest","docs":["A struct for tracking the total sizes of open positions."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_long_size","type":"u128"},{"name":"total_short_size","type":"u128"}]}},{"name":"OraclePriceSource","docs":["The possible sources for an oracle to fetch its price from."],"type":{"kind":"enum","variants":[{"name":"PumpFunWithPumpSwap"},{"name":"RaydiumLaunchLabWithCPMM"},{"name":"ExternalOnly"},{"name":"MeteoraDbc"},{"name":"DerpFeed"},{"name":"RaydiumAmmV4"}]}},{"name":"OracleState","type":{"kind":"struct","fields":[{"name":"price","type":"u128"},{"name":"last_push_timestamp","type":"i64"},{"name":"source","type":{"defined":{"name":"OraclePriceSource"}}},{"name":"version","type":"u8"}]}},{"name":"OrderExecution","docs":["Represents the result of full order execution.","","Order executions are generated after an order is executed and settled,","based on an [OrderReceipt] and [super::payments::SettlementReceipt]."],"type":{"kind":"struct","fields":[{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"size","type":"u128"},{"name":"execution_price","type":"u128"},{"name":"notional","type":"u128"},{"name":"realized_pnl","type":"i128"},{"name":"realized_pnl_nofee","type":"i128"},{"name":"fee","type":{"defined":{"name":"OrderFees"}}},{"name":"is_closing","type":"bool"}]}},{"name":"OrderExecutionEvent","type":{"kind":"struct","fields":[{"defined":{"name":"OrderExecution"}}]}},{"name":"OrderFees","docs":["Order fees computed from execution notional.","","Rates are hardcoded:","- platform_fee: 0.3% (30 bps)","- liquidity_fee: 0.3% (30 bps)","- creator_fee: 0.1% (10 bps)","","All fees are capped at 30% of the cash involved in a given transaction.","For new orders, the maximum fee is 30% of the payment for the open part of the order.","For closing positions, the maximum fee is 30% of the settled amount (collateral + PnL + funding)."],"type":{"kind":"struct","fields":[{"name":"platform_fee","type":"u128"},{"name":"liquidity_fee","type":"u128"},{"name":"creator_fee","type":"u128"}]}},{"name":"OrderReducedParams","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"deposit_usdt_amount","docs":["Now: deposit size in USDT. Later: Desired payment in USDT (with 6 decimals)"],"type":"u64"},{"name":"size","docs":["Now: order size. Later: Minimum size of the order in base asset units in SIZE_SCALE (to prevent slippage)"],"type":"u64"},{"name":"flags","docs":["Flags for the order:","- bit 0: reduce only (true/false)","- bit 1: side (0 
1= long, 1 = short)","- bit 2: auto-withdraw (true/false)","- if size is zero after order execution, withdraw remaining collateral","- bits 8-15: bump of the usdt_amm_bank account","- bits 16-39: desired leverage bps [0-2^24/10000)","- bits 40-63: referral fee bps [0-6000]"],"type":"u64"}]}},{"name":"OrderRoutedParams","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"min_final_position_size","docs":["The minimum size of the final position in base contract units (to prevent slippage)"],"type":"u128"},{"name":"order_amount","docs":["Desired order amount","","If use_size is true, this is the size of the order in base contract units.","If use_size is false, this is the amount of the order in input tokens.","USD is used by default, unless the user specifies a different token in the input route."],"type":"u64"},{"name":"flags","docs":["Flags for the order:","- bit 0: reduce only (true/false)","- bit 1: side (0 = long, 1 = short)","- bit 2: use size (true/false)","- if true, the payment amount is the size of the order in underlying contracts (not USD), this is useful for partially closing positions","- bit 3: auto-withdraw (true/false)","- if true, the order will withdraw collateral, leaving only the needed initial margin for the entire position","- bit 4-5: route step count","- bit 6: wrap/unwrap SOL","- if true, and a swap from WSOL is the first step, we will auto-wrap SOL to WSOL if there isn\'t enough WSOL in the account, and unwrap and close the account on withdrawal","- bits 16-39: desired leverage bps [0-2^24/10000)","- bits 40-63: referral fee bps [0-6000]"],"type":"u64"}]}},{"name":"OrderSizedParams","type":{"kind":"struct","fields":[{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"size","type":"u128"},{"name":"reduce_only","type":"bool"}]}},{"name":"PlatformConfig","type":{"kind":"struct","fields":[{"name":"epoch","type":"u64"},{"name":"platform_fee_wallet","type":"pubkey"},{"name":"platform_nft_wallet","type":"pubkey"},{"name":"platform_scale","type":"u64"},{"name":"creator_scale","type":"u64"},{"name":"burn_scale","type":"u64"},{"name":"fee_rate","type":"u64"},{"name":"name","type":{"array":["u8",64]}},{"name":"web","type":{"array":["u8",256]}},{"name":"img","type":{"array":["u8",256]}},{"name":"cp_config_id","type":"pubkey"},{"name":"creator_fee_rate","type":"u64"},{"name":"transfer_fee_extension_auth","type":"pubkey"},{"name":"padding","type":{"array":["u8",184]}}]}},{"name":"PoolConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"quote_mint","type":"pubkey"},{"name":"fee_claimer","type":"pubkey"},{"name":"leftover_receiver","type":"pubkey"},{"name":"pool_fees","type":{"defined":{"name":"PoolFeesConfig"}}},{"name":"collect_fee_mode","type":"u8"},{"name":"migration_option","type":"u8"},{"name":"activation_type","type":"u8"},{"name":"token_decimal","type":"u8"},{"name":"version","type":"u8"},{"name":"token_type","type":"u8"},{"name":"quote_token_flag","type":"u8"},{"name":"partner_locked_lp_percentage","type":"u8"},{"name":"partner_lp_percentage","type":"u8"},{"name":"creator_locked_lp_percentage","type":"u8"},{"name":"creator_lp_percentage","type":"u8"},{"name":"migration_fee_option","type":"u8"},{"name":"fixed_token_supply_flag","type":"u8"},{"name":"creator_trading_fee_percentage","type":"u8"},{"name":"token_update_authority","type":"u8"},{"name":"migration_fee_percentage","type":"u8"},{"name":"creator_migration_fee_percentage","type":"u8"},{"name":"_padding_0","type":{"array":["u8",7]}},{"name":"swap_base_amount","type":"u64"},{"name":"migration_quote_threshold","type":"u64"},{"name":"migration_base_threshold","type":"u64"},{"name":"migration_sqrt_price","type":"u128"},{"name":"locked_vesting_config","type":{"defined":{"name":"LockedVestingConfig"}}},{"name":"pre_migration_token_supply","type":"u64"},{"name":"post_migration_token_supply","type":"u64"},{"name":"migrated_collect_fee_mode","type":"u8"},{"name":"migrated_dynamic_fee","type":"u8"},{"name":"migrated_pool_fee_bps","type":"u16"},{"name":"_padding_1","type":{"array":["u8",12]}},{"name":"_padding_2","type":"u128"},{"name":"sqrt_start_price","type":"u128"},{"name":"curve","type":{"array":[{"defined":{"name":"LiquidityDistributionConfig"}},20]}}]}},{"name":"PoolFeesConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","type":{"defined":{"name":"BaseFeeConfig"}}
1},{"name":"dynamic_fee","type":{"defined":{"name":"DynamicFeeConfig"}}},{"name":"padding_0","type":{"array":["u64",5]}},{"name":"padding_1","type":{"array":["u8",6]}},{"name":"protocol_fee_percent","type":"u8"},{"name":"referral_fee_percent","type":"u8"}]}},{"name":"PoolMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_protocol_base_fee","type":"u64"},{"name":"total_protocol_quote_fee","type":"u64"},{"name":"total_trading_base_fee","type":"u64"},{"name":"total_trading_quote_fee","type":"u64"}]}},{"name":"PoolState","docs":["Represents the state of a trading pool in the protocol","Stores all essential information about pool balances, fees, and configuration"],"type":{"kind":"struct","fields":[{"name":"epoch","type":"u64"},{"name":"auth_bump","type":"u8"},{"name":"status","type":"u8"},{"name":"base_decimals","type":"u8"},{"name":"quote_decimals","type":"u8"},{"name":"migrate_type","type":"u8"},{"name":"supply","type":"u64"},{"name":"total_base_sell","type":"u64"},{"name":"virtual_base","type":"u64"},{"name":"virtual_quote","type":"u64"},{"name":"real_base","type":"u64"},{"name":"real_quote","type":"u64"},{"name":"total_quote_fund_raising","type":"u64"},{"name":"quote_protocol_fee","type":"u64"},{"name":"platform_fee","type":"u64"},{"name":"migrate_fee","type":"u64"},{"name":"vesting_schedule","type":{"defined":{"name":"VestingSchedule"}}},{"name":"global_config","type":"pubkey"},{"name":"platform_config","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"base_vault","type":"pubkey"},{"name":"quote_vault","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"Position","docs":["Track all core information about a position after is has been opened."],"type":{"kind":"struct","fields":[{"name":"size","docs":["The size of the position denominated in contracts (not USD) in `SIZE_SCALE`"],"type":"u128"},{"name":"entry_price","docs":["The bid/ask price at which the position was actually opened"],"type":"u128"},{"name":"collateral","docs":["The amount of USD securing the position in `SIZE_SCALE` - margin","","This starts with the initial margin, and can increase if the user","deposits more funds into the margin account."],"type":"u128"},{"name":"side","docs":["Whether the position is long or short"],"type":{"defined":{"name":"Side"}}}]}},{"name":"PositionState","type":{"kind":"struct","fields":[{"name":"position","type":{"defined":{"name":"Position"}}},{"name":"mint","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"is_initialized","type":"bool"},{"name":"funding_at_last_update","type":"i128"},{"name":"funding_last_updated","type":"i64"},{"name":"leverage","type":"u64"}]}},{"name":"PriceAttestation","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_mint_id","type":"pubkey"},{"name":"price","type":"u128"},{"name":"conf_e","type":"u128"},{"name":"sequence","type":"u64"},{"name":"publish_timestamp","type":"u64"},{"name":"valid_from_timestamp","type":"u64"},{"name":"valid_to_timestamp","type":"u64"}]}},{"name":"PriceFeedMessage","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_id","docs":["`FeedId` but avoid the type alias because of compatibility issues with Anchor\'s `idl-build` feature."],"type":{"array":["u8",32]}},{"name":"price","type":"i64"},{"name":"conf","type":"u64"},{"name":"exponent","type":"i32"},{"name":"publish_time","docs":["The timestamp of this price update in seconds"],"type":"i64"},{"name":"prev_publish_time","docs":["The timestamp of the previous price update. This field is intended to allow users to","identify the single unique price update for any moment in time:","for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.","","Note that there may not be such an update while we are migrating to the new message-sending logic,","as some price updates on pythnet may not be sent to other chains (because the message-sending","logic may not have triggered). We can solve this problem by making the message-sending mandatory","(which we can do once publishers have migrated over).","","Additionally, this field may be equal to publish_time if the message is sent on a slot where","where the aggregation was unsuccesful. This problem will go away once all publishers have","migrated over to a recent version of pyth-agent."],"type":"i64"},{"name":"ema_price","type":"i64"},{"name":"ema_conf","type":"u64"}]}},{"name":"PriceUpdateV2","docs":["A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.","It contains:","- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.","- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.","- `price_message`: The actual price update.","- `posted_slot`: The slot at which this price update was posted."],"type":{"kind":"struct","fields":[{"name":"write_authority","type":"pubkey"},{"name":"verification_level","type":{"defined":{"name":"VerificationLevel"}}},{"name":"price_message","type":{"defined":{"name":"PriceFeedMessage"}}},{"name":"posted_slot","type":"u64"}]}},{"name":"SetConfigParams","type":{"kind":"struct","fields":[{"name":"base_maintenance_margin_rate","type":"i128"},{"name":"maintenance_margin_hole_sensitivity_bps","type":"u64"},{"name":"funding_rate_cap","type":"i128"},{"name":"platform_fee_rate","type":"i128"},{"name":"liquidity_fee_rate","type":"i128"},{"name":"max_quote_deviation_bps","type":"u64"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Short"},{"name":"Long"}]}},{"name":"UserState","docs":["State for a user\'s account."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"user","docs":["The user\'s public key."],"type":"pubkey"},{"name":"referral_fees_total","docs":["Total referral fees earned by the user."],"type":"u64"},{"name":"referral_fees_pending","docs":["Referral fees unclaimed by the user."],"type":"u64"},{"name":"liquidation_cashback_total","docs":["Total liquidation cashback earned by the user."],"type":"u64"},{"name":"liquidation_cashback_pending","docs":["Liquidation cashback unclaimed by the user."],"type":"u64"},{"name":"version","type":"u8"},{"name":"padding","type":{"array":["u8",31]}}]}},{"name":"VaultKind","type":{"kind":"enum","variants":[{"name":"General"},{"name":"MarketMaking","fields":["pubkey"]}]}},{"name":"VaultUserDepositState","type":{"kind":"struct","fields":[{"name":"kind","type":{"defined":{"name":"VaultKind"}}}
1,{"name":"owner","type":"pubkey"},{"name":"amount_deposited","type":"u64"},{"name":"version","type":"u8"}]}},{"name":"VerificationLevel","docs":["Pyth price updates are bridged to all blockchains via Wormhole.","Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.","The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,","so we also allow for partial verification.","","This enum represents how much a price update has been verified:","- If `Full`, we have verified the signatures for two thirds of the current guardians.","- If `Partial`, only `num_signatures` guardian signatures have been checked.","","# Warning","Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."],"type":{"kind":"enum","variants":[{"name":"Partial","fields":[{"name":"num_signatures","type":"u8"}]},{"name":"Full"}]}},{"name":"VestingSchedule","type":{"kind":"struct","fields":[{"name":"total_locked_amount","type":"u64"},{"name":"cliff_period","type":"u64"},{"name":"unlock_period","type":"u64"},{"name":"start_time","type":"u64"},{"name":"allocated_share_amount","type":"u64"}]}},{"name":"VirtualPool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"volatility_tracker","type":{"defined":{"name":"VolatilityTracker"}}},{"name":"config","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"base_vault","type":"pubkey"},{"name":"quote_vault","type":"pubkey"},{"name":"base_reserve","type":"u64"},{"name":"quote_reserve","type":"u64"},{"name":"protocol_base_fee","type":"u64"},{"name":"protocol_quote_fee","type":"u64"},{"name":"partner_base_fee","type":"u64"},{"name":"partner_quote_fee","type":"u64"},{"name":"sqrt_price","type":"u128"},{"name":"activation_point","type":"u64"},{"name":"pool_type","type":"u8"},{"name":"is_migrated","type":"u8"},{"name":"is_partner_withdraw_surplus","type":"u8"},{"name":"is_protocol_withdraw_surplus","type":"u8"},{"name":"migration_progress","type":"u8"},{"name":"is_withdraw_leftover","type":"u8"},{"name":"is_creator_withdraw_surplus","type":"u8"},{"name":"migration_fee_withdraw_status","type":"u8"},{"name":"metrics","type":{"defined":{"name":"PoolMetrics"}}},{"name":"finish_curve_timestamp","type":"u64"},{"name":"creator_base_fee","type":"u64"},{"name":"creator_quote_fee","type":"u64"},{"name":"_padding_1","type":{"array":["u64",7]}}]}},{"name":"VolatilityTracker","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"last_update_timestamp","type":"u64"},{"name":"padding","type":{"array":["u8",8]}},{"name":"sqrt_price_reference","type":"u128"},{"name":"volatility_accumulator","type":"u128"},{"name":"volatility_reference","type":"u128"}]}}]}'))}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.