You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow a 3rd party to invoke Staking contract operations on behalf of makers. E.g. add function executeTransaction(LibZeroExTransaction.ZeroExTransaction memory transaction, bytes memory signature) to the staking contract.
Motivation
To achieve frictionless on-boarding, it is unreasonable to assume makers will have Ether in their wallets. Argent wallet is a good example of this, they use meta transactions so users can onboard and start accessing DeFI functions in a few clicks, without any Ether. Today, the exchange contract supports that with executeTransactions and batchExecuteTransactions, however the staking contract does not have such ability, resulting in makers who reply on meta-transaction capabilities unable to join the staking pool.
Specification
Similar to the Exchange contract, the Staking contract logic should be based on the currentContext instead of msg.sender.
The Staking contract should expose
function executeTransaction(
LibZeroExTransaction.ZeroExTransaction memory transaction,
bytes memory signature
)
and
function batchExecuteTransactions(
LibZeroExTransaction.ZeroExTransaction[] memory transactions,
bytes[] memory signatures
)
which would set the currentContext to the signer that produced the signatures, then invoke corresponding Staking functions as specified in LibZeroExTransaction.ZeroExTransaction
Rationale (if a suggestion is proposed)
LibZeroExTransaction.ZeroExTransaction can be re-used. Given the Exchange contract has the same interface, it would be straightforward for developers to adapt the same code to invoke meta transactions on the Staking contract.
The text was updated successfully, but these errors were encountered:
Hey @matYang we've applied the new standard tagging to this ZEIP (see here).
The proposal makes sense - 0x Core Team does not have the bandwidth to work on this right now. Is this something you would consider pushing forward, or do you need another team to work on it?
Summary
Allow a 3rd party to invoke Staking contract operations on behalf of makers. E.g. add function
executeTransaction(LibZeroExTransaction.ZeroExTransaction memory transaction, bytes memory signature)
to the staking contract.Motivation
To achieve frictionless on-boarding, it is unreasonable to assume makers will have Ether in their wallets. Argent wallet is a good example of this, they use meta transactions so users can onboard and start accessing DeFI functions in a few clicks, without any Ether. Today, the exchange contract supports that with
executeTransactions
andbatchExecuteTransactions
, however the staking contract does not have such ability, resulting in makers who reply on meta-transaction capabilities unable to join the staking pool.Specification
Similar to the Exchange contract, the Staking contract logic should be based on the
currentContext
instead ofmsg.sender
.The Staking contract should expose
and
which would set the currentContext to the signer that produced the signatures, then invoke corresponding Staking functions as specified in
LibZeroExTransaction.ZeroExTransaction
Rationale (if a suggestion is proposed)
LibZeroExTransaction.ZeroExTransaction
can be re-used. Given the Exchange contract has the same interface, it would be straightforward for developers to adapt the same code to invoke meta transactions on the Staking contract.The text was updated successfully, but these errors were encountered: