Defender Relay gas optimisations for send_useroperation

We're currently using Defender Relay to process and execute transactions on behalf of our users. We plan to replace this with a combination of MPC and ERC-4337 smart wallets in order to achieve a frictionless UX and move away from the custodial nature of our system.

In our current situation we benefit from Defenders automated gas optimisations. Our new design does not include this benefit as I assumed we will not be able to process send_useroperation requests through the relayer.

Is this assumption correct and if so, does anyone know an alternative solution for this problem?

Some more technical details might be useful here.
For example, what is the specific gas-optimization code which exists in the current solution but you are unable to port to the new solution?

Thanks for your reply, but it's not the code we work with that I have questions about! It is about the OpenZeppelin Defender product suite which contains Relay as a solution for improved transaction processing.

This is the specific feature I'm talking about:

My question is if there is a way to use Relay in order to queue and process eth_sendUseroperation requests (instead of eth_sendTransaction and/or eth_sendRawTransaction) as proposed per ERC-4337 and implemented by various Relay supported networks.

Hi @Peter_Polman

We do support arbitrary network calls using a relayer; this is documented here. Is this something you have tried already?

1 Like

Didn't try it but seems relevant, thanks! Will post back when I have results.