5afe / safe-core-protocol-specs

Safe{Core} Protocol is an open, modular framework to make smart accounts secure, portable, and composable.
GNU General Public License v3.0
67 stars 13 forks source link

[Protocol Specs] Document signature flow use cases #63

Open nlordell opened 10 months ago

nlordell commented 10 months ago

This issue is meant to document potential use cases for signature modules in the Safe Core Protocol

Extending Support for ERC-1271 Signatures

See https://github.com/safe-global/safe-core-protocol-specs/blob/main/modules/README.md#signature-validators.

An existing use case for this is the CoW Protocol Composable CoW framework, where specialised signature validator implementations are used to make custom and "programable" orders for CoW Protocol. It allows injecting additional logic into the isValidSignature check for a CoW Protocol order for additional on-chain guarantees (such as require(block.timestamp > START_TIME) to implement good-after-time orders).

Additional Signing Schemes

A commonly requested feature is to add support for additional signing schemes:

While this is currently mentioned in the spec, a possible implementation of this is not clearly defined ATM see #62.

User Operation Signature Support

Additional signing logic for ERC-4337 user operations. Specifically, it would be nice to allow similar behaviour to plugins applied to ERC-4337. That is, plugins currently get access to execute transactions on behalf of Safes that enable them, so some analogy should exist for 4337 user operations where custom validateUserOp logic could trigger a transaction execution from an account.

A potential implementation would have modules expose:

The proposed implementation would require these modules to be simultaneously installed as a plugin, a fallback handler and a signature validator, which isn't super clean.

mmv08 commented 10 months ago

An existing use case for this is the CoW Protocol Composable CoW framework, where specialised signature validator implementations are used to make

Is this sentence incomplete?

nlordell commented 10 months ago

Oops - fixed.