Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

Vouch Register for Solver Bonding

A bonding pool is a Gnosis Safe instance that is owned solely by the CoW DAO. Its creator escrows the amount specified in the CIP to guarantee that none of the vouched solvers misbehaves. The provided contracts allow bonding pools to either vouch or invalidate a vouch for a solver.

The provided contracts must be called by the creator of the bonding pools. Calls from other addresses will not be officially indexed and the allowlisting process for new solvers at CoW Protocol cannot happen without a proper vouching. In case of conflicting vouching votes (e.g. two bonding pools vouch for the same solver with different COW reward targets), the first vouch will be seen as the valid one and the second vouch will be disregarded. Only updates of currently valid vouches from a bonding pool (e.g. for changing the cowRewardTarget) will be considered. Same rules holds true for the invalidation of vouches: If a solver is invalidated by a bonding pool, although the solver is currently not actively vouched by this bonding pool, the message will be disregarded.

There are 2 contracts included here, the VouchRegister and its variant named SolanaVouchRegister. The former is meant to be the default EVM-compatible contract that is deployed on every EVM-chain CoW Protocol is active. The latter is Solana-specific, and is meant to only be deployed on Ethereum Mainnet (as bonding pools live on Ethereum mainnet) and is used only for vouching for Solana solvers.

Setting up the project

yarn install
yarn build

Deployment

The VouchRegister contract can be deployed on sepolia-chain by running:

export PK='your PK'
export NODE_URL='your rpc endpoint'
export GAS_PRICE_GWEI=10
yarn deploy --network sepolia --tags VouchRegister

Regardless of chain and deployer, this should create the contract using CREATE2 at 0xAAA4De096D02AE21729aA31D967E148D4e3Ae501.

Note: The Ethereum mainnet VouchRegister contract is deployed at 0xb422f2520b0b7FD86f7DA61b32Cc631A59ed7E8F, while it is deployed at 0xAAA4De096D02AE21729aA31D967E148D4e3Ae501 on all relevant (for CoW Protocol) L2s.

Similarly, the SolanaVouchRegister contract can be deployed on sepolia-chain by running

export PK='your PK'
export NODE_URL='your rpc endpoint'
export GAS_PRICE_GWEI=10
yarn deploy --network sepolia --tags SolanaVouchRegister

Regardless of chain and deployer, this should create the contract using CREATE2 at 0x9A8a2850B2A9bEd7aBb81d514Df64595CCE9dCB5.

Verifying on Etherscan:

export ETHERSCAN_API_KEY=<your etherscan api key>
yarn hardhat verify --network <your_network> 0xAAA4De096D02AE21729aA31D967E148D4e3Ae501

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages