Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Allow variable signature length #9

Open
fleupold opened this issue Feb 28, 2023 · 1 comment
Open

Allow variable signature length #9

fleupold opened this issue Feb 28, 2023 · 1 comment

Comments

@fleupold
Copy link

I really like the changes that were made compared to the framework in https://github.com/cowprotocol/conditional-smart-orders as they allow more effective creation of smart orders and also make it easier to leave the Safe functional!

One decision I find difficult however, for general purpose smart orders is to require fixed length signatures. There are definitely use cases (e.g. dynamic price checkers for milkman style orders) where the same order type may have different lengths signatures.

Maybe we can define a magic value that indicates "arbitrary length" to avoid failing this check:

if (_signature.length == CONDITIONAL_ORDER_BYTES_LENGTH() && verifyTrade(_dataHash, _signature)) {

@mfw78
Copy link
Contributor

mfw78 commented Feb 28, 2023

Yes, I certainly agree the fixed length isn't optimal, and that's why for the next phase I was very much looking at the magic value approach, and generalising this for Safe.

Refer to https://github.com/rndlabs/safe-chained-eip1271

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants