Off-chain services for Gnosis Protocol v2

Overview

pull request deploy

Cow Protocol Services

This repository contains backend code for Cow Protocol Services written in Rust.

Order Book

The orderbook crate provides the http api through which users (usually through a frontend web application) interact with the order book. Users can add signed orders to the order book and query the state of their orders. They can also use the API to estimate fee amounts and limit prices before placing their order.

Solvers also interact with the order book by querying a list of open orders that they can attempt to settle.

The api is documented with openapi. A simple example script that uses the API to place random orders can be found in this repo

The order book service itself uses PostgreSQL as a backend to persist orders. In addition to connecting the http api to the database it also checks order validity based on the block time, trade events, erc20 funding and approval so that solvers can query only valid orders.

Solver

The solver crate is responsible for submitting on chain settlements based on the orders it gets from the order book and other liquidity sources like Balancer or Uniswap pools.

It implements a few settlement strategies directly in Rust:

  • Naive Solver: Can match to overlapping opposing orders (e.g. DAI for WETH & WETH for DAI) with one another settling the excess with Uniswap
  • Uniswap Baseline: Same path finding as used by the Uniswap frontend (settling orders individually instead of batching them together)

It can can also interact with a more advanced, Gnosis internal, closed source solver which tries to settle all orders using the combinatorial optimization formulations described in Multi-Token Batch Auctions with Uniform Clearing Price

Other Crates

Several pieces of functionality are shared between the order book and the solver. They live in other crates in the cargo workspace.

  • contract provides ethcontract-rs based smart contract bindings
  • model provides the serialization model for orders in the order book api
  • shared provides other shared functionality between the solver and order book

Testing

The CI runs unit tests, e2e tests, clippy and cargo fmt

Unit Tests:

cargo test

Integration Tests:

cargo test --jobs 1 -- --ignored --test-threads 1 --skip http_solver

Note: Requires postgres database running (see below).

E2E Tests

cargo test -p e2e.

Note: Requires postgres database and local test network with smart contracts deployed (see below).

Clippy

cargo clippy --all-features --all-targets -- -D warnings

Development Setup

Postgres

The tests that require postgres connect to the default database of a locally running postgres instance on the default port. There are several ways to set up postgres:

  • Docker
docker run -d -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_USER=`whoami` -p 5432:5432 docker.io/postgres
  • Host System Service
sudo systemctl start postgresql.service
sudo -u postgres createuser $USER
sudo -u postgres createdb $USER
  • Manual setup in local folder
mkdir postgres && cd postgres
initdb data # Arbitrary directory that stores the database
# In data/postgresql.conf set unix_socket_directories to the absolute path to an arbitrary existing
# and writable directory that postgres creates a temporary file in.
# Run postgres
postgres -D data
# In another terminal, only for first time setup
createdb -h localhost $USER

At this point the database should be running and reachable. You can test connecting to it with

psql postgresql://localhost/

DB Migration/Initialization

Finally, we need to apply the schema (set up in the database folder). Again, this can be done via docker or locally:

  • Docker
docker build --tag services-migration -f docker/Dockerfile.migration .
# If you are running postgres in locally, your URL is `localhost` instead of `host.docker.internal`
docker run -ti -e FLYWAY_URL="jdbc:postgresql://host.docker.internal/?user="$USER"&password=" -v $PWD/database/sql:/flyway/sql services-migration migrate

In case you run into java.net.UnknownHostException: host.docker.internal add --add-host=host.docker.internal:host-gateway right after docker run.

If you're combining a local postgres installation with docker flyway you have to add to the above --network host and change host.docker.internal to localhost.

flyway -user=$USER -password="" -locations="filesystem:database/sql/" -url=jdbc:postgresql:/// migrate

Local Test Network

In order to run the e2e tests you have to have a testnet running locally. Due to the RPC calls the services issue Ganache is incompatible, so we will use hardhat.

  1. Install npm
  2. Install hardhat with npm install --save-dev hardhat
  3. Create hardhat.config.js in the directory you installed hardhat in with following content:
    module.exports = {
        networks: { 
            hardhat: {
                initialBaseFeePerGas: 0,
                accounts: {
                    accountsBalance: "1000000000000000000000000"
                }
            }
        }
    };
  4. Run local testnet with npx hardhat node

Running the Services Locally

Prerequisites

Reading the state of the blockchain requires issuing RPC calls to an ethereum node. This can be a testnet you are running locally, some "real" node you have access to or the most convenient thing is to use a third party service like infura to get access to an ethereum node which we recommend. After you made a free infura account they offer you "endpoints" for the mainnet and different testnets. We will refer those as node-urls. Because services are only run on Mainnet, Rinkeby and Gnosis Chain you need to select one of those.

Note that the node-url is sensitive data. The orderbook and solver executables allow you to pass it with the --node-url parameter. This is very convenient for our examples but to minimize the possibility of sharing this information by accident you should consider setting the NODE_URL environment variable so you don't have to pass the --node-url argument to the executables.

To avoid confusion during your tests, always double check that the token and account addresses you use actually correspond to the network of the node-url you are running the executables with.

Orderbook

To see all supported command line arguments run cargo run --bin orderbook -- --help.

Run an orderbook on localhost:8080 with:

cargo run --bin orderbook -- \
  --skip-trace-api true \
  --skip-event-sync \
  --node-url <YOUR_NODE_URL>

--skip-event-sync will skip some work to speed up the initialization process.

--skip-trace-api true will make the orderbook compatible with more ethereum nodes. If your node supports trace_callMany you can drop this argument.

Solvers

To see all supported command line arguments run cargo run --bin solver -- --help.

Run a solver which is connected to an orderbook at localhost:8080 with:

cargo run -p solver -- \
  --solver-account 0xa6DDBD0dE6B310819b49f680F65871beE85f517e \
  --transaction-strategy DryRun \
  --node-url <YOUR_NODE_URL>

--transaction-strategy DryRun will make the solver only print the solution but not submit it on-chain. This command is absolutely safe and will not use any funds.

The solver-account is responsible for signing transactions. Solutions for settlements need to come from an address the settlement contract trusts in order to make the contract actually consider the solution. If we pass a public address, like we do here, the solver only pretends to be use it for testing purposes. To actually submit transactions on behalf of a solver account you would have to pass a private key of an account the settlement contract trusts instead. Adding your personal solver account is quite involved and requires you to get in touch with the team, so we are using this public solver address for now.

To make things more interesting and see some real orders you can connect the solver to our real orderbook service. There are several orderbooks for production and staging environments on different networks. Find the orderbook-url corresponding to your node-url which suits your purposes and connect your solver to it with --orderbook-url <URL>.

Orderbook URL Network Environment
https://barn.api.cow.fi/mainnet Mainnet Staging
https://api.cow.fi/mainnet Mainnet Production
https://barn.api.cow.fi/rinkeby Rinkeby Staging
https://api.cow.fi/rinkeby Rinkeby Production
https://barn.api.cow.fi/xdai Gnosis Chain Staging
https://api.cow.fi/xdai Gnosis Chain Production

Always make sure that the solver and the orderbook it connects to are configured to use the same network.

Frontend

To conveniently submit orders checkout the CowSwap frontend and point it to your local instance.

Comments
  • Add signature gas to FeeParameters

    Add signature gas to FeeParameters

    Fixes #420.

    A WIP implementation on gas estimation for on-chain signatures

    Test Plan

    Once I figure out what would be a good approach to implement this feature, I'll give additional information on how I'll test it.

    cc @nlordell I'd appreciate if you can take a look and give me additional guidance if I'm on the right track or not and if you have other thoughts on the implementation.

    opened by elpiel 25
  • Modifications for ETH flow:

    Modifications for ETH flow:

    This is a small write-up for the ETH-flow modification and how I am planning to do them. Any feedback is welcome.

    High level expectations on the ETH-flow orders:

    • User can query all their order including the ETH-flow orders via the api
    • Front-end should receive all the original order information — including the user address placing the order and the original valid_to of an order
    • Solvers and other API consumers should have always the possiblity to convert an ETH-flow order received from the api to the user_order( as the order was intended by the user) and contract_order ( as the order will be executed in the smart contract)
    • The specs must be compatible with the ETH-Flow contract specs

    Specification:

    • [ ] Part 1: Parsing order placements from smart contract events:
      • ETH-Flow event parsing:
        • Add ABI for ETHFlow contract and then use the existing EventUpdater to parse the new events
      • Event storing:
        • Create a new table ethflow_signatures_events with the fields: (block_number, log_index, order_uid, valid_to, user_addres, ...)
      • Event maintenance with reorg protection:
        • Modify replace_events() to also consider the newest blocks from ethflowsignatures in last_event_block and then use replace_events() in order to enable the existing reorg_protection for event parsing also for the ethflowsignature events
    • [ ] Part 2: Storing ETH-flow orders via API (While all eth-flow order information could be fully parsed from the events, we still require the front-end to place orders via the API, in order to allow the front-end to parse the quote information)
      • Create a new Signature type: EthFlow, in order to mark Eth-flow orders uniquely. The difference between EthFlow orders and EIP1271 orders is that the owner field is different: In Eth-Flow orders, the owner will be the real user_address placing the eth-flow order, and in EIP-1271 orders, it will be the contract that is supposed to be called on a smart contract level.
      • In validate_and_construct_order() create a separate handler for the Signature::EthFlow that checks:
        • Quote is valid and recent
        • Owner is the real user placing the order on the eth_hanlder
        • Valid_to should be the real valid to specified by the user
        • Receiver is not null and not the ethflow contract
        • Signature does not need to be checked, as it can always be constructed later on from the payload
        • Approvals are not checked, as they will be set from the EthFlow contract during deployment
        • The on-chain order does not yet have to be placed! Normally we would expect that the API call for order placement happens first
      • Do not allow EIP1271 orders with the eth-flow contract as the owner. Otherwise, there might be duplication of orders.
    • [ ] Part 3: Getting open orders for /auction endpoint:
      • Query only orders that we received via the API orders endpoint and for which we have a parsed ETH-flow event. This can be archived by appending two additional fields inORDERS_SELECT:
         ...,
           o.signing_scheme = ‘ethftlow’ AND (
          CASE WHEN EXISTS 
                (
             SELECT *
             FROM ethflowsignature_events p \
             WHERE o.uid = p.order_uid \
            LIMIT 1 ) \
          THEN 'true' \
          ELSE 'false' )AS eth_flow_order_pending \,
          (SELECT p.valid_to
             FROM ethflowsignature_events p \
             WHERE o.uid = p.order_uid \
            LIMIT 1 ) AS eth_flow_valid_to
    

    And then we can use the new variables eth_flow_order_pending and eth_flow_valid_to to determine whether an order is valid and whether it should be considered

    • [ ] PART 4: Settling Eth-Flow Orders:

      • Create a new function: create_eth_flow_signature that creates the signature from order data.
      • Use this new function to create the EIP1271 signature for the eth-flow
      • While encoding the settlement of an order, following modifications need to be made: - valid_to of the order should be set to uint(-1) - owner should be the eth-flow contract - (these two changes are the difference between the intended user order and the way order is placed by the eth flow contract, see table here )
    • [ ] Part 5: User payback service: – Periodically query all placed ETH orders that are not settled from the database

      • Check whether orders have been placed with sufficient slippage by comparing to quote
      • If all checks pass, initiate transactions that trigger the sth-flow contract to refund.
    • [ ] Part 6: Displaying orders to the front-end – Because the owner and the valid_to are the real ones specified by the user and are not the eth-flow contract and infinity, orders are being displayed correctly in the front-end

    • [ ] Part 7: Parse on-chain order invalidation:

    • Parse invalidation events from the blockchain using the EventUpdater

    • Put the events into a new database: invalidation_orders

    • To determine the status of an eth-flow order, always query invalidated_orders database as well.

    General thoughts

    Generally, the challenge of the proposal is that the there are two different kinds of orders - the real order with the real intend of the user and the order created by the eth-flow contract. There are small differences (cf. here) in these order types: The difference is so small that it does not justify the effort to introduce a completely new order type, but still big enough to introduce additional complexity. In the upper spec, the complexity is shifted into "payload encoding of an order". We could also go for the second approach and really introduce a new order type or at least a new field in the order that is representing the original user placing the eth-flow order.

    R&D 
    opened by josojo 24
  • Logs http solver instance and solution.

    Logs http solver instance and solution.

    I don't like that we're logging the instance (potentially large) multiple times, one for each solver. Things I thought of:

    1. Do the logging outside of the loop through the solvers, so that we only log instance once before entering the loop. The issue is that there we don't have the json representation yet I believe.
    2. Pass a boolean parameter to the http solver (log_instance). Arghhh :(
    3. Create a InstanceAndSolutionLogHandler class, instantiate one object of it inside the driver, and pass it as parameter to the all solvers. Seems like an overkill, and not very nice also.

    Any other ideas?

    opened by marcovc 20
  • Investigate

    Investigate "found pools that don't correspond to any known Balancer pool factory "

    We are currently logging this warning:

    WARN shared::sources::balancer_v2::pool_fetching: found pools that don't correspond to any known Balancer pool factory total_count=3
    unused_pools=
    {
    0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c: RegisteredPools
        {
            fetched_block_number: 15088180,
            pools: [
                PoolData { pool_type: Stable, id: 0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d, address: 0x178e029173417b1f9c8bc16dcec6f697bc323746, factory: 0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c, swap_enabled: true, tokens: [Token { address: 0x586aa273f262909eef8fa02d90ab65f5015e0516, decimals: 18, weight: None }, Token { address: 0x6b175474e89094c44da98b954eedeac495271d0f, decimals: 18, weight: None }, Token { address: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, decimals: 6, weight: None }]},
                PoolData { pool_type: Stable, id: 0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d, address: 0x2d011adf89f0576c9b722c28269fcb5d50c2d179, factory: 0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c, swap_enabled: true, tokens: [Token { address: 0x5c6ee304399dbdb9c8ef030ab642b10820db8f56, decimals: 18, weight: None }, Token { address: 0xf24d8651578a55b0c119b9910759a351a3458895, decimals: 18, weight: None }] },
                PoolData { pool_type: Stable, id: 0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249, address: 0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd, factory: 0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c, swap_enabled: true, tokens: [Token { address: 0x5c6ee304399dbdb9c8ef030ab642b10820db8f56, decimals: 18, weight: None }, Token { address: 0x616e8bfa43f920657b3497dbf40d6b1a02d4608d, decimals: 18, weight: None }] }]
        }
    }
    

    This looks weird to me because the pool type is Stable but the factory address is not the one we have in the repository. It seems like someone else created a new StablePoolFactory. This does not match how we model balancer in our code where we expect only one StablePoolFactory.

    Found a reference to this here https://github.com/balancer-labs/balancer-subgraph-v2/commit/e23515e4702d557fe58965656a67e388669a22b0.

    opened by vkgnosis 19
  • added toolchain

    added toolchain

    Fixes #issue.

    added rust-toolchain file in order to run cargo build outside of docker and use the right version as the docker image would

    Test Plan

    run cargo buildand rustup showto view that the same settings as by the docker image are used

    Release notes

    Optionally add notes, suggestions and warnings for the releaser. They will be included in the release changelog.

    opened by nargeslein 15
  • Continuously solve auction with updated liquidity in new driver

    Continuously solve auction with updated liquidity in new driver

    Because every driver will only be allowed to return a single SettlementSummary per auction it makes sense to build an abstraction which continuously solves the auction until the deadline is almost up and then submits the result from the most recent block.

    This can be done in 2 ways: 1: Simply adapt self.block_stream to convert the auction and solve it on every new block in the usual way. 2: Adapt self.block_stream such that converting and solving the auction happens in a background task.

    1 is simpler but 2 yields more up-to-date results. Let's assume the following:

    • time to solution for the first block is 5 seconds
    • 1 second after the starting the first computation a new block arrives
    • time to solution for the second block is 3 seconds

    Then 1) results in:

    0s                    5s                       8s
    computing solution 1  |  computing solution 2  |
    

    And 2) results in:

    0s     1s                  4s       5s
    computing ------ solution --------- 1                               
            computing solution 2
    

    In that scenario 2 already yields the most up-to-date solution after 4s whereas 1 needs 8s. This effect only compounds with more new blocks in the same auction and can result in different final results depending on when the auction deadline is.

    I decided to implement 2 by spawning 1 background computational task immediately on the arrival of the new block. The tasks will then send their results via a channel. Driver::solve_until_deadline() keeps polling 3 futures: 1 stream to compute the new results (which yields the spawned task's JoinHandle) 2 channel to receive the computed results 3 timeout to know when to return the most recent result When 1 yields a join handle we store if to later cancel running tasks When 2 yields a computation result that came from a later block we update the current solution When 3 terminates we abort the background tasks and return the most recent result

    Test Plan

    Added unit tests Did a manual test with a dummy_autopilot. All solvers now respond after the same amount of time and there are still solutions coming through.

    auction: {"block":15414588,"latestSettlementBlock":15414585,"nextSolverCompetition":27876,"orders":[{"creationDate":"2022-08-26T09:33:01.559954Z","owner":"0x050aed76fa793e384990688e2aeb8f7db4a77ee5","uid":"0x157391fd7e2df1af960aee053c7ac8540c5da507d2bac3efb9879ff4f1ee3a87050aed76fa793e384990688e2aeb8f7db4a77ee563089a53","availableBalance":"27565537238066666766","executedBuyAmount":"0","executedSellAmount":"0","executedSellAmountBeforeFees":"0","executedFeeAmount":"0","invalidated":false,"status":"open","settlementContract":"0x9008d19f58aabd9ed0d60971565aa8510560ab41","fullFeeAmount":"1691932708072436736","isLiquidityOrder":false,"sellToken":"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf","buyToken":"0xba100000625a3754423978a60c9317c58a424e3d","receiver":"0x050aed76fa793e384990688e2aeb8f7db4a77ee5","sellAmount":"26068681451255859726","buyAmount":"14197322314843261819","validTo":1661508179,"appData":"0xfda28b94d496c30e7bf8d159f8e2c4396926574362e79d263e7b37570fb59361","feeAmount":"1496855786810807040","kind":"sell","partiallyFillable":false,"sellTokenBalance":"erc20","buyTokenBalance":"erc20","signingScheme":"eip712","signature":"0x0e886c706ae65f5194537905248d56b4b848a7b436134cf8370f771cd3ba27e348299d5f239ee6148025d2ac5768cab054fd4abef5e19d2008d3b5381ccb59311b"},{"creationDate":"2022-08-26T07:04:13.172234Z","owner":"0x129436d21ce486f18f4f008fb6993e2f9dbb6044","uid":"0xd8ece02f83e1c2ba8b82678ce05e101817bbc1073838b7ad0ace1614113c5264129436d21ce486f18f4f008fb6993e2f9dbb604463089a60","availableBalance":"14095832942","executedBuyAmount":"0","executedSellAmount":"0","executedSellAmountBeforeFees":"0","executedFeeAmount":"0","invalidated":false,"status":"open","settlementContract":"0x9008d19f58aabd9ed0d60971565aa8510560ab41","fullFeeAmount":"11310262","isLiquidityOrder":true,"sellToken":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","buyToken":"0x6b175474e89094c44da98b954eedeac495271d0f","receiver":"0x129436d21ce486f18f4f008fb6993e2f9dbb6044","sellAmount":"14087834599","buyAmount":"14107098369679199043584","validTo":1661508192,"appData":"0xdadada0000000000000000000000000000000000000000000000000000000ccc","feeAmount":"7993503","kind":"sell","partiallyFillable":false,"sellTokenBalance":"erc20","buyTokenBalance":"erc20","signingScheme":"ethsign","signature":"0xd228781791f36b7cb41e7252bc29e93f2af5c9cf66ecf66c345e00bd96153ae5736b81d1ea56e8c6c48d9c49c7937e3f23e260eb3c19831552250fe1c368b6ec1c"},{"creationDate":"2022-08-26T09:33:29.918960Z","owner":"0x937a0c4697e5551ba3a50f8beb279ed0a71d08b5","uid":"0xce490251773e41d482f3488b6d51d9575cf3d0d22e8b46c141450f0f60c7f4e7937a0c4697e5551ba3a50f8beb279ed0a71d08b5630893e1","availableBalance":"11133213130","executedBuyAmount":"0","executedSellAmount":"0","executedSellAmountBeforeFees":"0","executedFeeAmount":"0","invalidated":false,"status":"open","settlementContract":"0x9008d19f58aabd9ed0d60971565aa8510560ab41","fullFeeAmount":"3850012","isLiquidityOrder":true,"sellToken":"0xdac17f958d2ee523a2206206994597c13d831ec7","buyToken":"0x6b175474e89094c44da98b954eedeac495271d0f","receiver":"0x937a0c4697e5551ba3a50f8beb279ed0a71d08b5","sellAmount":"11127867200","buyAmount":"11134112786719998738432","validTo":1661506529,"appData":"0xdadada0000000000000000000000000000000000000000000000000000000ccc","feeAmount":"5132800","kind":"sell","partiallyFillable":false,"sellTokenBalance":"erc20","buyTokenBalance":"erc20","signingScheme":"ethsign","signature":"0xad2aea2f3c27d778f2da398822d275192f9ec44a68759775188be19b42bf2eb063bc305efe3f4920c404c6144998939dea68abfa92c0da6748b1cb8397ee7f1f1c"},{"creationDate":"2022-08-26T09:33:19.125165Z","owner":"0xb00098ba6eedaed1d4ab31e7fa14cb969ccce653","uid":"0x0a39a84cb7af955d8012c1e3b0638f9ab067461195ada667034fb6040a348443b00098ba6eedaed1d4ab31e7fa14cb969ccce653630893d6","availableBalance":"15752165112190219070878","executedBuyAmount":"0","executedSellAmount":"0","executedSellAmountBeforeFees":"0","executedFeeAmount":"0","invalidated":false,"status":"open","settlementContract":"0x9008d19f58aabd9ed0d60971565aa8510560ab41","fullFeeAmount":"2863494128487763456","isLiquidityOrder":true,"sellToken":"0x6b175474e89094c44da98b954eedeac495271d0f","buyToken":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","receiver":"0xb00098ba6eedaed1d4ab31e7fa14cb969ccce653","sellAmount":"15747023558230783348736","buyAmount":"15753731614","validTo":1661506518,"appData":"0xdadada0000000000000000000000000000000000000000000000000000000ccc","feeAmount":"5133353959436791808","kind":"sell","partiallyFillable":false,"sellTokenBalance":"erc20","buyTokenBalance":"erc20","signingScheme":"ethsign","signature":"0x52deaf5f43e8f02a7a6b1ebc0737d29b8c7c9d9381560b51c18c3f3099ea891d4a5e1e5c41cf3fcdc99c10258046eab46ae5fb1339764d914a7bd309924e60701c"},{"creationDate":"2022-08-26T09:33:28.517962Z","owner":"0xb0a9d7d6db9d58fd1cf528353a746d4b126c8b13","uid":"0x44d7dc58c4b04ce605c2db8ec1784f07744a9d682464cd7a1f3333469c2bbcd5b0a9d7d6db9d58fd1cf528353a746d4b126c8b13630893e0","availableBalance":"11323910573","executedBuyAmount":"0","executedSellAmount":"0","executedSellAmountBeforeFees":"0","executedFeeAmount":"0","invalidated":false,"status":"open","settlementContract":"0x9008d19f58aabd9ed0d60971565aa8510560ab41","fullFeeAmount":"3850012","isLiquidityOrder":true,"sellToken":"0xdac17f958d2ee523a2206206994597c13d831ec7","buyToken":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","receiver":"0xb0a9d7d6db9d58fd1cf528353a746d4b126c8b13","sellAmount":"11317867200","buyAmount":"11324131786","validTo":1661506528,"appData":"0xdadada0000000000000000000000000000000000000000000000000000000ccc","feeAmount":"5132800","kind":"sell","partiallyFillable":false,"sellTokenBalance":"erc20","buyTokenBalance":"erc20","signingScheme":"ethsign","signature":"0x8e7e7e1c3dbf9c915a7a617c9bc4315e7c8d6efedd4c80c28fb3758fe2f41e1071c54df526bef30d3ce3ab1f896c72328aadb91c3afef16265f821426a6fb1421c"},{"creationDate":"2022-08-26T09:32:36.019101Z","owner":"0x6880f5334158980ecfded17ae18b455efce1c0b5","uid":"0x989c79a62d87bd3617372c2768c9559a7c2e52efd87c7f7753ad79b4854a124f6880f5334158980ecfded17ae18b455efce1c0b5630893ab","availableBalance":"10134801506952967869341","executedBuyAmount":"0","executedSellAmount":"0","executedSellAmountBeforeFees":"0","executedFeeAmount":"0","invalidated":false,"status":"open","settlementContract":"0x9008d19f58aabd9ed0d60971565aa8510560ab41","fullFeeAmount":"3257615464314192896","isLiquidityOrder":true,"sellToken":"0x853d955acef822db058eb8505911ed77f175b99e","buyToken":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","receiver":"0x6880f5334158980ecfded17ae18b455efce1c0b5","sellAmount":"10128862064220619262976","buyAmount":"10135012886","validTo":1661506475,"appData":"0xdadada0000000000000000000000000000000000000000000000000000000ccc","feeAmount":"5137935779380737024","kind":"sell","partiallyFillable":false,"sellTokenBalance":"erc20","buyTokenBalance":"erc20","signingScheme":"ethsign","signature":"0xfca99ece45687f2c9a41d2a80182ba37eeff72aad7577541e7a8207ac305737978f904b75c47a46ddea84a256b9068568ddc1d884c2b79561a589312afdf63a21c"}],"prices":{"0x6b175474e89094c44da98b954eedeac495271d0f":"601623431381767","0x853d955acef822db058eb8505911ed77f175b99e":"601130998376470","0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48":"601462805660390511664431104","0xba100000625a3754423978a60c9317c58a424e3d":"3811508687314097","0xc0c293ce456ff0ed870add98a0828dd4d2903dbf":"2061935278122101","0xdac17f958d2ee523a2206206994597c13d831ec7":"601353999283664683463081984"}}
    25.005884958s: re7 solve_response: {"errorType":"InternalServerError","description":"could not compute a valid solution"}
    25.005908625s: jeffreyliang solve_response: {"surplus":321676754451211.1,"gas_reimbursement":"3205551297821242","settled_orders":["0x157391fd7e2df1af960aee053c7ac8540c5da507d2bac3efb9879ff4f1ee3a87050aed76fa793e384990688e2aeb8f7db4a77ee563089a53"],"auction_id":27876}
    25.00670825s: otex solve_response: {"errorType":"InternalServerError","description":"could not compute a valid solution"}
    25.006558541s: quasimodo solve_response: {"errorType":"InternalServerError","description":"could not compute a valid solution"}
    25.006534041s: seasolver solve_response: {"errorType":"InternalServerError","description":"could not compute a valid solution"}
    25.006510625s: plm solve_response: {"surplus":85774195298546.12,"gas_reimbursement":"1747006214858448","settled_orders":["0x157391fd7e2df1af960aee053c7ac8540c5da507d2bac3efb9879ff4f1ee3a87050aed76fa793e384990688e2aeb8f7db4a77ee563089a53"],"auction_id":27876}
    25.0065665s: stakecapital solve_response: {"errorType":"InternalServerError","description":"could not compute a valid solution"}
    25.006543125s: atlas solve_response: {"errorType":"InternalServerError","description":"could not compute a valid solution"}
    792.18175ms plm execute_response: "0x0000000000000000000000000000000000000000000000000000000000000000"
    849.183416ms jeffreyliang execute_response: "0x0000000000000000000000000000000000000000000000000000000000000000"
    
    opened by MartinquaXD 14
  • Refactoring Signature to accomodate the EIP-1271 support

    Refactoring Signature to accomodate the EIP-1271 support

    In the ongoing effort to add support for EIP-1271 Signature scheme (see #268 & #269) there has been a discussion on how to support the new Signature properly. I'm creating this issue in order to discuss different options on how this support can be implemented.

    EIP-1271 is validated on-chain, which means that when creating order there must be an eth_call to validate the provided Signature with a mandatory order.owner (which is the contract address that should be called). Until now it was possible to recover (Signature::recover) & validate the owner (Signature::validate_owner) off-chain but it becomes tedious to perform this validation and recovery on-chain in Signature.

    OrderCreation::verify_owner can return an error while validating expected_owner (optional field passed through the order creation) and it seems reasonable to expect the same behavior for EIP-1271 signatures. However, mixing Web3 specific implementations (or even knowledge of a services like SignatureValidator) with the Signatures seems to me like mixing 2 different responsibilities inside.

    OrderValidator::validate_and_construct_order seems the right place for calling the SignatureValidator (added in #268) when an EIP-1271 signature is passed with the creation of an Order.

    API

    OrderCreation should support all available signatures:

    The EIP-1271 signature requires a eth_call using the contract's address (the order.from on OrderCreation request) to validate that the signature is valid (isValidSignature) for the expected Order EIP-712 hash.

    • EIP-712
    • EthSign
    • EIP-1271
    • PreSign

    OrderCancellation - At the moment OrderCancellation support only EcdsaSignature (EIP-712 & EthSign), however, it should for EIP-1271 it needs to support all Signatures except PreSign:

    • EIP-712
    • EthSign
    • EIP-1271

    Signature - is the "protocol signature" or in other words the signature representation as it is understood by the GPv2Settlement contract (so, it encodes some extra information such as the owner address for PreSign and EIP-1271 signatures)

    cc @nlordell let's discuss this issue before continuing on the final parts of the implementation.

    opened by elpiel 13
  • Allow solvers to specify if their solution should be submitted via flashbots

    Allow solvers to specify if their solution should be submitted via flashbots

    Eventually we want the solver-driver co-location to enable solvers to submit their solutions however they want but work on this was paused. However, solver maintainers are already asking for a way to signal that a solution should only be submitted via flashbots to avoid getting MEV attacked in the public mempool. Until we actually finalize the solver-driver co-location adding a flag submit_with_flashbots in the solver response seems like a reasonable compromise. In case we still want to take advantage of other private mempools (e.g. eden network) a more generically named flag enforce_private_submission might make more sense.

    external solver 
    opened by MartinquaXD 11
  • Limit orders e2e full flow

    Limit orders e2e full flow

    Progress on https://github.com/cowprotocol/services/issues/769.

    Adds a test case exercising adding and settling a single limit order. Makes the optionality of surplus_fee and surplus_fee_timestamp explicit in the API. If anybody disagrees with this API change we can revert the commit - originally I thought this was a bug (it's not), but either way I think things are more explicit this way.

    I also originally fixed the bug that actually ended up being fixed (in a better way) by Nick in https://github.com/cowprotocol/services/pull/772, so this PR is based on his PR.

    There is still one outstanding issue: the test case works as-is, but if we try adding another seemingly completely valid limit order, it fails with

    VM Exception while processing transaction: reverted with reason string 'ERC20: transfer amount exceeds balance'
    

    This needs to be fixed. I would also like to add a test case for having mixed limit and market orders. Both of these should be addressed in follow-up PRs.

    (If anybody has seen that message before and has some tips about what it might be, please let me know. So far the working assumption is that something is wrong with the test setup and the settlement contract doesn't have enough liquidity or something.)

    Release notes

    surplus_fee and surplus_fee_timestamp are now nullable. Since the frontend already integrated when they were non-nullable, I'm not sure if this is a good idea. Would be happy to revert that change if anybody asks.

    Edit: As @nlordell and I agreed, disregard the above paragraph, we will make the surplus fee and timestamp non-nullable.

    opened by ennmichael 11
  • Make batch call size configurable

    Make batch call size configurable

    We introduced the option to execute eth_calls in batches for performance improvements in case we had to do many eth_calls at once. But we are currently experiencing major problems with our node infrastructure and especially how dshackle handles batch calls. One idea to mitigate those issues is to execute smaller batches. For that we have to make that configurable because we are currently relying on a few constants sprinkled through the code base.

    I see 2 options how to do that:

    1. Every component that uses a batch calls gets another constructor argument batch_size and passes that to CallBatch::execute_all(). This is simple to implement but leaks the implementation detail that we are doing batch calls into the signatures of every one of those components.
    2. Instead of passing a simple web3 instance to these components we pass an abstraction which knows how to execute a multiple eth_calls. Then the original component no longer needs to be aware of whether the abstraction uses batch calls or a series of "normal" calls under the hood.

    I would prefer option 2 because it has better separation of concerns.

    oncall 
    opened by MartinquaXD 10
  • Unique order IDs on auction data forwarded by driver to the solvers

    Unique order IDs on auction data forwarded by driver to the solvers

    Order IDs in auction instances are not unique. The same order is given different order IDs across multiple auctions. In some cases it would be useful for solvers to have access to the unique ID from an order. Hereby, two practical use cases:

    1. Currently, as a solver I may be storing the solutions I generated on my own database. If I do not have a unique order ID, then I will need to generate one myself. Unique order IDs will help me easily query the solutions I generated for a specific order. The main issue arises when I would like to compare my solution with the winning clearing prices for the order. Say the order was settled within a specific auction, then without an order ID I would need to match buy_token, sell_token, buy_amount, sell_amount, etc and hope the match is realiable and uniqe. Having a unique order ID would make this easier and safe.

    2. As a solver I may want to track order across auctions. In the past we have seen orders that were troublesom. Having a unique ID would help us manage how orders are taken into account across auctions. Say if we find a solution to the order, but it is not settled across different auctions, then we might decide to flag it and potentially ignore it the next auction.

    external solver 
    opened by felixjff 10
  • Enable s3 instance uploading

    Enable s3 instance uploading

    We want Quasimodo instances to be stored on AWS S3 for later debugging. See https://github.com/cowprotocol/services/issues/334 .

    This currently happens through the obsolete MIP solver which in our cluster is configured to do nothing except upload the instance. However, this instance uploading is hard to maintain and brittle. Recently it started failing and filling up the disk space of the container. It is also unnecessary overhead to run the whole MIP image just to upload instances.

    There were two main ideas for re-implementing the uploading in Rust:

    1. Continue using a full solver pod to upload instances.
    2. Integrate the uploading into the driver.

    I went with 2. because the extra pod has too much organizational overhead. I do not want to maintain a whole binary, pod, staging configuration to upload instances. An even better solution might be to do the instance uploading in Quasimodo because it isn't really relevant to the driver. But that would be more work because it would be harder to use Rust there.

    To interface with S3 I decided on the official AWS Rust libraries. They are technically in preview stage but this seems to be referring to breaking changes and not bugs. I intentionally use as little of the API. Breaking changes won't be difficult to handle.

    I tried out manually interfacing with S3's http rest api in order to reduce dependencies. This did not work well because AWS recently added signing requirements to requests which are too difficult to implement standalone. The AWS libraries we depend on now do not add many transitive dependencies anyway because a lot of the tokio and http libraries we already depend on.

    Follow up tasks if this works on staging:

    • Remove references to MIP solver in the Rust code.
    • Remove references to MIP solver in the cluster.
    • Clean up the old S3 bucket?

    Test Plan

    manually ran the ignored s3 upload tests, can only test for real after merging and configuring staging

    opened by vkgnosis 0
  • Fetch missing native prices in background task

    Fetch missing native prices in background task

    This PR tries to optimize how we fetch native prices for the solvable orders.

    Currently the approach is to:

    1. collect all traded tokens in the solvable orders
    2. query their native prices
    3. filter out all solvable orders for which we don't have the native prices of the tokens

    Step 2 already uses the CachingNativePriceEstimator so all the cached prices get returned immediately and we only issue price estimation requests for the uncached prices. In order to not delay the auction creation for too long in case we have too many uncached prices step 2 gets aborted after some time (3.5 seconds). Since estimating a single price can already take 2 seconds and we currently don't do parallel price estimates we can usually only get 2 new prices in the 3.5 seconds. This means by delaying the entire auction by up to 3.5s we might add only a single solvable order in the worst case. Also note that the price estimation requests get aborted after 3.5 seconds so we can't make additional progress there.

    To decrease the auction creation time and keep making progress in the background this PR proposes following change:

    1. collect all traded tokens in the solvable orders
    2. return the currently cached relevant native prices immediately
    3. mark entries of missing prices in the CachingNativePriceEstimator such that the existing background task will fetch them during the next maintenance cycles
    4. filter out all solvable orders for which we don't have the cached prices of the traded tokens

    Test Plan

    Updated existing unit tests.

    opened by MartinquaXD 5
  • Fix

    Fix "economic viability" for the Gnosis_0x solver

    The 0x solver is one of the worst solvers in terms of settling non viable trades, often picking on so-called arbitrage stable-to-stable trades. (see also discussion here).

    We propose that we modify the solver by forcing it to not submit any solution that has non-positive objective value.

    opened by harisang 2
  • [Alerter] Rate limit requests to orderbook API

    [Alerter] Rate limit requests to orderbook API

    We are getting rate-limited from our alerter pod because we are fetching orders from our API too frequently. We should rate this call here:

    https://github.com/cowprotocol/services/blob/a0832fd9644db6eae6bdab4eecb4e4b04d07e3bd/crates/alerter/src/main.rs#L65-L74

    help wanted oncall 
    opened by fleupold 3
  • Add List of Tokens for which max price deviation check is performed in the instance.json

    Add List of Tokens for which max price deviation check is performed in the instance.json

    The list of tokens for which we perform a max price deviation check is not currently revealed to the solvers (unless they explicitly ask the team for that). It would be good to add this list in the json file sent to solvers.

    external solver 
    opened by harisang 0
Releases(v2.88.0)
  • v2.88.0(Jan 3, 2023)

    What's Changed

    • Update driver domain objects by @ennmichael in https://github.com/cowprotocol/services/pull/975
    • Implement Tenderly simulation in driver by @ennmichael in https://github.com/cowprotocol/services/pull/978
    • API Scaffolding In solvers Binary by @nlordell in https://github.com/cowprotocol/services/pull/1002
    • Solver DTOs for the driver by @ennmichael in https://github.com/cowprotocol/services/pull/999
    • Driver /solve API by @ennmichael in https://github.com/cowprotocol/services/pull/1000
    • Some CLI args for the driver by @ennmichael in https://github.com/cowprotocol/services/pull/1001
    • Some driver refactoring by @ennmichael in https://github.com/cowprotocol/services/pull/1005
    • Fix NaiveSolver LimitOrder bug by @fleupold in https://github.com/cowprotocol/services/pull/1008
    • Fix limit order price check in alerter by @nlordell in https://github.com/cowprotocol/services/pull/1014
    • Linear Order Matching Algorithm in alerter by @nlordell in https://github.com/cowprotocol/services/pull/1015

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.87.0...v2.88.0

    Source code(tar.gz)
    Source code(zip)
  • v2.87.0(Dec 27, 2022)

    https://github.com/cowprotocol/services/compare/v2.86.1...v2.87.0

    Highlights

    • Swapr liquidity on mainnet
    • Limit order updating improvements
    • Internalized interactions are now communicated to solver competition API
    Source code(tar.gz)
    Source code(zip)
  • v2.86.1(Dec 19, 2022)

  • v2.86.0(Dec 19, 2022)

    What's Changed

    • Use the block_time as the creation timestamp for the ethflow orders by @josojo in https://github.com/cowprotocol/services/pull/968
    • Add maintainer's names to metrics by @sunce86 in https://github.com/cowprotocol/services/pull/966

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.85.2...v2.86.0

    Source code(tar.gz)
    Source code(zip)
  • v2.85.2(Dec 15, 2022)

    Updated version for eth-flow release. The needed change is #964, all other changes are minor or behind configuration flags.

    What's Changed

    • Implement TradeFinding for an external driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/945
    • Use drivers for price estimation by @MartinquaXD in https://github.com/cowprotocol/services/pull/947
    • Restart refunder on deploy by @fedgiac in https://github.com/cowprotocol/services/pull/961
    • Fix duplicate db metric name by @vkgnosis in https://github.com/cowprotocol/services/pull/963
    • Fixing conflict in reorg handling by autopilot for ethflow by @josojo in https://github.com/cowprotocol/services/pull/964

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.85.1...v2.85.2

    Source code(tar.gz)
    Source code(zip)
  • v2.85.1(Dec 14, 2022)

    Release used for enabling eth-flow orders in prod.

    What's Changed

    • Add Tracing Span to Surplus Fee Computation by @nlordell in https://github.com/cowprotocol/services/pull/939
    • Separate Configuration For Limit Order Update Interval by @nlordell in https://github.com/cowprotocol/services/pull/938
    • Searchers can provide preferred submission strategy by @sunce86 in https://github.com/cowprotocol/services/pull/936
    • Do not block onchain order parsing on unknown events by @fedgiac in https://github.com/cowprotocol/services/pull/943
    • Add indexing starting block unless other events are available by @fedgiac in https://github.com/cowprotocol/services/pull/937
    • Print missing argument variable ethflow_indexing_start by @fedgiac in https://github.com/cowprotocol/services/pull/946
    • [Refunder] Ignore uids with zero owner for refunding by @josojo in https://github.com/cowprotocol/services/pull/944
    • Handle base tokens in LiquidityCollector by @MartinquaXD in https://github.com/cowprotocol/services/pull/951
    • Consider that access list makes tx possible in the first place by @MartinquaXD in https://github.com/cowprotocol/services/pull/953
    • [refunder] refundable order calculation should depend on blocktime by @josojo in https://github.com/cowprotocol/services/pull/954
    • Driver /solve functionality part 3 by @ennmichael in https://github.com/cowprotocol/services/pull/927
    • Remove duplicate EncodedInteraction by @vkgnosis in https://github.com/cowprotocol/services/pull/956
    • Move single order solver settlement merging functions into module by @vkgnosis in https://github.com/cowprotocol/services/pull/957
    • Update pre-interactions during re-org handling by @josojo in https://github.com/cowprotocol/services/pull/959
    • [refunder] Gas bump on priority fee by @josojo in https://github.com/cowprotocol/services/pull/942
    • Improve flanky refunder test by @josojo in https://github.com/cowprotocol/services/pull/960

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.85.0...v2.85.1

    Source code(tar.gz)
    Source code(zip)
  • v2.85.0(Dec 13, 2022)

  • v2.84.2(Dec 10, 2022)

    What's Changed

    • Settlement Simulation Works Without Internalizing Interactions by @sunce86 in #843

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.84.1...v2.84.2

    Source code(tar.gz)
    Source code(zip)
  • v2.84.1(Dec 9, 2022)

    What's Changed

    • Mark interaction as internalizable instead of dropping it by @MartinquaXD in https://github.com/cowprotocol/services/pull/931

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.84.0...v2.84.1

    Source code(tar.gz)
    Source code(zip)
  • v2.84.0(Dec 6, 2022)

    What's Changed

    • Prevent panics on tokio runtime shutdown by @vkgnosis in https://github.com/cowprotocol/services/pull/832
    • Drop Rinkeby from README.md by @MartinquaXD in https://github.com/cowprotocol/services/pull/854
    • Cleanup Contract Build Script by @sunce86 in https://github.com/cowprotocol/services/pull/852
    • Fetch liquidity after order check by @vkgnosis in https://github.com/cowprotocol/services/pull/857
    • Add Gelato API Module by @nlordell in https://github.com/cowprotocol/services/pull/839
    • Add Solver Trampoline Contract by @nlordell in https://github.com/cowprotocol/services/pull/840
    • Implement Gelato Settlement Submission Strategy by @nlordell in https://github.com/cowprotocol/services/pull/841
    • Doc comments 1 by @ennmichael in https://github.com/cowprotocol/services/pull/837
    • Improve Revert Error Detection by @nlordell in https://github.com/cowprotocol/services/pull/860
    • Wait for auction id to change before solving again by @vkgnosis in https://github.com/cowprotocol/services/pull/856
    • Support paying to smart contract wallets by @ennmichael in https://github.com/cowprotocol/services/pull/846
    • Model driver communication types in Rust by @vkgnosis in https://github.com/cowprotocol/services/pull/874
    • Remove Custom Price Order Sell Price from UCP by @sunce86 in https://github.com/cowprotocol/services/pull/878
    • Set the correct order uid for foreign liquidity orders by @vkgnosis in https://github.com/cowprotocol/services/pull/889
    • Track solvable orders metrics grouped by order class by @MartinquaXD in https://github.com/cowprotocol/services/pull/903
    • Store limit order quote to compute risk adjusted rewards later on by @MartinquaXD in https://github.com/cowprotocol/services/pull/908

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.83.0...v2.84.0

    Source code(tar.gz)
    Source code(zip)
  • v2.83.0(Nov 28, 2022)

    What's Changed

    • Change Default Market Makable Token List by @nlordell in https://github.com/cowprotocol/services/pull/823
    • Use eth_call For Fetching Current Block Header Information by @nlordell in https://github.com/cowprotocol/services/pull/821
    • Config flag for enabling/disabling background limit order quoting by @ennmichael in https://github.com/cowprotocol/services/pull/817
    • Account for EIP-1271 verification gas in limit orders by @ennmichael in https://github.com/cowprotocol/services/pull/806
    • Configurable Block Current Block Fetching Strategy by @nlordell in https://github.com/cowprotocol/services/pull/825
    • Fix Mature Orders Algorithm by @sunce86 in https://github.com/cowprotocol/services/pull/827
    • Persist limit order surplus fee by @vkgnosis in https://github.com/cowprotocol/services/pull/828
    • Filter Order With Insufficient Sell Amount by @nlordell in https://github.com/cowprotocol/services/pull/802
    • Add check for custom interactions using buffer by @sunce86 in https://github.com/cowprotocol/services/pull/829
    • Make test deterministic by @vkgnosis in https://github.com/cowprotocol/services/pull/833
    • Improve Order Creation Logging by @nlordell in https://github.com/cowprotocol/services/pull/834
    • Encode simulation failure call data has hex string by @MartinquaXD in https://github.com/cowprotocol/services/pull/836
    • Limit order metrics by @ennmichael in https://github.com/cowprotocol/services/pull/814
    • Improve tracability of logs for simulation failures on the latest block by @MartinquaXD in https://github.com/cowprotocol/services/pull/838
    • Add e2e test for eth flow orders by @fedgiac in https://github.com/cowprotocol/services/pull/835
    • Add metrics for AutoUpdatingSolverTokenOwnerFinder by @MartinquaXD in https://github.com/cowprotocol/services/pull/842
    • Give metrics for token owner updates more specific name by @MartinquaXD in https://github.com/cowprotocol/services/pull/845
    • Remove default eth-flow contract by @fedgiac in https://github.com/cowprotocol/services/pull/844
    • Route version endpoint at /v1/version again by @MartinquaXD in https://github.com/cowprotocol/services/pull/847
    • Update eth-flow contract to rc3 by @fedgiac in https://github.com/cowprotocol/services/pull/851
    • Remove Rinkeby From OpenAPI Spec by @nlordell in https://github.com/cowprotocol/services/pull/853

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.82.0...v2.83.0

    Source code(tar.gz)
    Source code(zip)
  • v2.82.0(Nov 22, 2022)

    What's Changed

    • Metrics for ignored orders by @ennmichael in https://github.com/cowprotocol/services/pull/756
    • Limit orders I/O parallelism by @ennmichael in https://github.com/cowprotocol/services/pull/757
    • Log Batched Buffered Requests by @nlordell in https://github.com/cowprotocol/services/pull/774
    • Consider Limit Orders as User Orders by @nlordell in https://github.com/cowprotocol/services/pull/772
    • Limit orders e2e full flow by @ennmichael in https://github.com/cowprotocol/services/pull/775
    • More limit order E2E tests by @ennmichael in https://github.com/cowprotocol/services/pull/780
    • Forward Order Maturity to Solvers by @sunce86 in https://github.com/cowprotocol/services/pull/763
    • Mark expired ethflow orders as such by @josojo in https://github.com/cowprotocol/services/pull/778
    • Check Compatibility Of All Yearn Tokens by @nlordell in https://github.com/cowprotocol/services/pull/782
    • Camel case for ethflow data in API by @josojo in https://github.com/cowprotocol/services/pull/785
    • Refactor Settlement Encoding to Use Single Trade Type by @nlordell in https://github.com/cowprotocol/services/pull/779
    • Prioritize orders in SingleOrderSolvers by @MartinquaXD in https://github.com/cowprotocol/services/pull/762
    • [refunder] submitting txs by @josojo in https://github.com/cowprotocol/services/pull/759
    • Unit Test With Limit Order Surplus by @nlordell in https://github.com/cowprotocol/services/pull/790
    • Adding refunder e2e by @josojo in https://github.com/cowprotocol/services/pull/776
    • Indexing order cancellations by @josojo in https://github.com/cowprotocol/services/pull/786
    • Migrate to 1Inch v5.0 by @MartinquaXD in https://github.com/cowprotocol/services/pull/795
    • Remove solver_competition tx_hash column by @vkgnosis in https://github.com/cowprotocol/services/pull/788
    • Add Support for Limit Order Buying Eth by @nlordell in https://github.com/cowprotocol/services/pull/798
    • Include Full Fee Amount For Limit Orders by @nlordell in https://github.com/cowprotocol/services/pull/792
    • Refundable orders are not invalidated or partially_fillable by @josojo in https://github.com/cowprotocol/services/pull/797
    • Include Limit Order Buy Token Uniform Clearing Price by @nlordell in https://github.com/cowprotocol/services/pull/799
    • Optimizing solver by @MartinquaXD in https://github.com/cowprotocol/services/pull/794
    • Refactor Warp Filter Initialization For Metrics Reset by @nlordell in https://github.com/cowprotocol/services/pull/789
    • Move surplus_fee and surplus_fee_timestamp into the OrderClass::Limit variant by @ennmichael in https://github.com/cowprotocol/services/pull/793
    • Migrate null surplus fees to 0 for limit orders by @ennmichael in https://github.com/cowprotocol/services/pull/809
    • Configuring refunder builds and auto-redeployments by @josojo in https://github.com/cowprotocol/services/pull/800
    • Add panic-hook test for tokio by @vkgnosis in https://github.com/cowprotocol/services/pull/816
    • Refactor shared components in refunder e2e test by @fedgiac in https://github.com/cowprotocol/services/pull/808
    • Use dedicated function to create WETH pool in e2e tests by @fedgiac in https://github.com/cowprotocol/services/pull/815
    • Handle ERC-1271 Signature Verification Reverts by @nlordell in https://github.com/cowprotocol/services/pull/810
    • Add Possibility To Receive Both Coordinates and Internalization Flag by @sunce86 in https://github.com/cowprotocol/services/pull/805
    • Separate e2e helper function: services and onchain components by @fedgiac in https://github.com/cowprotocol/services/pull/818
    • Fix autodeployment failure by @fedgiac in https://github.com/cowprotocol/services/pull/822
    • Retry service maintenance by @nlordell in https://github.com/cowprotocol/services/pull/811

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.81.1...v2.82.0

    Source code(tar.gz)
    Source code(zip)
  • v2.81.1(Nov 14, 2022)

    What's Changed

    • Get_user_order performance next trial by @josojo in https://github.com/cowprotocol/services/pull/749

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.81.0...v2.81.1

    Source code(tar.gz)
    Source code(zip)
  • v2.81.0(Nov 14, 2022)

    What's Changed

    • Price Estimates From Settlement Contract by @nlordell in https://github.com/cowprotocol/services/pull/726
    • Periodically calculating surplus fees in a background task by @ennmichael in https://github.com/cowprotocol/services/pull/714
    • Use .context where possible by @ennmichael in https://github.com/cowprotocol/services/pull/732
    • Refactor some impl Default blocks by @ennmichael in https://github.com/cowprotocol/services/pull/730
    • Cap limit orders per user by @ennmichael in https://github.com/cowprotocol/services/pull/734
    • Reuse now_in_epoch_seconds() by @sunce86 in https://github.com/cowprotocol/services/pull/737
    • [Ethflow] using the newest contract by @josojo in https://github.com/cowprotocol/services/pull/736
    • [Onchain orders] Onchain order cancellations part 1 by @josojo in https://github.com/cowprotocol/services/pull/718
    • Add temporary logs for Quasimodo encoding issue by @sunce86 in https://github.com/cowprotocol/services/pull/743
    • Rename OrderClass::Ordinary to OrderClass::Market by @ennmichael in https://github.com/cowprotocol/services/pull/742
    • Do not add full http request body to error by @vkgnosis in https://github.com/cowprotocol/services/pull/748
    • Store limit order rewards by @vkgnosis in https://github.com/cowprotocol/services/pull/747
    • Separate solver competition DB struct from API struct by @vkgnosis in https://github.com/cowprotocol/services/pull/733
    • Finish autopilot side of competition account-nonce storing by @vkgnosis in https://github.com/cowprotocol/services/pull/741
    • Fix HTTP Solver Liquidity Indexing by @nlordell in https://github.com/cowprotocol/services/pull/751
    • Add SeaSolver owners proposer by @sunce86 in https://github.com/cowprotocol/services/pull/725
    • Fix matching amms by @sunce86 in https://github.com/cowprotocol/services/pull/750
    • E2E test for limit order placement by @ennmichael in https://github.com/cowprotocol/services/pull/746
    • Limit order support in driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/713
    • Use transaction to update settlement tx info by @vkgnosis in https://github.com/cowprotocol/services/pull/754
    • Configurable Maximum Limit Order Validity by @nlordell in https://github.com/cowprotocol/services/pull/735
    • Allow Cancelling Multiple Orders At Once by @nlordell in https://github.com/cowprotocol/services/pull/738
    • API For Cancelling Multiple Orders With A Single Signature by @nlordell in https://github.com/cowprotocol/services/pull/739
    • Cache the 1inch spender by @MartinquaXD in https://github.com/cowprotocol/services/pull/745
    • Revert temporary logs by @sunce86 in https://github.com/cowprotocol/services/pull/761
    • Filter limit orders during auction cutting by @ennmichael in https://github.com/cowprotocol/services/pull/752
    • Adjust Market Order Logic When Limit Orders Are Disabled by @nlordell in https://github.com/cowprotocol/services/pull/758

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.80.0...v2.81.0

    Source code(tar.gz)
    Source code(zip)
  • v2.80.2(Nov 9, 2022)

    Hotfix market order logic when limit orders are disabled.

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.80.1...v2.80.2

    Source code(tar.gz)
    Source code(zip)
  • v2.80.1(Nov 8, 2022)

  • v2.80.0(Nov 7, 2022)

    What's Changed

    • Update Görli vCOW/COW token contract addresses by @fedgiac in https://github.com/cowprotocol/services/pull/681
    • [Trivial] Allow Ethplorer API Key to be passed via env variable by @fleupold in https://github.com/cowprotocol/services/pull/689
    • Add flag is safe by @sunce86 in https://github.com/cowprotocol/services/pull/665
    • Improve Handling of Slippage for AMMs by @nlordell in https://github.com/cowprotocol/services/pull/659
    • Add signing scheme to quote response by @MartinquaXD in https://github.com/cowprotocol/services/pull/617
    • Configure Trade Simulation for Price Estimators by @nlordell in https://github.com/cowprotocol/services/pull/657
    • Trade Simulation Configuration by @nlordell in https://github.com/cowprotocol/services/pull/658
    • Improve metrics of solver solutions computation time by @MartinquaXD in https://github.com/cowprotocol/services/pull/614
    • Revert "Make new class field backwards compatible with shadow solver" by @nlordell in https://github.com/cowprotocol/services/pull/693
    • Whitelist owners by @sunce86 in https://github.com/cowprotocol/services/pull/691
    • Specify default whitelisted owners by @nlordell in https://github.com/cowprotocol/services/pull/702
    • Limit order fees by @ennmichael in https://github.com/cowprotocol/services/pull/690
    • Make http solver instance log trace by @vkgnosis in https://github.com/cowprotocol/services/pull/697
    • Fix ParaSwap Trade Simulation Slippage by @nlordell in https://github.com/cowprotocol/services/pull/706
    • [Refunder] Investigate which ethflow orders are already refunded by @josojo in https://github.com/cowprotocol/services/pull/685
    • Improved Handling of Quotes From 0-Address by @nlordell in https://github.com/cowprotocol/services/pull/707
    • Drop redundant liquidity order field by @MartinquaXD in https://github.com/cowprotocol/services/pull/710
    • Fix Tenderly State Object Serialization by @nlordell in https://github.com/cowprotocol/services/pull/709
    • Improving user orders performance by @josojo in https://github.com/cowprotocol/services/pull/701
    • Fix 1.65.0 clippy warnings by @vkgnosis in https://github.com/cowprotocol/services/pull/716
    • Less Racy Bad Token Detection by @nlordell in https://github.com/cowprotocol/services/pull/717
    • Refactor how to add liquidity trades to SettlementEncoder by @MartinquaXD in https://github.com/cowprotocol/services/pull/712
    • Use Trace Logging for Transport Implementations by @nlordell in https://github.com/cowprotocol/services/pull/695
    • Implement more resilient auction id to tx hash association by @vkgnosis in https://github.com/cowprotocol/services/pull/694
    • Reset trader approval by @nlordell in https://github.com/cowprotocol/services/pull/724
    • Forward orders id to solvers 2 by @sunce86 in https://github.com/cowprotocol/services/pull/721
    • Use Buffered transport everywhere by @nlordell in https://github.com/cowprotocol/services/pull/696
    • Refactor transport Module to ethrpc by @nlordell in https://github.com/cowprotocol/services/pull/699
    • Configure Ethereum RPC Request Buffering by @nlordell in https://github.com/cowprotocol/services/pull/700
    • Read All CLI Flags From Environment by @nlordell in https://github.com/cowprotocol/services/pull/727

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.79.1...v2.80.0

    Source code(tar.gz)
    Source code(zip)
  • v2.79.2(Oct 31, 2022)

    Hotfix release that patches ETHplorer API key configuration.

    What's Changed

    • Allow Ethplorer API Key to be passed via env variable by @fleupold in https://github.com/cowprotocol/services/pull/689

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.79.1...v2.79.2

    Source code(tar.gz)
    Source code(zip)
  • v2.79.1(Oct 31, 2022)

    Hotfix release that patches the simulated transaction JSON format.

    What's Changed

    • Fix serialize for SimulatedTransaction by @sunce86 in https://github.com/cowprotocol/services/pull/687

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.79.0...v2.79.1

    Source code(tar.gz)
    Source code(zip)
  • v2.79.0(Oct 31, 2022)

    What's Changed

    • Trades api: Adding ethflow trades by @josojo in https://github.com/cowprotocol/services/pull/644
    • Fix issue with long lasting subgraph queries by @sunce86 in https://github.com/cowprotocol/services/pull/655
    • Set more realistic value for mean gas used for UniswapV3 swap by @sunce86 in https://github.com/cowprotocol/services/pull/662
    • Provide information about valid_to and is_refunded to the front-end by @josojo in https://github.com/cowprotocol/services/pull/656
    • Improve solution submission log by @vkgnosis in https://github.com/cowprotocol/services/pull/666
    • Finish: Add signature gas to FeeParameters #480 by @josojo in https://github.com/cowprotocol/services/pull/664
    • Encoded settlement with all interactions by @fleupold in https://github.com/cowprotocol/services/pull/660
    • Added docker-compose file by @ennmichael in https://github.com/cowprotocol/services/pull/663
    • Add contract pool address to AMMs by @sunce86 in https://github.com/cowprotocol/services/pull/669
    • [RFC] scaffold for letting solvers know how they did in a given auction by @fleupold in https://github.com/cowprotocol/services/pull/661
    • Add class field to facilitate limit orders by @ennmichael in https://github.com/cowprotocol/services/pull/670
    • Add params for solver callback by @sunce86 in https://github.com/cowprotocol/services/pull/673
    • [Refunder] DB operations for refundable orders considering min validity duration, min slippage by @josojo in https://github.com/cowprotocol/services/pull/674
    • [Refunder] Allow to mark orders as refunded by @josojo in https://github.com/cowprotocol/services/pull/675
    • [Easy] Inserting missing tables into ALL_TABLES constants by @josojo in https://github.com/cowprotocol/services/pull/677
    • Storing the order_quotes for onchain_orders by @josojo in https://github.com/cowprotocol/services/pull/672
    • Allow limit order placement by @ennmichael in https://github.com/cowprotocol/services/pull/678
    • Include CoWSwapEthFlow contracts into contracts repo by @josojo in https://github.com/cowprotocol/services/pull/679
    • Make new class field backwards compatible with shadow solver by @MartinquaXD in https://github.com/cowprotocol/services/pull/680
    • Notify solvers about auction result by @sunce86 in https://github.com/cowprotocol/services/pull/684
    • Fix logic for price violation error by @sunce86 in https://github.com/cowprotocol/services/pull/686
    • [Refunder] creating basic crate by @josojo in https://github.com/cowprotocol/services/pull/682

    New Contributors

    • @ennmichael made their first contribution in https://github.com/cowprotocol/services/pull/663

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.78.0...v2.79.0

    Source code(tar.gz)
    Source code(zip)
  • v2.78.0(Oct 25, 2022)

    What's Changed

    • Treat UniV3 subgraph values as decimals instead of hex by @sunce86 in https://github.com/cowprotocol/services/pull/637
    • Event based liquidity fetching uniswapv3 by @sunce86 in https://github.com/cowprotocol/services/pull/466
    • Remove old temporary logs by @sunce86 in https://github.com/cowprotocol/services/pull/640
    • Add logs to UniswapV3 fetching by @sunce86 in https://github.com/cowprotocol/services/pull/641
    • Fix initial indexing of pools for UniswapV3 by @sunce86 in https://github.com/cowprotocol/services/pull/642
    • Make paginated_query more general by @sunce86 in https://github.com/cowprotocol/services/pull/645
    • Make SettlementEncoder aware of internalizable interactions by @fleupold in https://github.com/cowprotocol/services/pull/636
    • Pre_interactions database scheme & database operations by @josojo in https://github.com/cowprotocol/services/pull/620
    • Ethflow orders in get_user_order() by @josojo in https://github.com/cowprotocol/services/pull/610
    • Encode pre-interactions for settlement by @josojo in https://github.com/cowprotocol/services/pull/623
    • Redesign the ticks fetch by @sunce86 in https://github.com/cowprotocol/services/pull/646
    • Don't require interactions field by @vkgnosis in https://github.com/cowprotocol/services/pull/647
    • Optimistically Quote Trades With Non-Revert Simulation Failures by @nlordell in https://github.com/cowprotocol/services/pull/622
    • Remove rinkeby autodeploy by @vkgnosis in https://github.com/cowprotocol/services/pull/648
    • Store risk adjusted reward in DB even if it is 0 by @vkgnosis in https://github.com/cowprotocol/services/pull/649
    • Log rewards of winning solution by @vkgnosis in https://github.com/cowprotocol/services/pull/651
    • Pre interactions: Insert pre-interactions for ethflow orders by @josojo in https://github.com/cowprotocol/services/pull/624
    • Ethflow: No balance check for ethflow orders by @josojo in https://github.com/cowprotocol/services/pull/625
    • Add argument for MAX_POOLS_TO_INITIALIZE by @sunce86 in https://github.com/cowprotocol/services/pull/653
    • Implement API route for native tokens price by @sunce86 in https://github.com/cowprotocol/services/pull/638
    • [Refunder] Db design and operations for refunding state by @josojo in https://github.com/cowprotocol/services/pull/631

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.77.0...v2.78.0

    Source code(tar.gz)
    Source code(zip)
  • v2.77.0(Oct 17, 2022)

    What's Changed

    • Increase Slippage Precision for ParaSwap Solver by @nlordell in https://github.com/cowprotocol/services/pull/601
    • Change EventHandler logic around partial and skipped updates by @sunce86 in https://github.com/cowprotocol/services/pull/594
    • Store solver competition info in more cases by @vkgnosis in https://github.com/cowprotocol/services/pull/608
    • Limit precision with which we compare solutions by @fleupold in https://github.com/cowprotocol/services/pull/602
    • Add order_rewards table by @vkgnosis in https://github.com/cowprotocol/services/pull/609
    • Estimate cost of interaction when quoting price estimates by @fleupold in https://github.com/cowprotocol/services/pull/612
    • Creating the ethflow event_udpater by @josojo in https://github.com/cowprotocol/services/pull/542
    • Add nightly rustfmt features to pull request workflow by @MartinquaXD in https://github.com/cowprotocol/services/pull/615
    • Store dummy order rewards in database by @vkgnosis in https://github.com/cowprotocol/services/pull/611
    • Revert "Return onchain_orders for get_user_orders() requests (#583)" by @josojo in https://github.com/cowprotocol/services/pull/616
    • Unit test for HTTP gas price estimation by @fleupold in https://github.com/cowprotocol/services/pull/613
    • Refactor Price Estimation Initialization by @nlordell in https://github.com/cowprotocol/services/pull/573
    • Set solver rewards in auction and http solver model by @vkgnosis in https://github.com/cowprotocol/services/pull/619
    • Mark rewards as default by @vkgnosis in https://github.com/cowprotocol/services/pull/628
    • Implement cip-14 risk adjusted reward calculation by @vkgnosis in https://github.com/cowprotocol/services/pull/627
    • Bump ethcontract-rs version to v0.22.0 by @sunce86 in https://github.com/cowprotocol/services/pull/633
    • Align fee with objective value computation in solution competition reporting by @fleupold in https://github.com/cowprotocol/services/pull/630

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.75.0...v2.77.0

    Source code(tar.gz)
    Source code(zip)
  • v2.76.0(Oct 10, 2022)

    What's Changed

    • Increase Slippage Precision for ParaSwap Solver by @nlordell in https://github.com/cowprotocol/services/pull/601
    • Change EventHandler logic around partial and skipped updates by @sunce86 in https://github.com/cowprotocol/services/pull/594
    • Store solver competition info in more cases by @vkgnosis in https://github.com/cowprotocol/services/pull/608
    • Limit precision with which we compare solutions by @fleupold in https://github.com/cowprotocol/services/pull/602
    • Add order_rewards table by @vkgnosis in https://github.com/cowprotocol/services/pull/609
    • Estimate cost of interaction when quoting price estimates by @fleupold in https://github.com/cowprotocol/services/pull/612
    • Creating the ethflow event_udpater by @josojo in https://github.com/cowprotocol/services/pull/542
    • Add nightly rustfmt features to pull request workflow by @MartinquaXD in https://github.com/cowprotocol/services/pull/615
    • Revert "Return onchain_orders for get_user_orders() requests (#583)" by @josojo in https://github.com/cowprotocol/services/pull/616

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.75.0...v2.76.0

    Source code(tar.gz)
    Source code(zip)
  • v2.75.1(Oct 5, 2022)

  • v2.75.0(Oct 4, 2022)

    What's Changed

    • Event handler improvement v2 by @sunce86 in https://github.com/cowprotocol/services/pull/535
    • Document solver api by @vkgnosis in https://github.com/cowprotocol/services/pull/569
    • Move auction age liveness check to autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/575
    • Don't error on insert_orders conflicts for the onchain_placed_orders by @josojo in https://github.com/cowprotocol/services/pull/579
    • Add the flag is_ethflow_order by @josojo in https://github.com/cowprotocol/services/pull/580
    • Initialize solver metrics by @vkgnosis in https://github.com/cowprotocol/services/pull/584
    • Split DEX Aggregator Slippage Type by @nlordell in https://github.com/cowprotocol/services/pull/585
    • Filter solvable orders for expired ethflow orders by @josojo in https://github.com/cowprotocol/services/pull/582
    • Update MAX_REORG_BLOCK_COUNT to 64 by @sunce86 in https://github.com/cowprotocol/services/pull/592
    • Return onchain_orders for get_user_orders() requests by @josojo in https://github.com/cowprotocol/services/pull/583
    • Update to Cargo Workspace Dependencies by @nlordell in https://github.com/cowprotocol/services/pull/596
    • Revert "Add the flag is_ethflow_order" by @josojo in https://github.com/cowprotocol/services/pull/598
    • Cargo Dependency Update by @nlordell in https://github.com/cowprotocol/services/pull/597
    • Refactor Slippage Computation by @nlordell in https://github.com/cowprotocol/services/pull/589
    • Use Slippage Calculator for Internal Solvers by @nlordell in https://github.com/cowprotocol/services/pull/591
    • Use Slippage Calculator for DEX Ag Solvers by @nlordell in https://github.com/cowprotocol/services/pull/593
    • Implement Inner Request Sharing for 1Inch Trade Finder by @nlordell in https://github.com/cowprotocol/services/pull/572
    • Configure Relative and Absolute Slippage for all Solvers by @nlordell in https://github.com/cowprotocol/services/pull/595
    • Increase Slippage Precision by @nlordell in https://github.com/cowprotocol/services/pull/600
    • Remove Clap ArgGroup Workaround by @nlordell in https://github.com/cowprotocol/services/pull/603
    • Don't allow banned users to be set as receiver by @fleupold in https://github.com/cowprotocol/services/pull/605

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.74.0...v2.75.0

    Source code(tar.gz)
    Source code(zip)
  • v2.74.1(Oct 3, 2022)

  • v2.74.0(Sep 27, 2022)

    What's Changed

    • Fix: typos by @omahs in https://github.com/cowprotocol/services/pull/533
    • General onchain order parsing logic by @josojo in https://github.com/cowprotocol/services/pull/536
    • Revert previous fixes for edens submission alerts by @MartinquaXD in https://github.com/cowprotocol/services/pull/521
    • Drop CustomNodes submission strategy by @MartinquaXD in https://github.com/cowprotocol/services/pull/557
    • Adding custom ethflow event processing by @josojo in https://github.com/cowprotocol/services/pull/537
    • Move pending gas price out of SubmitterGasPriceEstimator by @MartinquaXD in https://github.com/cowprotocol/services/pull/522
    • Move submission error metrics by @MartinquaXD in https://github.com/cowprotocol/services/pull/558
    • Making the event_updater event generic by @josojo in https://github.com/cowprotocol/services/pull/539
    • Address comments for submission logic by @MartinquaXD in https://github.com/cowprotocol/services/pull/565
    • Putting arguments for order quoting into common crate by @josojo in https://github.com/cowprotocol/services/pull/540
    • Impl QuoteStoring for Postgres by @josojo in https://github.com/cowprotocol/services/pull/541
    • Prevent very old blocks from entering the current_block_stream by @MartinquaXD in https://github.com/cowprotocol/services/pull/566
    • Add openapi docs for solver api by @vkgnosis in https://github.com/cowprotocol/services/pull/544
    • Easy Fix: ethflow parsing by @josojo in https://github.com/cowprotocol/services/pull/570
    • Introduce 1Inch Trade Finder by @nlordell in https://github.com/cowprotocol/services/pull/552
    • Expand TradeFinding Interface for Quoting by @nlordell in https://github.com/cowprotocol/services/pull/553
    • Introduce ParaSwap Trade Finder by @nlordell in https://github.com/cowprotocol/services/pull/559
    • Refactor 1Inch Price Estimator by @nlordell in https://github.com/cowprotocol/services/pull/561
    • Refactor ParaSwap Price Estimator by @nlordell in https://github.com/cowprotocol/services/pull/562
    • Introduce code fetching cache by @nlordell in https://github.com/cowprotocol/services/pull/564
    • Add Request Sharing to 0x Trade Finder by @nlordell in https://github.com/cowprotocol/services/pull/563
    • Implement Inner Request Sharing for ParaSwap Trade Finder by @nlordell in https://github.com/cowprotocol/services/pull/571

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.73.0...v2.74.0

    Source code(tar.gz)
    Source code(zip)
  • v2.73.0(Sep 19, 2022)

    What's Changed

    • Exit process if thread panics by @vkgnosis in https://github.com/cowprotocol/services/pull/530
    • Removed unused parameter when calling quasimodo. by @marcovc in https://github.com/cowprotocol/services/pull/546
    • Add flag for skipping EIP-1271 order signature validation on creation by @nlordell in https://github.com/cowprotocol/services/pull/543
    • Introduce TradeFinding Abstraction by @nlordell in https://github.com/cowprotocol/services/pull/519
    • Refactor 0x Price Estimator by @nlordell in https://github.com/cowprotocol/services/pull/520
    • Introduce component for building roundtrip simulation by @nlordell in https://github.com/cowprotocol/services/pull/523
    • Refactor TenderlyApi for reuse in bad token detection by @nlordell in https://github.com/cowprotocol/services/pull/524
    • Implement Component for Simulating EVM Bytecode by @nlordell in https://github.com/cowprotocol/services/pull/525
    • Ethcontract-rs version 0.20.0 by @josojo in https://github.com/cowprotocol/services/pull/548
    • Refactor Trade encoding by @nlordell in https://github.com/cowprotocol/services/pull/526
    • Simulate DEX Aggregator Trades For Price Estimates by @nlordell in https://github.com/cowprotocol/services/pull/527
    • Add unit tests for trade simulation by @nlordell in https://github.com/cowprotocol/services/pull/531
    • Add from field to price estimation queries by @nlordell in https://github.com/cowprotocol/services/pull/532
    • Log current block number in more places by @vkgnosis in https://github.com/cowprotocol/services/pull/549
    • Return better error message if auction is 404 by @vkgnosis in https://github.com/cowprotocol/services/pull/550

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.72.0...v2.73.0

    Source code(tar.gz)
    Source code(zip)
  • v2.72.0(Sep 12, 2022)

    What's Changed

    • Remove SolverCompetitionId in favor of AuctionId by @vkgnosis in https://github.com/cowprotocol/services/pull/488
    • Revert "Log simulation error with readable settlement (#479)" by @MartinquaXD in https://github.com/cowprotocol/services/pull/496
    • Refactor out token finding into its own component by @nlordell in https://github.com/cowprotocol/services/pull/493
    • Common Arguments for Token Owner Finding by @nlordell in https://github.com/cowprotocol/services/pull/495
    • Added new Ethplorer based token holder API by @nlordell in https://github.com/cowprotocol/services/pull/497
    • Setup scaffolding for support contracts by @nlordell in https://github.com/cowprotocol/services/pull/505
    • Web3 API implementation for eth_call with state overrides by @nlordell in https://github.com/cowprotocol/services/pull/507
    • Allow configuration of separate tracing nodes. by @nlordell in https://github.com/cowprotocol/services/pull/508
    • Bump ethcontract by @josojo in https://github.com/cowprotocol/services/pull/510
    • Database design for onchain + ethflow orders by @josojo in https://github.com/cowprotocol/services/pull/499
    • Database operations for on-chain orders by @josojo in https://github.com/cowprotocol/services/pull/500
    • Ethflow db operations by @josojo in https://github.com/cowprotocol/services/pull/501
    • Continuously solve auction with updated liquidity in new driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/475
    • Adding CowSwapOnchainOrder contract by @josojo in https://github.com/cowprotocol/services/pull/509
    • Use tracing span for submission loop by @MartinquaXD in https://github.com/cowprotocol/services/pull/512
    • Putting order_quoting and order_validation into shared crate by @josojo in https://github.com/cowprotocol/services/pull/511
    • Make get_quote_and_check_fee more flexible for future use cases by @josojo in https://github.com/cowprotocol/services/pull/513
    • Refactor order remaining amounts calculation by @vkgnosis in https://github.com/cowprotocol/services/pull/515
    • [Trivial] Make swagger connect to production by default by @fleupold in https://github.com/cowprotocol/services/pull/516
    • Add version endpoint by @fleupold in https://github.com/cowprotocol/services/pull/517
    • [Easy] Making is_order_outside_market_price more flexible for future use-case by @josojo in https://github.com/cowprotocol/services/pull/518
    • Refactor HTTP client initialization by @nlordell in https://github.com/cowprotocol/services/pull/534

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.71.0...v2.72.0

    Source code(tar.gz)
    Source code(zip)
  • v2.71.0(Sep 5, 2022)

    What's Changed

    • Reuse submission logic from current driver in the new driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/465
    • Reuse ranking logic in commit reveal wrapper by @MartinquaXD in https://github.com/cowprotocol/services/pull/470
    • Make flag command line arguments consistent by @nlordell in https://github.com/cowprotocol/services/pull/474
    • Reword log for filtered invalid EIP-1271 orders by @nlordell in https://github.com/cowprotocol/services/pull/483
    • Log simulation error with readable settlement by @MartinquaXD in https://github.com/cowprotocol/services/pull/479
    • Use eth_sendSlotTxs in eden submission by @MartinquaXD in https://github.com/cowprotocol/services/pull/484
    • Log when orders are filtered because of missing allowance/balance by @fleupold in https://github.com/cowprotocol/services/pull/482
    • refactor arguments display by @nlordell in https://github.com/cowprotocol/services/pull/491
    • updated readme to more prominently include info on autopilot by @nlordell in https://github.com/cowprotocol/services/pull/489
    • Improve usability of the new driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/472
    • Refactor token holder finding startup by @nlordell in https://github.com/cowprotocol/services/pull/492
    • Hopefully fix noisy submission error alert on eden by @MartinquaXD in https://github.com/cowprotocol/services/pull/481
    • Update License Links by @nlordell in https://github.com/cowprotocol/services/pull/498
    • Print full token address in prioce violation log by @vkgnosis in https://github.com/cowprotocol/services/pull/502
    • Update gas estimation dependency by @vkgnosis in https://github.com/cowprotocol/services/pull/504

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.70.0...v2.71.0

    Source code(tar.gz)
    Source code(zip)
Owner
CoW Protocol
Development of the Cow Suite
CoW Protocol
A tool to aid in self-hosting. Expose local services on your computer, via a public IPv4 address.

innisfree A tool to aid in self-hosting. Expose local services on your computer, via a public IPv4 address. Why? Most of the data I maintain is local,

Conor Schaefer 7 Mar 19, 2022
A collection of lower-level libraries for composable network services.

Actix Net A collection of lower-level libraries for composable network services. Example See actix-server/examples and actix-tls/examples for some bas

Actix 582 Dec 28, 2022
A minimalistic encryption protocol for rust async streams/packets, based on noise protocol and snow.

Snowstorm A minimalistic encryption protocol for rust async streams / packets, based on noise protocol and snow. Quickstart Snowstorm allows you to se

Black Binary 19 Nov 22, 2022
A Markov chain based Discord chat bot.

A Markov chain based Discord chat bot. Building It is recommended to use cargo.

Dominik Miedziński 1 Dec 26, 2021
chain nats.io servers with transformation & processing pipelines

NATS proxy service Simple tool to forward specific topics from one nats.io cluster to the same server or another. Provides support to process messages

Marquitos 8 Sep 19, 2022
Easy protocol definitions in Rust

protocol Documentation Easy protocol definitions in Rust. This crate adds a custom derive that can be added to types, allowing structured data to be s

Dylan McKay 157 Dec 30, 2022
A Constrained Application Protocol(CoAP) library implemented in Rust.

coap-rs A fast and stable Constrained Application Protocol(CoAP) library implemented in Rust. Features: CoAP core protocol RFC 7252 CoAP Observe optio

Covertness 170 Dec 19, 2022
🥧 Savoury implementation of the QUIC transport protocol and HTTP/3

quiche is an implementation of the QUIC transport protocol and HTTP/3 as specified by the IETF. It provides a low level API for processing QUIC packet

Cloudflare 7.1k Jan 8, 2023
🤖 brwrs is a new protocol running over TCP/IP that is intended to be a suitable candidate for terminal-only servers

brwrs is a new protocol running over TCP/IP that is intended to be a suitable candidate for terminal-only servers (plain text data). That is, although it can be accessed from a browser, brwrs will not correctly interpret the browser's GET request.

daCoUSB 3 Jul 30, 2021
A multi-protocol network relay

A multi-protocol network relay

zephyr 43 Dec 13, 2022
A Rust library for parsing the SOME/IP network protocol (without payload interpretation).

someip_parse A Rust library for parsing the SOME/IP network protocol (without payload interpretation). Usage Add the following to your Cargo.toml: [de

Julian Schmid 18 Oct 31, 2022
The Graph is a protocol for building decentralized applications (dApps) quickly on Ethereum and IPFS using GraphQL.

Graph Node The Graph is a protocol for building decentralized applications (dApps) quickly on Ethereum and IPFS using GraphQL. Graph Node is an open s

Mindy.wang 2 Jun 18, 2022
🤖 Autonomous Twitter bot that posts analytics of the APYs available on the Solend Protocol.

Solend APY Twitter Bot Solana Ignition Hackathon 2021 View Demo · Report Bug · Request Feature Table of Contents About The Project Motivation Challeng

Manuel Gil 4 Sep 23, 2022
Yet Another File Transfer Protocol.

yaftp Yet Another File Transfer Protocol. Build & Run $> cargo build --release Features C2C Lightweight Per something per session High performence Res

b23r0 20 Sep 22, 2022
An End-to-End Privacy Computing Protocol on Layer 2

Eigen Network Eigen Network is an end-to-end privacy computation network for a better digital economy based on hybrid privacy computation protocols an

Eigen Lab 24 Oct 13, 2022
Shade Protocol is an array of connected privacy-preserving dApps built on Secret Network

Shade Protocol Core Contracts Contract Reference Description mint doc Handles asset burning and silk minting oracle doc Handles asset price queries tr

Secure Secrets 58 Nov 15, 2022
IDP2P is a peer-to-peer identity protocol which enables a controller to create, manage and share its own proofs as well as did documents

IDP2P Experimental, inspired by ipfs, did:peer and keri Background See also (related topics): Decentralized Identifiers (DIDs) Verifiable Credentials

null 5 Oct 31, 2022
Rustus - TUS protocol implementation in Rust.

Rustus Tus protocol implementation written in Rust. Features This implementation has several features to make usage as simple as possible. Rustus is r

Pavel Kirilin 74 Jan 1, 2023
Peer-to-peer communications library for Rust based on QUIC protocol

qp2p Crate Documentation MaidSafe website SAFE Dev Forum SAFE Network Forum Overview This library provides an API to simplify common tasks when creati

MaidSafe 337 Dec 14, 2022