You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Configure Solver7702Delegate and ERC-7702 auxiliary accounts for parallel settlement submission.
4
+
keywords:
5
+
- Solver7702Delegate
6
+
- solver 7702 delegate
7
+
- ERC-7702
8
+
- EIP-7702
9
+
- parallel settlement submission
3
10
---
4
11
5
-
# Using Solver7702Delegate for parallel settlement submission
12
+
# Parallel Settlement Submission
6
13
7
-
`Solver7702Delegate` lets a solver keep its existing allowlisted solver EOA while using auxiliary EOAs as extra submission nonce lanes.
14
+
`Solver7702Delegate` lets a solver keep its existing allowlisted EOA and use auxiliary EOAs as additional nonce lanes for settlement submission.
8
15
9
-
This is strongly recommended for solvers that expect real volume. With one EOA, a pending settlement can block every later settlement behind the same nonce lane. With `Solver7702Delegate`, auxiliary EOAs can submit in parallel, while `GPv2Settlement` still sees the solver EOA as `msg.sender`.
16
+
Solvers expecting production volume should set this up early. With one EOA, a pending transaction can block every settlement behind it. Auxiliary EOAs can submit in parallel, while `GPv2Settlement` still sees the solver EOA as `msg.sender`.
10
17
11
18
## Reference driver setup
12
19
13
-
If you use the reference driver, add `submission-accounts` to the solver entry in your driver config. This is the main setup path for most solvers.
20
+
If you use the reference driver, add `submission-accounts` to the solver entry in your driver config. This is all most solvers need to configure.
14
21
15
22
```toml
16
23
[[solver]]
17
24
name = "my-solver"
18
25
endpoint = "https://solver.example"
19
26
account = "<solver-private-key-or-signer-config>"
20
-
max-solutions-to-propose = 6# solver EOA + N auxiliary EOAs
The solver `account` must be able to sign the ERC-7702 authorization. Each `submission-accounts` entry must also be signer with a private key, not just an address.
37
+
The solver `account` must be able to sign the ERC-7702 authorization. Each `submission-accounts` entry must also include signing credentials, not only an address.
31
38
32
-
Fund each auxiliary EOA with native token for gas, as they will be used to submit transactions separately from the solver EOA.
39
+
Fund each auxiliary EOA with the chain's native token so it can pay gas.
33
40
34
-
When `submission-accounts` is configured, the reference driver:
35
-
36
-
- sets up `Solver7702Delegate` during startup when the required signers are available;
37
-
- uses the auxiliary accounts as extra settlement nonce lanes, when solver EOA is busy;
38
-
- reuses the expected delegate deployment when the same code is already present;
39
-
- refuses to start with `max-solutions-to-propose > 1` unless submission accounts are configured.
41
+
At startup, the reference driver deploys `Solver7702Delegate` at the expected CREATE2 address, or reuses the existing deployment at that address. When the solver EOA is busy, it uses the auxiliary accounts to submit settlements through separate nonce lanes.
40
42
41
43
## What changes when submitting
42
44
43
-
Direct submission should still be used when the solver EOA is free. Delegated submission is useful when the solver EOA already has a pending transaction and another settlement should be submitted without waiting for that nonce.
45
+
When the solver EOA is free, it submits directly to `GPv2Settlement`. If it already has a pending transaction, an auxiliary EOA can submit to the solver EOA instead. The solver EOA runs `Solver7702Delegate`, which forwards the call to `GPv2Settlement`.
Inside the delegate, `msg.sender` is the auxiliary EOA and `address(this)` is the solver EOA. Inside `GPv2Settlement`, `msg.sender` is still the solver EOA.
67
-
68
68
The calldata format is packed on purpose. Use `abi.encodePacked(bytes20(target), targetCalldata)`. Do not use `abi.encode(target, targetCalldata)`.
69
69
70
70
## Verification
71
71
72
-
Before using delegated submission, verify both pieces:
73
-
74
-
1. The solver EOA delegates to the expected delegate.
75
-
2. The delegate bytecode matches the expected approved caller set.
76
-
77
-
Check the solver EOA code:
72
+
First, check that the solver EOA points to the expected delegate:
78
73
79
74
```shell
80
75
cast code <solver_eoa> --rpc-url <rpc_url>
81
76
```
82
77
83
-
For ERC-7702, delegated account code has this shape:
78
+
For ERC-7702, the code has this form:
84
79
85
80
```text
86
-
0xef0100 || delegateAddress
87
-
```
88
-
89
-
The delegate bytecode check matters because approved callers are immutable constructor values. Do not only check that the delegate address has code.
90
-
91
-
## Manual cast commands
92
-
93
-
Most solvers should use the reference driver setup above. Use these commands only if you are setting up delegation manually and/or building a custom driver.
94
-
95
-
**To authorize a delegate when the solver EOA sends its own authorization transaction, sign with `--self-broadcast`**:
**If a different funded account sends either transaction, do not use `--self-broadcast` when signing.** The solver EOA signs the authorization, but the funded account pays gas and submits the transaction:
If you do not use the reference driver, your driver must:
145
-
146
-
- deploy `Solver7702Delegate` for the approved auxiliary caller set;
147
-
- have the solver EOA delegate to the deployed `Solver7702Delegate`;
148
-
- route delegated settlement transactions with `from = auxiliary EOA` and `to = solver EOA` (if solver EOA is busy);
149
-
- encode delegated calldata as `bytes20(target) || targetCalldata`.
150
-
151
-
## Capabilities and limits
152
-
153
-
- Version 1 supports up to five immutable approved caller slots.
154
-
- Approved auxiliary EOAs are trusted hot keys. They can trigger arbitrary calls as the solver EOA.
155
-
- Changing authorized auxiliary accounts requires redeploying the delegate and re-delegating the solver EOA.
156
-
- The delegate can call arbitrary targets. The driver should normally use `GPv2Settlement` for settlement submissions.
157
-
- Use this only on chains and infrastructure that support ERC-7702 transaction authorization handling.
84
+
On a block explorer, the solver EOA may not have a normal contract code view. Confirm that its **Delegated to** banner points to the expected address, then open that address and verify its source as `Solver7702Delegate`.
158
85
159
-
Keep solver EOA funds and approvals minimal, do not share auxiliary EOAs across solvers, and rotate callers immediately if an auxiliary key is compromised.
86
+
See the README's [verification steps](https://github.com/cowprotocol/solver-7702-delegate#verify-delegation) for details.
160
87
161
88
## More details
162
89
163
-
For exact manual deployment, authorization, revocation, bytecode verification, and operational procedures, use the [`Solver7702Delegate` README](https://github.com/cowprotocol/solver-7702-delegate).
90
+
For manual deployment, authorization, revocation, verification, and operational details, use the [`Solver7702Delegate` README](https://github.com/cowprotocol/solver-7702-delegate#usage).
0 commit comments