Grant Application: Extensible Fallback Handler for Safe (Retrospective)
- GitHub: mfw78 (mfw78) · GitHub (see also rndlabs · GitHub).
- Gitcoin: https://gitcoin.co/mfw78
- Mirror: mfw78.eth
- Experience in technical systems analysis, design and implementation with a strong emphasis on risk management / gap analysis.
- Experienced technical writer in mission-critical, highly regulated, and technical industries.
- Actively independently developing with emerging decentralised technologies, including Swarm and Waku.
ExtensibleFallbackHandler- An extensible fallback handler for
composable-cow- composable stateless conditional orders.
- safe-cow - implementing EIP-1271 signature aggregation for Safe trading on CoW Protocol API.
- cowswap-twap-orders - implementing TWAP orders for Safe trading via CoW Protocol API.
Grant category: Protocol Order Flow / Developer Tools
Problem: The grant Composable Conditional Orders works best when the friction with using
Safe is minimised as much as possible. Having a custom fallback handler without alignment of upstream (
Safe team) is likely to present insurmountable barriers to adoption from risk-adverse
Solution: The CoW Protocol team approached me in the course of development of the Composable Conditional Orders to work together with CoW Protocol team and
Safe developers to define an extensible fallback handler standard that can be used by developers when building on top of
The solution presented maintains strong
Safe security guarantees and vendor buy-in by upstream (
Safe). As such, the original Composable Conditional Orders grant was expanded significantly in scope to effectively break-out the fallback handler component into a separate implementation, known as
ExtensibleFallbackHandler. This fallback handler allows a
- Define a custom method handler for any non-standard method (eg. turn a
- Define a custom EIP-712 domain verifier, whereby a contract implementing
ISafeSignatureVerifieris able to sign for a nominated EIP-712 domain on behalf of a
Safe(it is this interface that
- Define a set of methods (
interfaceId) that a
Safesupports, and report such using ERC165.
The architecture for the
ExtensibleFallbackHandler can be viewed here.
Grant Goals and impact
- Make CoW Protocol a first class citizen in
Safe, providing first-to-market support for
- Foster stronger ties across the Gnosis Ecosystem.
- Define the interfaces to be used (
ExtensibleFallbackHandlerand inherited abstract contracts COMPLETED.
- Testing of new contracts using the existing
Safetest harnesses COMPLETED.
- 4 weeks FTE. (COMPLETED)
Note 1: Full-Time Equivalent (FTE) corresponds to 40 hrs / week
Note 2: The above timelines do not make for allowances / timing associated with audit completion.
Payment terms: Half paid on a successful vote by the Grants Committee, with the remainder paid upon satisfactory completion of code audit by an auditor nominated by CoW Protocol team.
- $10k: development / labor cost
This budget does not include any costs associated with audit by a 3rd party. It is expected that CoW would undertake the necessary steps / cost for audit. Any cost overruns associated with meeting the standards of an external audit (additional testing / code fixes) would be paid out of the development cost.
Gnosis Chain Address (to receive the grant):
- This grant is applied for on the basis of retrospective recognition of additional scope to the grant Composable Conditional Orders. It is highlighted that this increased scope was at the request of the CoW Protocol team, and not initiated by the developer.
- As an active member of the CowDAO Grants Committee, I hereby refrain from voting / signing on this proposal so as to eliminate conflicts of interest. In determining the timelines associated with this Grant, I have taken into consideration workloads due to my position as a Committee member, 3rd party work, and allowed appropriate buffer to ensure the Grant Committee’s continuance.
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