Open mfw78 opened 7 months ago
This could also be implemented as a separate trade handling logic implementation (cf. https://github.com/cowprotocol/research/issues/3#issuecomment-2178816637) but might be important enough to make it part of the default order type.
In particular this would be needed to allow TWAP and StopLoss orders for EOA without massive account abstraction implementation overhead (as EOA could simply defer signature to TWAP/StopLoss ERC1271 implementations).
Problem
Only the
owner
of the order can sign for the order - this creates the limitation that all smart orders MUST belong to a smart contract (supportingERC-1271
).Acceptance criteria
ERC-1271
smart contract wallets, EOAs, etc).Details
Signing schemes supported currently include:
eth_sign
eip712
(i.e.eth_signTypedData_v4
)preSign
(i.e.GPv2Settlement.setPreSignature
)eip1271
All of these signing schemes must be called by, or initiated by the
owner
of the order.Possible Solutions
delegateEip1271
as a signing scheme, which allows for an smart contract supporting a constrained version ofERC-1271
to sign on-behalf of the user. Security wise, could allow a user to specify if the order asserts thereceiver
is equal to the order'sowner
.eip1271
and take custody of user's funds, similar in style to Eth-Flow.Research track