-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERC2771Forwarder: consider not enforcing trustedForwarder #5375
Comments
Hello @sakulstra and thank you for raising that issue. The ERC2771Forwarder is probably not going to be developped any further: ERC-7702, which should be live soon will provide a good alternative to ERC-2771 meta transaction. This will allow us to remove the cumbersome We cannot do that now, as it would be a breaking change, but we will do that in the next major release (v6.0) In the meantime, we are commited to not doing any breaking change. Changing the validation/trust of the forwarder would be a breaking change as far as security/behavior goes. If we wanted to ship that, we would probably wait until 6.0 ... but again we will lieklly remove the Forwarder entierly in 6.0 @ernestognw WDYT ? |
With Account Abstraction and especially EIP-7702 it's likely that Context won't be relevant anymore. For now, I agree that we must keep backwards compatibility until 6.0 (we don't have plans for it yet). In regards to ERC2771Forwarder, we can make the We initially didn't do this because it's technically a footgun if a user approves the forwarder to spend tokens, but if I understand correctly, the use case is to relay a |
@ernestognw yes exactly. The scenario is that i have a token |
🧐 Motivation
When relaying transactions, you often end up in a situation where you need to relay a token
permit
in addition to some additional transaction(s). While the additional transaction(s) can be forwarded viaERC2771Forwarder
- considering the target contract implementsERC2771Context
- the permit can not because thetoken
is not "trusting" this forwarder.However, not trusting the forwarder is not a problem as the permit does not rely on altering the context.
For any flow that requires an approval in order to forward the rest of a transaction batch this would be very useful.
📝 Details
As far as i can tell the
Forwarder
itself is not part of the Spec, so i think it's worth considering to remove theisTrustedForwarder
check as I don't actually see any downside of not having it - worst case the txn would revert. This is in line with how the previousMinimalForwarder
worked.edit: I see this was changed in #4502 (comment) specifically to prevent accidents caused by approving the forwarder, but the fix as lined out above, can actually cause problems.
The text was updated successfully, but these errors were encountered: