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
  • 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
  • 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
  • Implement Display for Arguments

    Implement Display for Arguments

    Implement Display for our command line arguments so we don't leak secret values.

    Since this allows easy custom formatting I also improved the formatting for urls and lists to be a single line.

    Test Plan: CI and manual comparison to previous way they were printed

    Old discussion below:


    We debug log our arguments in the main functions. This leaks secrets because many of them are plain strings. There are two reasonable ways to prevent this:

    1. Wrap secret arguments into types with a custom Debug implementation. We do this for solver private keys.
    2. Manually implement Debug/Display for the arguments.

    For 1 we could introduce a generic type that wraps secret arguments with a Debug implementation that doesn't leak them.

    Expand
    pub struct SecretArgument<T>(pub T);
    
    impl<T> std::fmt::Debug for SecretArgument<T> {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            f.debug_tuple("SecretArgument").finish()
        }
    }
    
    impl<T: FromStr> FromStr for SecretArgument<T> {
        type Err = <T as FromStr>::Err;
    
        fn from_str(s: &str) -> Result<Self, Self::Err> {
            let s = T::from_str(s)?;
            Ok(Self(s))
        }
    }
    

    For 2 we would manually implement Display like is done in the code of this PR.

    The downside of 2 is that it is more work to keep the Display implementation up to date. When a field is changed we need to update the impl too. This is not the case with 1. On the other hand with 1. using the wrapped arguments later is more tedious because you have to through the wrapper type like. 2 also gives more flexibility in the implementation. For example, it is annoying that we see URLs formatted over multiple lines. With 2 we can manually format every field which is why in this PR I have switched some of them to Display {} from Debug {:?}. 2 is more correct than 1. Debug implementations are supposed to be lossless and used for debugging and we are abusing the debug representation to fix our secret issues. With 2 you can still temporarily debug print the arguments while debugging which is lost with 1.

    This PR has a temporary test to show the new formatting of the shared arguments:

    Old
    Arguments {
        log_filter: "warn,orderbook=debug,solver=debug,shared=debug,shared::transport::http=info",
        log_stderr_threshold: LevelFilter::ERROR,
        node_url: Url {
            scheme: "http",
            cannot_be_a_base: false,
            username: "",
            password: None,
            host: Some(
                Domain(
                    "localhost",
                ),
            ),
            port: Some(
                8545,
            ),
            path: "/",
            query: None,
            fragment: None,
        },
        http_timeout: 10s,
        gas_estimators: [
            Web3,
        ],
        blocknative_api_key: None,
        base_tokens: [],
        baseline_sources: None,
        pool_cache_blocks: 10,
        pool_cache_maximum_recent_block_age: 4,
        pool_cache_maximum_retries: 5,
        pool_cache_delay_between_retries_seconds: 1s,
        block_stream_poll_interval_seconds: 5s,
        paraswap_partner: None,
        disabled_paraswap_dexs: [
            "ParaSwapPool4",
        ],
        paraswap_rate_limiter: None,
        zeroex_url: None,
        zeroex_api_key: None,
        quasimodo_uses_internal_buffers: false,
        mip_uses_internal_buffers: false,
        balancer_factories: None,
        disabled_one_inch_protocols: [
            "PMM1",
        ],
        one_inch_url: Url {
            scheme: "https",
            cannot_be_a_base: false,
            username: "",
            password: None,
            host: Some(
                Domain(
                    "api.1inch.exchange",
                ),
            ),
            port: None,
            path: "/",
            query: None,
            fragment: None,
        },
        disabled_zeroex_sources: [],
        balancer_pool_deny_list: [],
        solver_competition_auth: None,
    }
    
    New
    log_filter: warn,orderbook=debug,solver=debug,shared=debug,shared::transport::http=info
    log_stderr_threshold: error
    node_url: http://localhost:8545/
    http_timeout: 10s
    gas_estimators: [Web3]
    blocknative_api_key: None
    base_tokens: []
    baseline_sources: None
    pool_cache_blocks: 10
    pool_cache_maximum_recent_block_age: 4
    pool_cache_maximum_retries: 5
    pool_cache_delay_between_retries_seconds: 1s
    block_stream_poll_interval_seconds: 5s
    paraswap_partner: None
    disabled_paraswap_dexs: ["ParaSwapPool4"]
    paraswap_rate_limiter: None
    zeroex_url: None
    zeroex_api_key: None
    quasimodo_uses_internal_buffers: false
    mip_uses_internal_buffers: false
    balancer_factories: None
    disabled_one_inch_protocols: ["PMM1"]
    one_inch_url: https://api.1inch.exchange/
    disabled_zeroex_sources: []
    balancer_pool_deny_list: []
    solver_competition_auth: None
    

    I wanted to get this out as a draft before I convert all the arguments to the Display approach.

    Test Plan

    CI, manually look at output

    opened by vkgnosis 10
  • Forward Order Maturity to Solvers

    Forward Order Maturity to Solvers

    This PR defines each order maturity at the beginning of each Auction. Then forwards this information to all solvers. This will allow solvers to be smarter about our order maturity logic and avoid creating settlement that will fail the maturity check in the driver.

    Makes sense to add this since I expect all solvers to use this to optimize their algorithms.

    Test Plan

    Updated unit tests.

    Release notes

    Changed data format for solve endpoint. Solvers should be notified about new is_mature field.

    opened by sunce86 9
  • Balancer Weighted Pool Output Calculation Error

    Balancer Weighted Pool Output Calculation Error

    Currently, we have settlements failing to execute because the following require is failing for Balancer weighted pools with shallow liquidity:

            // Cannot exceed maximum out ratio
            _require(amountOut <= balanceOut.mulDown(_MAX_OUT_RATIO), Errors.MAX_OUT_RATIO);
    

    We should account for this in the baseline solver.

    oncall 
    opened by nlordell 0
  • Wait for auction id to change before solving again

    Wait for auction id to change before solving again

    Fixes https://github.com/cowprotocol/services/issues/855 .

    This PR skips single_run if we would be solving the same auction id that we already solved before. This only applies if got a solution last time. We still attempt to solve if the previous run didn't find a solution. We could also skip in that case. I'm not sure what behavior is better.

    Test Plan

    CI

    opened by vkgnosis 1
  • Setup all necessary onchain context in `docker-compose`

    Setup all necessary onchain context in `docker-compose`

    Our docker-compose currently sets up a local Ethereum environment via hardhat, but doesn't deploy any of the necessary contracts or other setup. This is confusing to users. Recently, a person was trying to work on services locally and ended up asking us how to deploy the contracts. It'd be best if docker-compose did all this work automatically so that the users could simply run the services and use them locally end-to-end.

    This along with other docker-compose functionality should be documented in our README.md file.

    opened by ennmichael 1
  • Driver introduces prices for tokens traded only by liquidity orders and then checks these prices for max price deviation

    Driver introduces prices for tokens traded only by liquidity orders and then checks these prices for max price deviation

    It has been observed that the driver applies the test for maximum price deviation that is performed among some standard coins, even for the prices that the driver introduces for tokens traded only by liquidity orders. I think this test should not take into account these prices.

    opened by harisang 0
  • Fix bug when introducing prices for liquidity orders

    Fix bug when introducing prices for liquidity orders

    In order for the smart contract to execute an order, it requires prices for both the sell and the buy token. This applies to liquidity orders as well.

    It was observed that due to this part of the code (thanks to @MartinquaXD for identifying the line with the bug) https://github.com/cowprotocol/services/blob/main/crates/solver/src/settlement/settlement_encoder.rs#L392-L398

    the driver sometimes introduces a price for the sell token of a liquidity order that is equal to the buy amount, even if there is already a price computed for the buy token. This leads to a very wrong clearing price vector.

    bug external solver 
    opened by harisang 4
Releases(v2.83.0)
  • 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)
  • v2.70.0(Aug 30, 2022)

    What's Changed

    • Move much of the logging out of the driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/448
    • Make sure to maintain UniV2 pool fetcher by @nlordell in https://github.com/cowprotocol/services/pull/467
    • Require inputs and outputs for interactions in settlement by @MartinquaXD in https://github.com/cowprotocol/services/pull/455
    • Drop deprecated call_data format by @MartinquaXD in https://github.com/cowprotocol/services/pull/468
    • [easy] using debug instead of info in some places by @josojo in https://github.com/cowprotocol/services/pull/471
    • No liquidity or filtering of non-fee-connected-tokens for external solvers by @nlordell in https://github.com/cowprotocol/services/pull/461
    • Configure custom node submission handling of high risk transactions by @nlordell in https://github.com/cowprotocol/services/pull/473
    • Adding new error messages for existing tx from erigon node by @josojo in https://github.com/cowprotocol/services/pull/477
    • Use AllowanceManager in ZeroExInteraction by @MartinquaXD in https://github.com/cowprotocol/services/pull/476

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

    Source code(tar.gz)
    Source code(zip)
  • v2.69.2(Aug 23, 2022)

  • v2.69.1(Aug 22, 2022)

    What's Changed

    • Make referrer address configurable for 1Inch by @MartinquaXD in https://github.com/cowprotocol/services/pull/459

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.69.0...v2.69.1

    Source code(tar.gz)
    Source code(zip)
  • v2.69.0(Aug 22, 2022)

    What's Changed

    • Fix Rust 1.63 Cargo Clippy Warnings by @nlordell in https://github.com/cowprotocol/services/pull/458
    • Fix Debug implementation of InteractionData by @MartinquaXD in https://github.com/cowprotocol/services/pull/460
    • Wait for auction competition id to change in driver by @vkgnosis in https://github.com/cowprotocol/services/pull/456

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.68.0...v2.69.0

    Source code(tar.gz)
    Source code(zip)
  • v2.68.0(Aug 16, 2022)

    What's Changed

    • Create auction table in database by @vkgnosis in https://github.com/cowprotocol/services/pull/412
    • Implement CommitRevealSolver by @MartinquaXD in https://github.com/cowprotocol/services/pull/419
    • HTTP Solver Foreign Liquidity Native Orders by @nlordell in https://github.com/cowprotocol/services/pull/422
    • Add tokens and fee tier to UniswapV3 subgraph query by @sunce86 in https://github.com/cowprotocol/services/pull/424
    • Activate UniswapV3 pool fetching periodic maintenance by @sunce86 in https://github.com/cowprotocol/services/pull/427
    • Initialize components needed for auction creation in autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/426
    • Convert auction in new driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/425
    • Improve error logging and handling for Blockscout token owner finder by @nlordell in https://github.com/cowprotocol/services/pull/429
    • Fix default baseline sources for Goerli by @nlordell in https://github.com/cowprotocol/services/pull/431
    • Storing quotes longer, in case an on-chain order placement is intended by @josojo in https://github.com/cowprotocol/services/pull/414
    • Collect liquidity in new driver by @MartinquaXD in https://github.com/cowprotocol/services/pull/428
    • Move settlements merging into SingleOrderSolver by @MartinquaXD in https://github.com/cowprotocol/services/pull/434
    • Add auction database functions to orderbook and autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/436
    • Move settlement ranking logic into separate component by @MartinquaXD in https://github.com/cowprotocol/services/pull/432
    • Move internal buffer optimization into component by @MartinquaXD in https://github.com/cowprotocol/services/pull/437
    • Disable codecov PR comments by @vkgnosis in https://github.com/cowprotocol/services/pull/445
    • Don't implement Hash for Order. by @nlordell in https://github.com/cowprotocol/services/pull/442
    • [Logging] Log filtered orders that are assumed to be inflight by @fleupold in https://github.com/cowprotocol/services/pull/441
    • Track maintenance blocks by @nlordell in https://github.com/cowprotocol/services/pull/449
    • Fix handling of multiple settlements in same block by @vkgnosis in https://github.com/cowprotocol/services/pull/447
    • Don't filter our partially fillable sell orders that have reached minBuyAmount by @fleupold in https://github.com/cowprotocol/services/pull/446
    • Move auction creation into autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/433

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.67.0...v2.68.0

    Source code(tar.gz)
    Source code(zip)
  • v2.67.0(Aug 8, 2022)

    What's Changed

    • Update the auction's next solver competition id immediately by @vkgnosis in https://github.com/cowprotocol/services/pull/392
    • Remove InstrumentedTransport by @vkgnosis in https://github.com/cowprotocol/services/pull/393
    • Initialize node connection in autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/394
    • Use default arguments for 1inch solution complexity by @MartinquaXD in https://github.com/cowprotocol/services/pull/397
    • Move BigDecimal conversion to conversions crate by @vkgnosis in https://github.com/cowprotocol/services/pull/398
    • Fix recording of cancelled orders metric by @nlordell in https://github.com/cowprotocol/services/pull/401
    • Handle contract events in autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/399
    • Move database quote maintenance into autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/402
    • Move account balance module into shared by @vkgnosis in https://github.com/cowprotocol/services/pull/405
    • Move signature validator module into shared by @vkgnosis in https://github.com/cowprotocol/services/pull/406
    • Add prometheus metrics for batch calls by @ahhda in https://github.com/cowprotocol/services/pull/403
    • Define types required for settlement competition without call data by @MartinquaXD in https://github.com/cowprotocol/services/pull/363
    • Create SettlementRating trait by @MartinquaXD in https://github.com/cowprotocol/services/pull/410
    • Add UniswapV3 liquidity to driver by @sunce86 in https://github.com/cowprotocol/services/pull/388
    • Refactor recent block cache metrics to macro by @vkgnosis in https://github.com/cowprotocol/services/pull/415
    • Refactor price estimator metrics to macro by @vkgnosis in https://github.com/cowprotocol/services/pull/416
    • Move instrumented gas estimator into shared by @vkgnosis in https://github.com/cowprotocol/services/pull/413
    • Refactor native price estimator metrics with macro by @vkgnosis in https://github.com/cowprotocol/services/pull/417
    • Refactor auction metrics with macro by @vkgnosis in https://github.com/cowprotocol/services/pull/418
    • Add logs for UniswapV3 pool fetching by @sunce86 in https://github.com/cowprotocol/services/pull/423

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.66.0...v2.67.0

    Source code(tar.gz)
    Source code(zip)
  • v2.66.0(Aug 1, 2022)

    What's Changed

    • Move solver competition storing into database crate by @vkgnosis in https://github.com/cowprotocol/services/pull/381
    • Support gzip compressed http responses by @vkgnosis in https://github.com/cowprotocol/services/pull/383
    • Store tx hash for reverted transactions in solver_competition by @vkgnosis in https://github.com/cowprotocol/services/pull/384
    • Store solver_competition tx_hash in column by @vkgnosis in https://github.com/cowprotocol/services/pull/382
    • Default BalancerV2 Pool Factories per Chain by @nlordell in https://github.com/cowprotocol/services/pull/387
    • Do not specify slippage argument by default by @vkgnosis in https://github.com/cowprotocol/services/pull/386
    • Make solver_competition route work with tx hash by @vkgnosis in https://github.com/cowprotocol/services/pull/385
    • Move trades into database crate by @vkgnosis in https://github.com/cowprotocol/services/pull/380
    • Reduce critical section in rate limiter code by @MartinquaXD in https://github.com/cowprotocol/services/pull/365
    • Move table row metrics into autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/329
    • Configure Balancer V2 subgraph for Goerli by @nlordell in https://github.com/cowprotocol/services/pull/391
    • Autodeploy autopilot by @vkgnosis in https://github.com/cowprotocol/services/pull/390

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.65.0...v2.66.0

    Source code(tar.gz)
    Source code(zip)
  • v2.65.0(Jul 26, 2022)

    What's Changed

    • Move cancel_order into database crate by @vkgnosis in https://github.com/cowprotocol/services/pull/361
    • Balancer Stable Math: calculate_invariant_v2 by @bh2smith in https://github.com/cowprotocol/services/pull/368
    • Vendor Stable Pool V2 Artifacts by @bh2smith in https://github.com/cowprotocol/services/pull/371
    • Fix code coverage generation by @vkgnosis in https://github.com/cowprotocol/services/pull/376
    • Fix e2e test solvable orders logic by @vkgnosis in https://github.com/cowprotocol/services/pull/375
    • Use Rust 1.62 features by @vkgnosis in https://github.com/cowprotocol/services/pull/333
    • Enable cargo cache for CI coverage job by @vkgnosis in https://github.com/cowprotocol/services/pull/379
    • Move quotes module into database by @vkgnosis in https://github.com/cowprotocol/services/pull/378
    • Limit max slippage per trade on 1Inch to configurable amount in ETH by @MartinquaXD in https://github.com/cowprotocol/services/pull/369
    • Classify no-liquidity errors for 1inch price estimator by @josojo in https://github.com/cowprotocol/services/pull/364

    New Contributors

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

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.64.0...v2.65.0

    Source code(tar.gz)
    Source code(zip)
  • v2.63.1(Jul 16, 2022)

  • v2.64.0(Jul 19, 2022)

    What's Changed

    • Add auction to settlement competition information by @nlordell in https://github.com/cowprotocol/services/pull/348
    • Refactor event related queries into database crate by @vkgnosis in https://github.com/cowprotocol/services/pull/349
    • Refactor solver competition storing by @nlordell in https://github.com/cowprotocol/services/pull/352
    • Include next solver competition ID in auction and logs by @nlordell in https://github.com/cowprotocol/services/pull/353
    • Require native buy token price before creating quote by @MartinquaXD in https://github.com/cowprotocol/services/pull/358
    • Store settlement competition as JSON blobs in database by @nlordell in https://github.com/cowprotocol/services/pull/354
    • Move insert_order into database crate by @vkgnosis in https://github.com/cowprotocol/services/pull/359
    • Move insert_quote into database crate by @vkgnosis in https://github.com/cowprotocol/services/pull/360
    • Fix endless recursion when cloning PriceEstimationError by @MartinquaXD in https://github.com/cowprotocol/services/pull/367

    Full Changelog: https://github.com/cowprotocol/services/compare/v2.63.0...v2.64.0

    Source code(tar.gz)
    Source code(zip)
Owner
CoW Protocol
Development of the Cow Suite
CoW Protocol
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 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 574 Nov 23, 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 150 Nov 5, 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 168 Nov 14, 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 6.9k Nov 27, 2022
🤖 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 42 Oct 23, 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 70 Nov 30, 2022
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 328 Nov 25, 2022