Grant Title
Grant Application - Methane: CoW Protocol as a Gas Relay
Author(s)
mfw78.eth
- GitHub: mfw78 (mfw78) · GitHub, Nullis Labs LLC · GitHub and Nexum · GitHub
- Discord: @mfw78
Experiences and Qualifications
- Former CoW Protocol Core Contributor (Aug 2023 - Oct 2024)
- Author: ComposableCoW, TWAP orders, watch-tower, Shepherd
Grant Description
Methane extends the SDKs wallets already use, alloy, viem and ethers, so wallet integrators can offer gasless execution through CoW Protocol without running a relayer.
- What: SDK extensions that relay any batch of calls through a CoW order, paid in the user’s own token.
- Proof: already working on mainnet, with no change to CoW’s contracts or services.
- Ask: €39,000 over four milestones, one delivered and three paid only on delivery, plus 50,000 COW vested for a year of maintenance.
Today, gasless execution means running relay infrastructure, or paying a paymaster vendor a surcharge on every transaction and keeping deposits topped up on every chain. With Methane, CoW’s solvers do the relaying: they compete to execute, and the fee comes out of the user’s own token.
What it enables:
- No relay infrastructure for wallets. No relayer fleet, paymaster, deposits, native float per chain or vendor contract. Users pay in the token they already hold: USDC, WETH, COW or any token CoW can price.
- Any action, as the user. Approvals, claims, deposits, transfers and wraps run from the user’s own address. Swaps can carry actions too, such as approving and trading in one signature.
Already working on mainnet. An account wrapped its entire ETH balance into WETH without sending a transaction, which a normal transaction cannot do, and paid the fee in WETH (order, settlement). Two solvers competed, and it settled 14 seconds after it was posted, for about 7 US cents of WETH. Details and code: nullislabs/methane.
What CoW gets, measurably:
- Flow through the auction. Every relay is a CoW order. More use of hooks and same-token orders, the capability the core team built “to effectively turn cow protocol into a transaction relayer” (services #3858).
- Relays pay for themselves. On the live order the solver’s fee was 1.7 times its gas cost. Each relay also pays a protocol fee, and since CIP-85 solver rewards are capped at half of it, so every settled relay leaves the DAO slightly ahead.
- A public dashboard. A Dune dashboard of Methane relays (appCode
methane): relays, accounts, fees and protocol fee, reported at Milestone 2c and at 6 and 12 months.
Builds on what exists. Methane uses cow-rs and the cow-sdk order book client rather than replacing them. bleu’s framework-agnostic adapters cover trading; Methane adds relaying calls. I would welcome a review from the solver team.
Milestones
| Milestone | Due | Effort (hours equivalent) | Payment |
|---|---|---|---|
| 1. Proof of mechanism | Delivered | 88 | €8,800 |
| 2a. Methane for alloy, and the command-line tool | Within 5 weeks of approval | 180 | €18,000 |
| 2b. Methane for viem, and the docs | Within 8 weeks of approval | 93 | €9,300 |
| 2c. Methane for ethers | Within 10 weeks of approval | 29 | €2,900 |
Milestone 1 (delivered, payable only if this grant is approved): the relayable EIP-7702 account, live on mainnet with verified source (Sourcify); reference examples; the mainnet relay above.
Milestones 2a to 2c:
- Extensions for alloy (Rust), viem and ethers (TypeScript): relay any batch of calls, or a swap carrying calls, paid in an ERC-20, with fees kept as low as solvers will accept. Each fits its library’s own idiom, so integrators add it to code they already have. The TypeScript extensions share one core, so ethers costs little once viem is done.
- Command-line tool and documentation: set up an account and relay from the terminal; docs on gasless execution through same-token orders, with guides and examples for each SDK.
All code and docs are built in our own repositories and forks. Nothing in this grant depends on publishing packages or on merges into any other project.
Maintenance and support: 50,000 COW, vested over the 12 months after Milestone 2c. It covers updates in our repositories and forks that keep the SDKs working with new alloy, viem, ethers and CoW versions, normally within two weeks of a breaking change; bug fixes; and replies to integrator issues within five business days.
Funding Request
€39,000 + 50,000 COW.
- Each milestone is paid on its approval; there is no upfront payment.
- Fixed prices at €100 per hour equivalent, the Shepherd rate.
- Each of Milestones 2a to 2c is paid 10% less if it is delivered more than four weeks late.
- No audit included.
Ethereum Mainnet Address (to receive the grant)
[TBC]
Other Information
- Track record. Shepherd was delivered late. This proposal is shaped by that: the first milestone is already delivered, the rest is split into three deliverables paid only on delivery, and lateness reduces the payment.
- As an active member of the CoW Grants Committee, I will vote Abstain on this proposal. My signature on the payments Safe is bound by the outcome of the vote: if the proposal passes, I will sign only the payments it approves, as and when each milestone is accepted; if it fails, there is nothing to sign.
- Limits:
- A small relayed action costs more than a direct transaction: the value is in not needing native gas, not in cheaper gas.
- Each account needs one setup transaction.
- It serves keys an app holds, not browser wallets.
- The account contracts are unaudited.
Terms and Conditions
By applying for this grant, I agree to be bound by the CowDAO Participation Agreement and the CowDAO Grant Terms and Conditions.