serai-dex / serai

Other
265 stars 49 forks source link

Ethereum Router - Out #49

Closed kayabaNerve closed 7 months ago

kayabaNerve commented 2 years ago

Thanks to @noot, we now have a Ethereum Schnorr contract. Our final contract still needs two features:

This issue is specifically for the latter, with a follow up issue being for the former.

By taking in a series of address, calldata pairs, we can execute an arbitrary list of transactions. We can only check a single signature for all transactions if either:

I assume the last one will be cheapest, yet wanted to note the ideas I had so we can ensure this has minimal costs.

Due to using a Schnorr signature, someone must also publish this transaction. Accordingly, they should either: A) Get a refund for doing so, from the contract. This would have the Schnorr signature also specify a gas price, verifying it's the one actually used by gasprice. This would create a leaderless scenario. B) This can be left out-of-contract to some sort of DAO, yet I'd like for it to be in the protocol (under A).

kayabaNerve commented 2 years ago

This should be implemented by #92 except for the gas functionality, which we can kick to a new issue. I'd also appreciate closing this to make way for a new tracking issue with individual tasks as smaller issues.