MCPcopy Create free account

hub / github.com/Py-Ec/solana-arbitrage-bot / functions

Functions241 in github.com/Py-Ec/solana-arbitrage-bot

↓ 1 callersMethodsettle
(&self, referral: Option<AccountInfo<'info>>)
program/programs/tmp/src/swaps/serum.rs:220
↓ 1 callersMethodswap_without_fees
Constant product swap ensures x * y = constant
client/src/pool_utils/constant_product.rs:175
↓ 1 callersFunctiontest_pool_quote
( pool: &mut Box<dyn PoolOperations>, pool_path: &str, connection: &RpcClient, program: &Prog
client/src/tests/quotes.rs:104
↓ 1 callersFunctiontest_truncation
( curve: &ConstantProductCurve, source_amount: u128, swap_source_amount: u128,
client/src/pool_utils/constant_product.rs:350
↓ 1 callersFunctionunpack_coption_u64
(src: &[u8; 12])
client/src/serialize/token.rs:128
↓ 1 callersMethodwithdraw_single_token_type_exact_out
Get the amount of pool tokens for the withdrawn amount of token A or B
client/src/pool_utils/base.rs:137
Function_mercurial_swap
( ctx: &Context<'_, '_, '_, 'info, MercurialSwap<'info>>, amount_in: u64 )
program/programs/tmp/src/swaps/mercurial.rs:11
Function_orca_swap
( ctx: &Context<'_, '_, '_, 'info, OrcaSwap<'info>>, amount_in: u64 )
program/programs/tmp/src/swaps/orca.rs:11
Function_saber_swap
( ctx: &Context<'_, '_, '_, 'info, SaberSwap<'info>>, amount_in: u64 )
program/programs/tmp/src/swaps/saber.rs:11
Functionaldrin
()
client/src/tests/quotes.rs:30
Functionaldrin_swap_v1
(ctx: Context<'_, '_, '_, 'info, AldrinSwapV1<'info>>, is_inverted: bool)
program/programs/tmp/src/lib.rs:86
Functionaldrin_swap_v2
(ctx: Context<'_, '_, '_, 'info, AldrinSwapV2<'info>>, is_inverted: bool)
program/programs/tmp/src/lib.rs:70
Methodallows_deposits
Some curves function best and prevent attacks if we prevent deposits after initialization. For example, the offset curve in `offset.rs`, which fakes
client/src/pool_utils/calculator.rs:172
Methodallows_deposits
Offset curves can cause arbitrage opportunities if outside users are allowed to deposit. For example, in the offset curve, if there's swap with 1 mil
client/src/pool_utils/offset.rs:139
Functionask_iteration
( iteration: &mut Iteration, fee_tier: &FeeTier, ob: &mut OrderBookState, )
client/src/tmp.rs:119
Methodcan_trade
(&self, mint_in: &Pubkey, _mint_out: &Pubkey )
client/src/pools/serum.rs:368
Methodcan_trade
(&self, _mint_in: &Pubkey, _mint_out: &Pubkey )
client/src/pools/aldrin.rs:181
Methodcan_trade
(&self, _mint_in: &Pubkey, _mint_out: &Pubkey )
client/src/pools/mercurial.rs:122
Methodcan_trade
(&self, _mint_in: &Pubkey, _mint_out: &Pubkey )
client/src/pools/saber.rs:135
Functioncheck_curve_value_from_swap
Test function checking that a swap never reduces the overall value of the pool. Since curve calculations use unsigned integers, there is potential fo
client/src/pool_utils/calculator.rs:390
Functioncheck_deposit_token_conversion
Test function to check that depositing token A is the same as swapping half for token B and depositing both. Since calculations use unsigned integers,
client/src/pool_utils/calculator.rs:212
Functioncheck_pool_value_from_deposit
Test function checking that a deposit never reduces the value of pool tokens. Since curve calculations use unsigned integers, there is potential for
client/src/pool_utils/calculator.rs:445
Functioncheck_pool_value_from_withdraw
Test function checking that a withdraw never reduces the value of pool tokens. Since curve calculations use unsigned integers, there is potential for
client/src/pool_utils/calculator.rs:496
Functioncheck_withdraw_token_conversion
Test function to check that withdrawing token A is the same as withdrawing both and swapping one side. Since calculations use unsigned integers, there
client/src/pool_utils/calculator.rs:304
Functionconstant_product_no_fee
()
client/src/pool_utils/base.rs:378
Functionconstant_product_owner_fee
()
client/src/pool_utils/base.rs:333
Functionconstant_product_swap_rounding
()
client/src/pool_utils/constant_product.rs:378
Functionconstant_product_trade_fee
()
client/src/pool_utils/base.rs:287
Methoddefault
()
client/src/pool_utils/base.rs:168
Methoddeposit_single_token_type
Get the amount of pool tokens for the deposited amount of token A or B.
client/src/pool_utils/constant_product.rs:205
Methoddeposit_single_token_type
Get the amount of pool tokens for the given amount of token A and B For the constant price curve, the total value of the pool is weighted by the price
client/src/pool_utils/constant_price.rs:150
Methoddeposit_single_token_type
Get the amount of pool tokens for the given amount of token A or B. Re-implementation of `calc_token_amount`: <https://github.com/curvefi/curve-contr
client/src/pool_utils/stable.rs:267
Methoddeposit_single_token_type
Get the amount of pool tokens for the given amount of token A and B, taking into account the offset
client/src/pool_utils/offset.rs:81
Methodderef
(&self)
client/src/serialize/token.rs:56
Methodeq
(&self, other: &Self)
client/src/pool_utils/base.rs:193
Functionfail_trading_token_conversion
()
client/src/pool_utils/constant_product.rs:326
Methodfmt
(&self, f: &mut fmt::Formatter)
client/src/serialize/token.rs:49
Methodfrom
(e: SwapError)
client/src/error.rs:107
Methodfrom
(s: WrappedString)
client/src/serialize/token.rs:68
Methodfrom_int
(n: u64)
client/src/pool_utils/serum.rs:70
Methodfrom_srm_and_msrm_balances
(market: &Pubkey, srm_held: u64, msrm_held: u64)
client/src/pool_utils/serum.rs:87
Methodget_mints
(&self)
client/src/pools/serum.rs:226
Methodget_name
(&self)
client/src/pools/serum.rs:189
Methodget_name
(&self)
client/src/pools/aldrin.rs:191
Methodget_name
(&self)
client/src/pools/mercurial.rs:117
Methodget_name
(&self)
client/src/pools/saber.rs:145
Methodget_quote_with_amounts_scaled
( &self, amount_in: u128, mint_in: &Pubkey, _mint_out: &Pubkey, )
client/src/pools/serum.rs:245
Methodget_quote_with_amounts_scaled
( &self, scaled_amount_in: u128, mint_in: &Pubkey, mint_out: &Pubkey, )
client/src/pools/aldrin.rs:137
Methodget_quote_with_amounts_scaled
( &self, scaled_amount_in: u128, mint_in: &Pubkey, mint_out: &Pubkey, )
client/src/pools/mercurial.rs:78
Methodget_quote_with_amounts_scaled
( &self, scaled_amount_in: u128, mint_in: &Pubkey, mint_out: &Pubkey, )
client/src/pools/saber.rs:79
Methodget_update_accounts
(&self)
client/src/pools/serum.rs:193
Methodget_update_accounts
(&self)
client/src/pools/aldrin.rs:200
Methodget_update_accounts
(&self)
client/src/pools/mercurial.rs:132
Methodget_update_accounts
(&self)
client/src/pools/saber.rs:106
Methodhost_fee
Calculate the host fee based on the owner fee, only used in production situations where a program is hosted by multiple frontends
client/src/pool_utils/fees.rs:104
Functioninit_open_order
Convenience API to initialize an open orders account on the Serum DEX.
program/programs/tmp/src/lib.rs:54
Functioninit_program
(ctx: Context<InitSwapState>)
program/programs/tmp/src/lib.rs:23
Functioninitial_pool_amount
()
client/src/pool_utils/constant_product.rs:291
Methodis_initialized
(&self)
client/src/pool_utils/constant_product.rs:256
Methodis_initialized
(&self)
client/src/pool_utils/constant_price.rs:236
Methodis_initialized
(&self)
client/src/pool_utils/fees.rs:130
Methodis_initialized
(&self)
client/src/pool_utils/stable.rs:380
Methodis_initialized
(&self)
client/src/pool_utils/offset.rs:160
Functionmain
()
client/src/main.rs:52
Functionmain
()
client/src/tmp.rs:172
Functionmain
()
client/src/setup/setup_open_orders.rs:37
Functionmain
()
client/src/setup/setup_ata.rs:42
Methodmaker_rebate
(self, pc_qty: u64)
client/src/pool_utils/serum.rs:106
Functionmercurial
()
client/src/tests/quotes.rs:44
Functionmercurial_swap
(ctx: Context<'_, '_, '_, 'info, MercurialSwap<'info>>)
program/programs/tmp/src/lib.rs:62
FunctionmintToToken
(arr, mint)
onchain-data/index.ts:52
Methodmint_2_addr
(&self, _mint: &Pubkey)
client/src/pools/serum.rs:222
Methodmint_2_scale
(&self, mint: &Pubkey)
client/src/pools/serum.rs:235
Methodmint_2_scale
(&self, mint: &Pubkey)
client/src/pools/aldrin.rs:236
Methodmint_2_scale
(&self, mint: &Pubkey)
client/src/pools/mercurial.rs:168
Methodmint_2_scale
(&self, mint: &Pubkey)
client/src/pools/saber.rs:156
Methodnew
(quote: Rc<Box<dyn PoolOperations>>)
client/src/utils.rs:48
Methodnew_pool_supply
Get the supply for a new pool The default implementation is a Balancer-style fixed initial supply
client/src/pool_utils/calculator.rs:100
Methodnormalized_value
( &self, swap_token_a_amount: u128, swap_token_b_amount: u128, )
client/src/pool_utils/constant_product.rs:241
Methodnormalized_value
The normalized value of the offset curve simply needs to add the offset to the token B side before calculating
client/src/pool_utils/offset.rs:145
Functionorca
()
client/src/tests/quotes.rs:51
Functionorca_swap
(ctx: Context<'_, '_, '_, 'info, OrcaSwap<'info>>)
program/programs/tmp/src/lib.rs:58
Methodowner_withdraw_fee
Calculate the withdraw fee in pool tokens
client/src/pool_utils/fees.rs:76
Functionpack_constant_product_curve
()
client/src/pool_utils/constant_product.rs:337
Functionpack_curve
()
client/src/pool_utils/offset.rs:201
Functionpack_fees
()
client/src/pool_utils/fees.rs:191
Functionpack_flat_curve
()
client/src/pool_utils/constant_price.rs:310
Methodpack_into_slice
(&self, output: &mut [u8])
client/src/pool_utils/constant_product.rs:263
Methodpack_into_slice
(&self, output: &mut [u8])
client/src/pool_utils/constant_price.rs:243
Methodpack_into_slice
(&self, output: &mut [u8])
client/src/pool_utils/fees.rs:138
Methodpack_into_slice
Pack SwapCurve into a byte buffer
client/src/pool_utils/base.rs:232
Methodpack_into_slice
(&self, output: &mut [u8])
client/src/pool_utils/stable.rs:387
Methodpack_into_slice
(&self, output: &mut [u8])
client/src/pool_utils/offset.rs:167
Functionpack_swap_curve
()
client/src/pool_utils/base.rs:267
Functionparse_orca_swap_tx
(connection, tx)
onchain-data/orca.ts:59
Methodpool_tokens_to_trading_tokens
Get the amount of trading tokens for the given amount of pool tokens, provided the total trading tokens and supply of pool tokens. For the constant pr
client/src/pool_utils/constant_price.rs:105
Methodpool_tokens_to_trading_tokens
The conversion for the offset curve needs to take into account the offset
client/src/pool_utils/offset.rs:61
Functionprofit_or_revert
(ctx: Context<TokenAndSwapState>)
program/programs/tmp/src/lib.rs:38
Functionreferrer_rebate
(amount: u64)
client/src/pool_utils/serum.rs:142
Functionsaber
()
client/src/tests/quotes.rs:37
← previousnext →101–200 of 241, ranked by callers