Skip to content

Instantly share code, notes, and snippets.

@koeppelmann
Last active June 11, 2026 06:11
Show Gist options
  • Select an option

  • Save koeppelmann/d9ab90b90aa53d3eb76f031bd8c12ffb to your computer and use it in GitHub Desktop.

Select an option

Save koeppelmann/d9ab90b90aa53d3eb76f031bd8c12ffb to your computer and use it in GitHub Desktop.
Whitelist CoW leverage wrappers on Gnosis staging (Safe Transaction Builder batch)
{
"version": "1.0",
"chainId": "100",
"createdAt": 1781196000000,
"meta": {
"name": "Whitelist CoW leverage wrappers + solver EOA (staging) via proxy-admin",
"description": "setManager(self) -> addSolver(CoWSafeWrapper) -> addSolver(CowFlashLoanWrapper v6) -> addSolver(solver EOA) -> setManager(restore original 4/12 manager). Run from the proxy-admin Safe (2/6).",
"txBuilderVersion": "1.18.0",
"createdFromSafeAddress": "0x68185584ccb166806f7ed69996380f50ac06035b",
"createdFromOwnerAddress": "",
"checksum": "0xb1738c22b168af4922f59f098ff66d2fee6d6c501e5610b2fed78741005477f5"
},
"transactions": [
{
"to": "0x02073540567FA1EABcBf74C2F7E6F9029ca7d800",
"value": "0",
"data": null,
"contractMethod": {
"inputs": [
{
"internalType": "address",
"name": "manager_",
"type": "address"
}
],
"name": "setManager",
"payable": false
},
"contractInputsValues": {
"manager_": "0x68185584ccb166806f7ed69996380f50ac06035b"
}
},
{
"to": "0x02073540567FA1EABcBf74C2F7E6F9029ca7d800",
"value": "0",
"data": null,
"contractMethod": {
"inputs": [
{
"internalType": "address",
"name": "solver",
"type": "address"
}
],
"name": "addSolver",
"payable": false
},
"contractInputsValues": {
"solver": "0x531636e6e18F3A52c283aCCda39D7185E4597A37"
}
},
{
"to": "0x02073540567FA1EABcBf74C2F7E6F9029ca7d800",
"value": "0",
"data": null,
"contractMethod": {
"inputs": [
{
"internalType": "address",
"name": "solver",
"type": "address"
}
],
"name": "addSolver",
"payable": false
},
"contractInputsValues": {
"solver": "0x2E3fdEe28D7224ED140B4ea08C57F47546679363"
}
},
{
"to": "0x02073540567FA1EABcBf74C2F7E6F9029ca7d800",
"value": "0",
"data": null,
"contractMethod": {
"inputs": [
{
"internalType": "address",
"name": "solver",
"type": "address"
}
],
"name": "addSolver",
"payable": false
},
"contractInputsValues": {
"solver": "0xFa5d3f85da8395D4562D18422cB27e032a676Af1"
}
},
{
"to": "0x02073540567FA1EABcBf74C2F7E6F9029ca7d800",
"value": "0",
"data": null,
"contractMethod": {
"inputs": [
{
"internalType": "address",
"name": "manager_",
"type": "address"
}
],
"name": "setManager",
"payable": false
},
"contractInputsValues": {
"manager_": "0xA03be496e67Ec29bC62F01a428683D7F9c204930"
}
}
]
}

Whitelist CoW leverage wrappers + solver EOA on Gnosis staging (via proxy-admin Safe)

Update 2026-06-11: the batch now adds a third solver entry — the fresh solver EOA 0xFa5d3f85da8395D4562D18422cB27e032a676Af1 that will actually call wrappedSettle. The wrappers alone are not enough: the authenticator must also allow the calling address. The JSON also now ships data: null so the Tx Builder decodes each call into readable setManager/addSolver entries.

Adds three addresses as solvers on the staging CoW authenticator GPv2AllowListAuthentication 0x02073540567FA1EABcBf74C2F7E6F9029ca7d800 (Gnosis Chain, id 100):

What Address Sourcify
CoWSafeWrapper (enforced Safe meta-orders) 0x531636e6e18F3A52c283aCCda39D7185E4597A37 verified
CowFlashLoanWrapper v6 (Aave flash layer, trampoline + OZ SafeERC20) 0x2E3fdEe28D7224ED140B4ea08C57F47546679363 verified
Solver EOA (calls wrappedSettle) 0xFa5d3f85da8395D4562D18422cB27e032a676Af1 — (fresh EOA)

Source: https://github.com/koeppelmann/cowswap_wrapper

Why this routing

addSolver is onlyManager (the 4-of-12 manager Safe 0xA03be496…4930). The proxy-admin Safe 0x68185584ccb166806f7ed69996380f50ac06035b (2-of-6) is the EIP-1967 owner of the authenticator proxy, so it may call setManager (onlyManagerOrOwner). It therefore has strictly more authority than the manager and can grant the solvers itself with only 2 signatures, by briefly making itself manager and restoring the original manager in the same atomic batch.

What the batch does (5 calls, all to the authenticator)

  1. setManager(0x68185584…035b) — admin Safe temporarily becomes manager
  2. addSolver(0x531636e6…7A37) — CoWSafeWrapper
  3. addSolver(0x2E3fdEe2…9363) — CowFlashLoanWrapper v6
  4. addSolver(0xFa5d3f85…6Af1) — solver EOA (calls wrappedSettle)
  5. setManager(0xA03be496…4930) — restore the original 4-of-12 manager

Net change: only the three new solver entries. Manager is restored to exactly the original Safe. Atomic — any revert rolls back the whole thing, so the admin is never left as manager.

How to run

  1. Open the Transaction Builder app in the Safe UI for the proxy-admin Safe 0x68185584ccb166806f7ed69996380f50ac06035b on Gnosis Chain.
  2. Import whitelist-wrappers.json (drag-and-drop). It batches the 5 calls into one MultiSend (delegatecall) transaction.
  3. Review (the 5 decoded calls above), then collect 2/6 signatures and execute.

Builder checksum: 0xb1738c22b168af4922f59f098ff66d2fee6d6c501e5610b2fed78741005477f5

Verification

A live staging solver's own (currently-reverting) settlement, replayed with only the two wrapper whitelist entries added as state overrides, fills a real leverage order: https://www.tdly.co/shared/simulation/057060b9-ceb7-495c-aa9c-745afce0fa8b

NOTE: this supersedes the queued manager-Safe proposal (nonce 201), which named the old flash wrapper 0x7aC55b24…785d and includes no solver EOA. Use this batch instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment