Minimal Forwarder production use

The announcement regarding the MinimalForwarder states that:

The new version is a more modular system and requires a lot less code. The core is in ERC2771Context 1, while MinimalForwarder is a utility contract that can assist during testing of a GSNv2-based system.

Does that mean the MinimalForwarder isnt for use in production? It contains an import from a file named `draft-EIP712.sol.

Also, is the MinimalForwarder deployed on mainnet/popular testnets?

I am not sure for this, but I think maybe not. No matter which kind of code you use, you should really know what does the code do.

Mainnet? I am not sure about this, many teams use the contracts from OpenZeppelin, but OpenZeppelin really do not know who has used contracts.

@Skyge Thanks for the response.

I understand what the code does - it appends the signer address to call data before forwarding a call to a contract that inherits from ERC2771Context. My question is whether this contract has been audited and is considered safe by OpenZepplin. The comment mentions it is for use in testing, implying that it shouldn’t be used in production, but not clearly stating that. Honestly I’d rather use this MinimalForwarder in production as it’s simpler than the GSN one and I dont require the added typehash registration functionality available there. I would also guess that the MinimalForwarder is cheaper from a gas point of view as it doesn’t make two additional SLOADs per call.

The reasons I ask about whether the MinimalForwarder has been deployed is because these kinds of forwarders are designed to be singletons. More than one per network is not required. Indeed as mentioned by the MinimalForwarder author @Amxx here it is preferable that a single forwarder address is converged upon, although I don’t think the reasons apply for my particular use case.

2 Likes

I'm wondering the same thing. Is it correct that we shouldn't use this for production? If not, what should we use?

It is not intended to go into production as is, as its name indicates, it has just the minimal requirements for a forwarder and was meant to be used in testing. A fully functioning forwarding system with good properties requires more complexity than the contract offers. That's why we suggest looking at production implementations, like the GSN project one, if that is too complex for your needs you could inherit from the minimalForwarder contract and create a more custom but robust version.