[Prototype] AragonApp: signed calls and multi call execution (aka meta-txs support) #442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Super early prototype of how we could add a way to execute signed calls in a contract inheriting
AragonApp
. Signed calls allow the entity performing an action doing so without ever having to own any ETH to pay for transaction fees, by having a relayer submit their signed calls on-chain. There seems to be some momentum around the EIP1077 standard, which could be interesting to support, as a standard interface could help create a ecosystem of relayer services.By putting this in the
AragonApp
contract, any Aragon app would automatically benefit from this functionality. There is native support for ACL checks, but apps willing to use this for custom logic (e.g. Voting) should useAragonApp.sender()
instead ofmsg.sender
.It uses volatile storage,
AragonApp
will write to a storage slot who the actual sender of the call is before calling itself with that calldata. After the sub-call ends executing, that storage slot is emptied. This would be quite expensive to do right now, but the new net gas metering in Constantinople this is quite cheap to do.Got down this rabbit-hole after having a discussing with @bingen about whether it would make sense to add
multicall
to the Staking app, and his proposal to add it directly toAragonApp
.The current implementation doesn't allow to perform multiple calls from sender as in
multicall
, but it could be implemented by accepting empty signatures as calls executed by their sender.