MCPcopy Create free account

hub / github.com/cowprotocol/services / functions

Functions8,522 in github.com/cowprotocol/services

↓ 3 callersMethodsurplus_over_limit_price
Uses custom prices to calculate the surplus after the protocol fee and network fee are applied.
crates/autopilot/src/domain/settlement/trade/math.rs:292
↓ 3 callersMethodsurplus_token
(&self)
crates/autopilot/src/domain/settlement/trade/math.rs:407
↓ 3 callersMethodswap
Encodes a pool swap as an interaction. Returns `Err` if the swap parameters are invalid for the pool, specifically if the input and output tokens don'
crates/driver/src/domain/liquidity/swapr.rs:27
↓ 3 callersMethodsymbol
Fetch the ERC20 token symbol. Returns `None` if the token does not implement this optional method. See the symbol method in EIP-20. https://eips.ethe
crates/driver/src/infra/blockchain/token.rs:60
↓ 3 callersMethodtarget
The buy amount for [`Side::Buy`] orders, or the sell amount for [`Side::Sell`] orders.
crates/driver/src/domain/competition/order/mod.rs:132
↓ 3 callersFunctiontest_baseline_source
( web3: &Web3, version: &str, source: BaselineSource, token0: Address,
crates/liquidity-sources/src/uniswap_v2/mod.rs:199
↓ 3 callersFunctiontest_order_availability_in_api
( services: &Services<'_>, order: &ExtendedEthFlowOrder, owner: &Address, contracts: &Contract
crates/e2e/tests/e2e/ethflow.rs:673
↓ 3 callersMethodtimed_future
Runs the future and collects runtime metrics.
crates/autopilot/src/solvable_orders.rs:494
↓ 3 callersMethodto_big_rational
(&self)
crates/number/src/u256_ext.rs:90
↓ 3 callersFunctionto_normalized_price
Convert from floating point price to normalized price
crates/price-estimation/src/native/mod.rs:47
↓ 3 callersMethodto_quote_request
How a user trade intent is converted into a quote request by the frontend
crates/e2e/tests/e2e/ethflow.rs:1030
↓ 3 callersFunctiontrade_from
( row: TradesQueryRow, executed_protocol_fees: Vec<ExecutedProtocolFee>, )
crates/orderbook/src/database/trades.rs:152
↓ 3 callersMethodtraded_tokens
Returns all tokens traded by this pool in stable order.
crates/cow-amm/src/amm.rs:42
↓ 3 callersMethodtrader
(&self)
crates/driver/src/domain/competition/order/mod.rs:139
↓ 3 callersMethodtry_to_ecdsa_scheme
(&self)
crates/model/src/signature.rs:243
↓ 3 callersMethodtry_to_model_order_quote
Converts this Quote to model OrderQuote.
crates/shared/src/order_quoting.rs:151
↓ 3 callersMethodupdate_cache_at_block
(&self, new_block: u64)
crates/liquidity-sources/src/recent_block_cache.rs:230
↓ 3 callersMethodupload
Upload the bytes json encoded to the configured S3 bucket. Returns the key under which the file can be queried
crates/s3/src/lib.rs:80
↓ 3 callersMethodupscale_balances_with_token_indices
( &self, in_token: &Address, out_token: &Address, )
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:193
↓ 3 callersMethodupscaled_balance
Converts the stored balance into its internal representation as a Balancer fixed point number.
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:47
↓ 3 callersMethodurl
Returns a reference to the underlying RPC URL.
crates/autopilot/src/infra/blockchain/mod.rs:56
↓ 3 callersMethodvalidate_app_data
Validates the provided app data, returning an [`OrderAppData`] if valid. The validation entails verifying that the app data is well formed and its si
crates/shared/src/order_validation.rs:714
↓ 3 callersMethodwinners
All solutions that won the right to get executed.
crates/autopilot/src/domain/competition/winner_selection.rs:257
↓ 3 callersMethodwith_block_timestamp
(&mut self, timestamp: u32)
crates/refunder/src/traits.rs:99
↓ 3 callersMethodwith_id
Returns `self` with a new id.
crates/solvers/src/domain/solution.rs:32
↓ 3 callersMethodwith_rank
(self, rank_type: RankType)
crates/winner-selection/src/state.rs:116
↓ 3 callersMethodwith_refundable_orders
(&mut self, orders: Vec<EthOrderPlacement>)
crates/refunder/src/traits.rs:136
↓ 3 callersMethodwith_slippage_bps
Set slippage in basis points (e.g., 500 = 5%).
crates/e2e/tests/e2e/refunder.rs:146
↓ 3 callersMethodwith_verification
Configures if verified price estimates should be ranked higher than unverified ones even if the price is worse. Per default verified quotes do not get
crates/price-estimation/src/competition/mod.rs:65
↓ 3 callersFunctionwrite_last_block_to_db
(db: &PgPool, last_block: u64, contract: &str)
crates/autopilot/src/boundary/events/mod.rs:8
↓ 2 callersFunctionabsolute_slippage_amount
(relative: &BigRational, amount: &BigInt)
crates/solver/src/liquidity/slippage.rs:191
↓ 2 callersFunctionabsolute_to_relative
Converts an absolute slippage value to a relative slippage value based on the amount and asset's price.
crates/solvers/src/domain/dex/shared.rs:28
↓ 2 callersMethodadd_order
( &self, payload: OrderCreation, )
crates/orderbook/src/orderbook.rs:276
↓ 2 callersFunctionadd_swap_fee_amount
(amount: U256, swap_fee: Bfp)
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:30
↓ 2 callersMethodaddress
(&self)
crates/event-indexing/src/event_handler.rs:174
↓ 2 callersFunctionadjustments
(mempools: &[mempool::Config])
crates/driver/src/infra/blockchain/gas.rs:126
↓ 2 callersFunctionall_order_events
(ex: &mut PgConnection)
crates/database/src/order_events.rs:254
↓ 2 callersMethodall_trades
(&self)
crates/solver/src/settlement/settlement_encoder.rs:129
↓ 2 callersMethodammDeterministicAddress
( data: &[u8], )
contracts/generated/contracts-generated/cowammconstantproductfactory/src/lib.rs:2272
↓ 2 callersMethodamount
Check that the quote returns the expected amount of tokens. This is based on the state of the blockchain and the test setup.
crates/driver/src/tests/setup/mod.rs:1540
↓ 2 callersMethodamplification_parameter_u256
(&self)
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:217
↓ 2 callersFunctionappend
( ex: &mut PgTransaction<'_>, events: &[(EventIndex, OnchainOrderPlacement)], )
crates/database/src/onchain_broadcasted_orders.rs:68
↓ 2 callersMethodappend_events
(&mut self, events: Vec<(AlloyUniswapV3PoolEvents, Log)>)
crates/liquidity-sources/src/uniswap_v3/event_fetching.rs:105
↓ 2 callersMethodappend_to_execution_plan
(&mut self, interaction: Arc<dyn Interaction>)
crates/solver/src/settlement/settlement_encoder.rs:350
↓ 2 callersMethodapply
Converts an order from the boundary layer to the domain layer, applying protocol fees if necessary.
crates/autopilot/src/domain/fee/mod.rs:244
↓ 2 callersMethodapply_position_delta_to_pool_liq
Applies a position-liquidity delta to the pool's *active liquidity. Uniswap V3 only moves `pool.liquidity` when the current `tick` falls within `[lowe
crates/pool-indexer/src/indexer/uniswap_v3.rs:937
↓ 2 callersFunctionapprove
(allowance: &Allowance)
crates/driver/src/domain/competition/solution/encoding.rs:314
↓ 2 callersMethodas_encoded
(&self)
crates/solver/src/interactions/erc20.rs:20
↓ 2 callersMethodas_transaction_request
(&self)
crates/simulator/src/simulation_builder.rs:445
↓ 2 callersFunctionassert_and_propagate_panics
Runs the given closure and updates a flag if it panics.
crates/solvers/src/tests/mock/http.rs:200
↓ 2 callersFunctionassert_volume_fee
( trade: &model::trade::Trade, expected_fee_token: ::alloy::primitives::Address, expected_factor:
crates/e2e/tests/e2e/protocol_fee.rs:1613
↓ 2 callersMethodasset
(data: &[u8])
contracts/generated/contracts-generated/ierc4626/src/lib.rs:435
↓ 2 callersMethodauction
(auction_id: domain::auction::Id)
crates/autopilot/src/run_loop.rs:1054
↓ 2 callersMethodauction
(&self)
crates/autopilot/src/run.rs:80
↓ 2 callersMethodbadd
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:16
↓ 2 callersMethodbalance
Returns the current [`eth::Ether`] balance of the specified account.
crates/driver/src/infra/blockchain/mod.rs:218
↓ 2 callersMethodbalances
(&self)
crates/driver/src/tests/setup/mod.rs:1205
↓ 2 callersFunctionbang_for_buck_ranking
Builds a `BestBangForBuck` setup where every token is estimated to be half as valuable as ETH and the gas price is 2. That effectively means every uni
crates/price-estimation/src/competition/quote.rs:270
↓ 2 callersMethodbanned
Returns the subset of `addresses` that are banned. Cache misses hit the configured remote sources.
crates/order-validation/src/banned/mod.rs:63
↓ 2 callersMethodbase_pool_at
Returns a Balancer base pool contract instance at the specified address.
crates/liquidity-sources/src/balancer_v2/pools/common.rs:63
↓ 2 callersFunctionbase_token_pairs
All token pairs between base tokens.
crates/liquidity-sources/src/base_tokens.rs:120
↓ 2 callersMethodbdiv_down
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:24
↓ 2 callersMethodblocks_passed
(self)
crates/driver/src/domain/mempools.rs:482
↓ 2 callersMethodbmul
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:12
↓ 2 callersFunctionbootstrap
Runs the bootstrap phase (seed + catch-up to the finalized head) for every factory, then returns. Binds no HTTP ports — meant to run as a separate ste
crates/pool-indexer/src/run.rs:42
↓ 2 callersFunctionbootstrap_factory
Seed + catch-up for a fresh factory. If a checkpoint already exists, skip straight to live indexing.
crates/pool-indexer/src/run.rs:239
↓ 2 callersFunctionbuild_provider_checked
Builds the RPC provider and asserts the node's chain_id matches config. Catches misconfigured RPC-vs-network pairings (e.g. chain_id=1 pointed at an A
crates/pool-indexer/src/run.rs:287
↓ 2 callersMethodbuild_quote_params
( &self, request: &OrderQuoteRequest, )
crates/orderbook/src/quoter.rs:242
↓ 2 callersFunctionbuild_replay_simulation
Shared builder for the positive replay (`APP_DATA`) and the flashloan-tampered negative replay.
crates/simulator/tests/aave_replay.rs:133
↓ 2 callersFunctionbuild_swap_event
(block_number: u64, tick: usize)
crates/liquidity-sources/src/uniswap_v3/event_fetching.rs:147
↓ 2 callersMethodbuilder
Returns a `ClientBuilder` with the default settings.
crates/price-estimation/src/utils/http_client_factory.rs:37
↓ 2 callersMethodbuy
(&self)
crates/driver/src/domain/competition/solution/trade.rs:54
↓ 2 callersMethodbuy_amount
The effective amount the user received after all fees. Note how the `executed` amount is used to build actual traded amounts. Settlement contract us
crates/driver/src/domain/competition/solution/scoring.rs:208
↓ 2 callersMethodbuy_amount
The effective amount the user received after all fees. Note how the `executed` amount is used to build actual traded amounts. Settlement contract us
crates/autopilot/src/domain/settlement/trade/math.rs:206
↓ 2 callersMethodbuy_amount
Calculate effective buy amount (what user received).
crates/winner-selection/src/arbitrator.rs:554
↓ 2 callersMethodbuy_token_balance
(&self)
crates/autopilot/src/domain/settlement/transaction/tokenized.rs:82
↓ 2 callersFunctionbuy_token_destination_from
(destination: DbBuyTokenDestination)
crates/shared/src/db_order_conversions.rs:267
↓ 2 callersMethodbuys_eth
Does this order buy ETH?
crates/driver/src/domain/competition/order/mod.rs:153
↓ 2 callersMethodcache
(&self)
crates/price-estimation/src/native_price_cache.rs:360
↓ 2 callersFunctioncache_config
The default pool caching configuration to use.
crates/driver/src/boundary/liquidity/mod.rs:34
↓ 2 callersFunctioncached
Create a cached [`BalanceFetching`] instance.
crates/account-balances/src/lib.rs:92
↓ 2 callersMethodcaching_native_price_estimator_from_inner
Creates a [`CachingNativePriceEstimator`] from a pre-built inner estimator.
crates/price-estimation/src/factory.rs:458
↓ 2 callersFunctioncalc_in_given_out_approx
https://github.com/balancer-labs/balancer-v2-monorepo/blob/stable-deployment/pvt/helpers/src/models/pools/stable/math.ts#L108
crates/liquidity-sources/src/balancer_v2/swap/stable_math.rs:301
↓ 2 callersFunctioncalc_out_given_in_approx
https://github.com/balancer-labs/balancer-v2-monorepo/blob/stable-deployment/pvt/helpers/src/models/pools/stable/math.ts#L86
crates/liquidity-sources/src/balancer_v2/swap/stable_math.rs:320
↓ 2 callersFunctioncalculate_submission_gas_price
( gas_price_of_last_submission: Option<Eip1559Estimation>, web3_gas_estimation: Eip1559Estimation,
crates/refunder/src/submitter.rs:107
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/ierc4626/src/lib.rs:611
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/iuniswapv3factory/src/lib.rs:1237
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/solver/src/lib.rs:849
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/src/lib.rs:1115
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/hookstrampoline/src/lib.rs:1208
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/gashog/src/lib.rs:737
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/flashloanrouter/src/lib.rs:378
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balancerqueries/src/lib.rs:804
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/swapper/src/lib.rs:1500
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/uniswapv2factory/src/lib.rs:1072
↓ 2 callersMethodcall_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balancerv2authorizer/src/lib.rs:1397
↓ 2 callersFunctioncancel_order
( ex: &mut PgConnection, order_uid: &OrderUid, timestamp: DateTime<Utc>, )
crates/database/src/orders.rs:465
↓ 2 callersMethodcancel_orders
(&self, order_uids: Vec<OrderUid>, now: DateTime<Utc>)
crates/orderbook/src/database/orders.rs:233
↓ 2 callersFunctioncanonicalise_app_data
Minifies `app_data` with keys sorted alphabetically.
crates/simulator/tests/aave_replay.rs:62
↓ 2 callersMethodcap_gas_limit
Cap the transaction's gas limit at the configured per-tx gas limit so a rogue solution can't force the node to binary-search up to the block gas limit
crates/simulator/src/ethereum/mod.rs:92
← previousnext →901–1,000 of 8,522, ranked by callers