Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ functions
Functions
10,736 in github.com/cowprotocol/services
⨍
Functions
10,736
◇
Types & classes
3,464
↓ 1 callers
Function
path_candidates
( sell_token: Address, buy_token: Address, base_tokens: &HashSet<Address>, max_hops: usize, )
crates/solvers/src/boundary/routing.rs:186
↓ 1 callers
Method
path_candidates_with_hops
Returns possible path candidates with the specified number of maximum hops.
crates/liquidity-sources/src/base_tokens.rs:71
↓ 1 callers
Method
pays_to_contract
Does this order pay to a smart contract?
crates/driver/src/domain/competition/order/mod.rs:152
↓ 1 callers
Method
penalty_cap_native
The CIP-87 penalty cap for a fast-path order: the same cap a regular auction would assign, or 0 when the calculator is disabled.
crates/autopilot/src/fast_path.rs:482
↓ 1 callers
Method
pending_chunks
(&self, last_indexed_block: u64, finalized_block: u64)
crates/pool-indexer/src/indexer/uniswap_v3.rs:241
↓ 1 callers
Function
pending_fast_path_order
( ex: &mut PgConnection, uid: &OrderUid, )
crates/database/src/fast_path.rs:108
↓ 1 callers
Method
pending_fast_path_order
( &self, uid: domain::OrderUid, )
crates/autopilot/src/infra/persistence/mod.rs:1104
↓ 1 callers
Function
percentile
The nearest-rank `p`-th percentile of an ascending sample: the smallest value with at least `p` percent of the sample at or below it, so 0 is the mini
crates/solana-driver/src/domain/priority_fee.rs:172
↓ 1 callers
Method
permit
(&self, owner: &TestAccount, spender: Address, value: U256)
crates/e2e/src/setup/onchain_components/mod.rs:137
↓ 1 callers
Method
persist_chunk
Persists the chunk's changes and advances the checkpoint in a single transaction. Returns `true` if this writer applied the chunk, or `false` if anoth
crates/pool-indexer/src/indexer/uniswap_v3.rs:374
↓ 1 callers
Method
persist_competition_ranking
( &self, _: &TestAuction, _: &u64, _: &NoRanking,
crates/autopilot-svm/src/run_loop.rs:452
↓ 1 callers
Method
persist_last_indexed_block
(&mut self, _last_block: u64)
crates/event-indexing/src/event_handler.rs:747
↓ 1 callers
Function
policies
The fees of the first rule that matched, the one the engine charges, then the partner fees. `quote` is the reference of price improvement fees.
crates/autopilot/src/fee_engine.rs:98
↓ 1 callers
Method
policies
The policies as the generic fee math sees them. The score flag is read by [`Self::fees`], not by the fee math.
crates/driver/src/domain/competition/solution/scoring.rs:139
↓ 1 callers
Method
policies_at
The upcoming policies once their timestamp has passed, the current ones until then. An empty upcoming list never takes over, like on EVM.
crates/autopilot-svm/src/domain/fee.rs:71
↓ 1 callers
Function
policy
(fee: Fee, quote: &domain::Quote)
crates/autopilot/src/fee_engine.rs:117
↓ 1 callers
Method
policy
The policy as the auction attached it. A price improvement policy measures against `quote`.
crates/autopilot-svm/src/infra/order_execution.rs:249
↓ 1 callers
Function
pool_address_from_id
Extract the pool address from an ID. This takes advantage that the first 20 bytes of the ID is the address of the pool. For example the GNO-BAL pool
crates/liquidity-sources/src/balancer_v2/pool_fetching/mod.rs:449
↓ 1 callers
Method
pool_by_id
Returns a pool by ID or none if no such pool exists.
crates/liquidity-sources/src/balancer_v2/pool_fetching/pool_storage.rs:106
↓ 1 callers
Function
pool_created_token_addresses
Collects the unique set of token addresses from all `PoolCreated` events emitted by `factory` in `logs`.
crates/pool-indexer/src/indexer/uniswap_v3.rs:801
↓ 1 callers
Function
pool_event_emitters
Unique emitter addresses for the per-pool events (`Initialize`/`Swap`/`Mint`/`Burn`). Feeds the DB lookup that filters out foreign emitters before `co
crates/pool-indexer/src/indexer/uniswap_v3.rs:442
↓ 1 callers
Function
pool_id
(pool: &WeightedProductOrder)
crates/driver/src/boundary/liquidity/balancer/v2/weighted.rs:63
↓ 1 callers
Function
pool_id
(pool: &StablePoolOrder)
crates/driver/src/boundary/liquidity/balancer/v2/stable.rs:59
↓ 1 callers
Method
pool_ids_for_token_pair
Returns all pools containing both tokens from `TokenPair`
crates/liquidity-sources/src/balancer_v2/pool_fetching/pool_storage.rs:80
↓ 1 callers
Method
pool_ids_for_token_pairs
Given a collection of `TokenPair`, returns all pools containing at least one of the pairs.
crates/liquidity-sources/src/balancer_v2/pool_fetching/pool_storage.rs:98
↓ 1 callers
Function
pool_state
( version: Version, info: PoolInfo, common: BoxFuture<'static, common::PoolState>, )
crates/liquidity-sources/src/balancer_v2/pools/weighted.rs:120
↓ 1 callers
Method
pools_by_id
(&self, pool_ids: HashSet<B256>, block: Block)
crates/liquidity-sources/src/balancer_v2/pool_fetching/cache.rs:59
↓ 1 callers
Method
post_interactions
(&self)
crates/driver/src/domain/competition/solution/mod.rs:278
↓ 1 callers
Method
post_process_settlement
(&self, settlement: super::SettlementEvent)
crates/autopilot/src/domain/settlement/observer.rs:86
↓ 1 callers
Method
post_processing
( &self, auction: &domain::Auction, ranking: &Ranking, block_deadline: u64,
crates/autopilot/src/run_loop.rs:587
↓ 1 callers
Function
post_single
( state: State, path: Option<String>, query: Option<String>, req: serde_json::Value, )
crates/solvers/src/tests/mock/http.rs:247
↓ 1 callers
Function
postprocessing
Observe that postprocessing (encoding & merging) of solutions is about to start.
crates/driver/src/infra/observe/mod.rs:104
↓ 1 callers
Function
postprocessing_timed_out
(solver: &Solver, auction_id: Option<auction::Id>)
crates/driver/src/infra/notify/mod.rs:145
↓ 1 callers
Method
pre_interaction
(mut self, interaction: Interaction)
crates/driver/src/tests/setup/mod.rs:275
↓ 1 callers
Function
pre_signature_event
( ex: &mut PgTransaction<'_>, block_number: i64, owner: Address,
crates/database/src/orders.rs:1949
↓ 1 callers
Function
preparation_step
Classify one preparation instruction against the sponsored template and pin every account it touches to the order. The funder pays for the whole trans
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:1008
↓ 1 callers
Method
prepare_simulation
( &self, order: &Order, full_app_data: &str, full_balance_check: bool, )
crates/shared/src/order_creation_simulation.rs:107
↓ 1 callers
Method
prepare_state_overrides
Configures all the state overrides that are needed to mock the given trade (approval, sell_token balance, helper contract at solver address, allow lis
crates/price-estimation/src/trade_verifier.rs:518
↓ 1 callers
Method
prepare_url
(&self, cid: &str)
crates/orderbook/src/ipfs.rs:54
↓ 1 callers
Function
prepend_panic_handler
Installs a panic handler that executes [`handler`] plus whatever panic handler was already set up. This can be useful to make absolutely sure to clean
crates/observe/src/panic_hook.rs:44
↓ 1 callers
Function
price_improvement
( trade: &Trade, quote: &order::Quote, )
crates/driver/src/domain/competition/solution/scoring.rs:499
↓ 1 callers
Function
price_improvement
(quote: &domain::Quote)
crates/autopilot/src/fee_engine.rs:245
↓ 1 callers
Function
price_improvement
( trade: &Trade, quote: &domain::fee::Quote, )
crates/autopilot/src/domain/settlement/trade/math.rs:513
↓ 1 callers
Function
price_improvement_over_quote
Calculate price improvement over quote. Returns 0 if there's no improvement (instead of error).
crates/protocol-fees/src/lib.rs:442
↓ 1 callers
Method
price_in_buy_token_f64
The price of the estimate denominated in buy token. The resulting price is how many units of buy_token are bought for one unit of sell_token (buy_amo
crates/price-estimation/src/lib.rs:232
↓ 1 callers
Method
prices
The autopilot's native prices, which gate quotes.
crates/solana-orderbook/src/infra/api/mod.rs:271
↓ 1 callers
Method
prices
The uniform price vector this settlement proposes. Deprecated: only emitted on the `/solve` response so that autopilots running the previous code can
crates/driver/src/domain/competition/solution/settlement.rs:328
↓ 1 callers
Function
print_result
Prints the compute units the simulation used against the settlement's `declared_limit`, where it fails and its logs.
crates/solana-orderbook/examples/decode_bundle.rs:250
↓ 1 callers
Method
prioritization_fees
The fees recently paid over the accounts `solution`'s interactions write. A quote's settlement accounts are placeholders, so only the interactions' ac
crates/solana-driver/src/domain/competition.rs:590
↓ 1 callers
Function
probe_aave_token
Probes whether `token` is an Aave v3 aToken and returns its `(pool, underlying)` pair. Accepts the token iff the pool registers it as the aToken for i
crates/balance-overrides/src/balance/aave.rs:123
↓ 1 callers
Function
process_batch
(mut inner: S, batch: Vec<(SerializedRequest, ResponseSender)>)
crates/ethrpc/src/alloy/buffering.rs:394
↓ 1 callers
Function
process_frame
Traverses the call stack and pushes relevant calls to `events`. Introspection of the `settle()` call gets forwarded to [`process_settle_frame`].
crates/simulator/src/report.rs:109
↓ 1 callers
Method
process_order_backlog
Fast-path orders sitting with `valid_from IS NULL` when the autopilot starts up are the backlog left behind by a restart or downtime — their `new_orde
crates/autopilot/src/fast_path.rs:154
↓ 1 callers
Function
process_settle_frame
This function expects to get the [`CallFrame`] of the `settle()` call to be passed in. Since we are only interested in a relatively high level report
crates/simulator/src/report.rs:159
↓ 1 callers
Method
process_settle_request
The settlement worker spawned by [`settle`](Self::settle). A send failure does not restore the solution: the transaction may have reached the network
crates/solana-driver/src/domain/competition.rs:733
↓ 1 callers
Method
process_settle_request
( &self, auction_id: auction::Id, solution_id: u64, submission_deadline: Block
crates/driver/src/domain/competition/mod.rs:952
↓ 1 callers
Function
protocol_fee
The protocol fee of the trades filling `order`. `Settlement::new` already bounded the sum, so it cannot saturate.
crates/solana-driver/src/domain/settlement.rs:774
↓ 1 callers
Function
protocol_fee
Calculate a single protocol fee based on policy type.
crates/protocol-fees/src/lib.rs:135
↓ 1 callers
Function
protocol_fee
( fulfillment: &Fulfillment, prices: ClearingPrices, protocol_fee: &FeePol
crates/driver/src/domain/competition/solution/fee.rs:411
↓ 1 callers
Function
protocol_fee
( trade: &Trade, fee_policy: &FeePolicy, )
crates/driver/src/domain/competition/solution/scoring.rs:468
↓ 1 callers
Function
protocol_fee
( trade: &Trade, fee_policy: &fee::Policy, )
crates/autopilot/src/domain/settlement/trade/math.rs:482
↓ 1 callers
Function
protocol_fee_in_sell_token
( fulfillment: &Fulfillment, prices: ClearingPrices, policy: &FeePolicy,
crates/driver/src/domain/competition/solution/fee.rs:507
↓ 1 callers
Method
protocol_fee_in_sell_token
Sum of the given protocol fees, converted into sell token at the custom prices.
crates/autopilot/src/domain/settlement/trade/math.rs:111
↓ 1 callers
Function
protocol_fees
( trade: &Trade, fee_policies: &HashMap<OrderUid, impl AsRef<[fee::Policy]>>,
crates/autopilot/src/domain/settlement/trade/math.rs:404
↓ 1 callers
Function
protocol_fees
Calculate total protocol fees for an order. Returns the total fee in the surplus token.
crates/winner-selection/src/arbitrator.rs:377
↓ 1 callers
Method
protocol_fees
(&self)
crates/driver/src/domain/competition/solution/trade.rs:33
↓ 1 callers
Function
proves_failure
Whether the error proves the settlement fails on chain, as opposed to the driver failing to find out. Only a proof drops a solution at solve time: an
crates/solana-driver/src/domain/competition.rs:1245
↓ 1 callers
Method
provide_context
(&self, query: &Query)
crates/price-estimation/src/competition/quote.rs:260
↓ 1 callers
Method
provider
(&self)
crates/liquidity-sources/src/balancer_v2/pool_fetching/registry.rs:40
↓ 1 callers
Function
pubkey
(byte: u8)
crates/solana-driver/src/domain/quote.rs:66
↓ 1 callers
Function
publish
Enqueues the event to be sent to the event bus in a background task.
crates/observe/src/event_bus/mod.rs:168
↓ 1 callers
Function
publish_messages
Reads messages off the in-memory queue and hands the publish ack future off to [`await_acks`].
crates/observe/src/event_bus/mod.rs:108
↓ 1 callers
Method
put_app_data_document
( &self, app_data: Option<AppDataHash>, document: AppDataDocument, )
crates/e2e/src/setup/services.rs:725
↓ 1 callers
Method
query
(&mut self)
crates/leader-lock/src/leader_pg_lock.rs:188
↓ 1 callers
Function
query_order_refund_status
Queries on-chain refund status for a single order. Returns `None` if the status query fails. Marks orders as `Invalid` if the owner cannot receive ET
crates/refunder/src/refund_service.rs:48
↓ 1 callers
Method
query_timeout
How long a query may take before it fails: 5 s. 2 s between pings plus 5 s stays under the leader's 8 s, so a stuck ping fails first.
crates/leader-lock/src/leader_pg_lock.rs:162
↓ 1 callers
Method
query_without_retry
( &self, query: &str, variables: &Option<Map<String, Value>>, )
crates/liquidity-sources/src/subgraph.rs:63
↓ 1 callers
Function
quiet_blocks
Whether `n` blocks in a row pass without a new auction id.
crates/e2e/tests/e2e/autopilot_leader.rs:318
↓ 1 callers
Function
quote
Handle `POST /quote`: solve a one-order auction and answer with the executed amounts of its best route, the network fee of settling them and, for a re
crates/solana-driver/src/infra/api/routes/quote/mod.rs:28
↓ 1 callers
Function
quote
Ask the driver to sell the probe into `token`. An error is the `price_estimates` result the failure counts as: `QuotingFailed` means no route, 429 rat
crates/autopilot-svm/src/infra/prices.rs:796
↓ 1 callers
Function
quote
(sell_amount: u64, buy_amount: u64)
crates/autopilot-svm/src/domain/fee.rs:135
↓ 1 callers
Method
quote
Quote `order` for the settlement signer `taker`. `/swap` needs the taker to build the route.
crates/solana-solvers/src/dex/bitget/mod.rs:50
↓ 1 callers
Method
quote
( &self, order: &dex::Order, taker: &Pubkey, )
crates/solana-solvers/src/domain/solver/mod.rs:37
↓ 1 callers
Method
quote
Generate a quote for this order. This calls `/solve` on the solver with a "fake" auction which contains a single order, and then determines the quote
crates/driver/src/domain/quote.rs:156
↓ 1 callers
Method
quote
Quote an order using a UniswapV2 pool unless it already has concrete amounts. This determines the buy and sell amount of the order in the auction.
crates/driver/src/tests/setup/blockchain.rs:696
↓ 1 callers
Method
quoteExactInputSingle
( data: &[u8], )
contracts/generated/contracts-generated/uniswapv3quoterv2/src/lib.rs:2291
↓ 1 callers
Method
quoteExactOutputSingle
( data: &[u8], )
contracts/generated/contracts-generated/uniswapv3quoterv2/src/lib.rs:2272
↓ 1 callers
Function
quote_amounts
Quotes 1000 USDT into WETH, returning the amount out.
crates/simulator/src/state_override_stream.rs:1328
↓ 1 callers
Function
quote_auction
The single-order auction a quote is solved in. Everything beyond the pair and the amount is a placeholder: the settlement answered fills an order of t
crates/solana-driver/src/infra/api/routes/quote/mod.rs:96
↓ 1 callers
Method
quote_expiry
How long the quoted amounts are honored.
crates/solana-orderbook/src/infra/api/mod.rs:281
↓ 1 callers
Method
quote_id_for
The id the winning estimate's quote is stored under: the id its solver was asked with, or a freshly allocated one for quotes no solver was asked for (
crates/shared/src/order_quoting.rs:652
↓ 1 callers
Function
quote_ids_sent
(hits: &std::sync::Mutex<Vec<String>>)
crates/price-estimation/src/trade_finding/external.rs:402
↓ 1 callers
Function
quote_of
(in_amount: u64, out_amount: u64)
crates/solana-solvers/src/domain/solver/mod.rs:502
↓ 1 callers
Method
quote_one
Quote `order` on one driver. A failure is logged, counted and returned as its `price_estimates` result: a `QuotingFailed` reply means no route, which
crates/solana-orderbook/src/infra/quoter.rs:197
↓ 1 callers
Function
quote_req
Create a request for the driver /quote endpoint.
crates/driver/src/tests/setup/driver.rs:204
↓ 1 callers
Method
quote_settlement
The unsigned settlement of `solution`, filling `owner`'s order of the executed amounts in place of the placeholder `quoted`.
crates/solana-driver/src/domain/competition.rs:622
↓ 1 callers
Method
quote_tx_origin
(&self)
crates/driver/src/infra/solver/mod.rs:362
↓ 1 callers
Function
quoted
Observe the result of quoting an auction.
crates/driver/src/infra/observe/mod.rs:262
↓ 1 callers
Method
quoter
The driver that quotes orders.
crates/solana-orderbook/src/infra/api/mod.rs:266
↓ 1 callers
Method
quotes
All quotes sorted from best to worst. Guaranteed to be non-empty.
crates/shared/src/order_quoting.rs:338
← previous
next →
3,301–3,400 of 10,736, ranked by callers