Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ functions
Functions
10,747 in github.com/cowprotocol/services
⨍
Functions
10,747
◇
Types & classes
3,488
↓ 1 callers
Method
persist_last_indexed_block
(&mut self, _last_block: u64)
crates/event-indexing/src/event_handler.rs:747
↓ 1 callers
Method
pick_solve_deadline
(&self)
crates/autopilot/src/run_loop.rs:283
↓ 1 callers
Function
place
( state: axum::extract::State<State>, params: Params, )
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:216
↓ 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:207
↓ 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:78
↓ 1 callers
Function
policy
(fee: Fee, quote: &domain::Quote)
crates/autopilot/src/fee_engine.rs:226
↓ 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:525
↓ 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:859
↓ 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:24
↓ 1 callers
Function
price_error
An unpriced or rate-limited token is no liquidity, anything else is the autopilot misbehaving.
crates/solana-orderbook/src/infra/api/routes/quote/mod.rs:628
↓ 1 callers
Function
price_improvement
( trade: &Trade, quote: &order::Quote, )
crates/driver/src/domain/competition/solution/scoring.rs:499
↓ 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:227
↓ 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
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:574
↓ 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:153
↓ 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:714
↓ 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
prod_buckets
()
crates/autopilot/src/fee_engine.rs:369
↓ 1 callers
Function
prod_rules
`prod_buckets` and a 2 bps default as rules, the way prod configures them: a list and a rule per bucket, with the cap of the legacy fees.
crates/orderbook/src/fee_engine.rs:341
↓ 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:1207
↓ 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:733
↓ 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_without_retry
( &self, query: &str, variables: &Option<Map<String, Value>>, )
crates/liquidity-sources/src/subgraph.rs:63
↓ 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
(sell_amount: u64, buy_amount: u64)
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:1173
↓ 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:750
↓ 1 callers
Function
quote
(sell_amount: u64, buy_amount: u64)
crates/autopilot-svm/src/domain/fee.rs:130
↓ 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:2299
↓ 1 callers
Method
quoteExactOutputSingle
( data: &[u8], )
contracts/generated/contracts-generated/uniswapv3quoterv2/src/lib.rs:2280
↓ 1 callers
Function
quote_amounts
Quotes 1000 USDT into WETH, returning the amount out.
crates/simulator/src/state_override_stream.rs:1353
↓ 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. Failures are logged, counted and swallowed: a `QuotingFailed` reply means no route, which is a routine outcome, while any
crates/solana-orderbook/src/infra/quoter.rs:172
↓ 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:606
↓ 1 callers
Method
quote_tx_origin
(&self)
crates/driver/src/infra/solver/mod.rs:362
↓ 1 callers
Method
quote_volume_fee
( &self, order: &Order, _: &Quote, _: &ValidatedAppData, _: Option<&st
crates/shared/src/fee.rs:319
↓ 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
Quote `order` on every driver concurrently and return every answer. With `early_return`, return as soon as that many drivers answered and cancel the r
crates/solana-orderbook/src/infra/quoter.rs:146
↓ 1 callers
Method
quotes
All quotes sorted from best to worst. Guaranteed to be non-empty.
crates/shared/src/order_quoting.rs:338
↓ 1 callers
Function
quoting
Observe that the quoting process is about to start.
crates/driver/src/infra/observe/mod.rs:464
↓ 1 callers
Function
random_fulfillment
A partially filled fulfillment on either side with a fee already in it, at uniform prices that mostly put it over its limit and sometimes under, the l
crates/driver/src/domain/competition/solution/fee.rs:658
↓ 1 callers
Function
random_policy
(rng: &mut StdRng)
crates/protocol-fees/src/tests.rs:186
↓ 1 callers
Function
random_policy
(rng: &mut StdRng)
crates/driver/src/domain/competition/solution/fee.rs:625
↓ 1 callers
Function
random_policy
(rng: &mut StdRng)
crates/driver/src/domain/competition/solution/scoring.rs:565
↓ 1 callers
Function
random_policy
(rng: &mut StdRng)
crates/autopilot/src/domain/settlement/trade/math.rs:621
↓ 1 callers
Function
random_trade
A trade on either side at a random price vector: the legs scaled by a random factor, so the custom prices are not the legs themselves.
crates/driver/src/domain/competition/solution/scoring.rs:595
↓ 1 callers
Function
random_trade
A trade on either side with both price vectors at or over the limit, the uniform one at least as good for the user as the custom one, each as its legs
crates/autopilot/src/domain/settlement/trade/math.rs:650
↓ 1 callers
Function
rate_limited
( rate_limiter: Arc<RateLimiter>, estimation: impl Future<Output = Result<T, PriceEstimationError>>, )
crates/price-estimation/src/lib.rs:300
↓ 1 callers
Method
rate_limiter
(&self, name: &str)
crates/price-estimation/src/factory.rs:177
← previous
next →
3,301–3,400 of 10,747, ranked by callers