https://github.com/cowprotocol/solver-trampoline
Permissionless CoW Protocol Settlement Execution
https://github.com/cowprotocol/solver-trampoline
Last synced: about 1 year ago
JSON representation
Permissionless CoW Protocol Settlement Execution
- Host: GitHub
- URL: https://github.com/cowprotocol/solver-trampoline
- Owner: cowprotocol
- Created: 2022-12-05T18:16:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-01T14:59:29.000Z (over 3 years ago)
- Last Synced: 2025-02-05T08:18:28.207Z (over 1 year ago)
- Language: TypeScript
- Size: 385 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Audit: audits/SolverTrampolineJan2023.pdf
Awesome Lists containing this project
README
# Solver Trampoline
The `SolverTrampoline` contract is a thin settlement wrapper contract that
executes settlements authenticated by signature instead of `msg.sender`. This
allows for permission-less settlement transaction execution whereby a solver
signs settlement calldata, but any account can execute it.
In particular, this is useful for executing settlement with transaction relay
networks (such as the Gelato relay network and Infura ITX) without any
additional trust assumptions about the transaction executor.
## Transaction Flow
```mermaid
sequenceDiagram
participant Relayer
participant SolverTrampoline
participant GPv2Settlement
participant GPv2Authentication
Relayer->>+SolverTrampoline: settle(calldata, signature)
SolverTrampoline->>SolverTrampoline: ecrecover(calldata, signature)
SolverTrampoline->>+GPv2Authentication: isSolver(recoveredSigner)
GPv2Authentication-->>-SolverTrampoline: true/false
opt not a signer
SolverTrampoline-->>Relayer: revert()
end
SolverTrampoline->>+GPv2Settlement: settle(calldata)
GPv2Settlement->>+GPv2Authentication: isSolver(SolverTrampoline)
GPv2Authentication-->>-GPv2Settlement: true
GPv2Settlement->>GPv2Settlement: settlement execution
GPv2Settlement-->>-SolverTrampoline: result
SolverTrampoline-->>-Relayer: result
```