The NativeMetaTransaction
contract is missing the critical _msgSender()
function, which is essential for meta-transaction functionality. Without this implementation, the contract cannot properly handle meta-transactions despite having the execution logic in place. This means the entire meta-transaction feature will not work as intended, as there's no way to properly recover the original sender's address during the execution of functions.
The NativeMetaTransaction
contract implements the meta-transaction execution logic including signature verification and nonce management, but omits the crucial _msgSender()
function. The contract's executeMetaTransaction
function appends the user's address to the function call data:
However, without a corresponding _msgSender()
implementation in NativeMetaTransaction
, there's no way to extract this appended address during the actual function execution. This missing piece breaks the connection between meta-transaction execution and sender recovery.
The absence of _msgSender()
in NativeMetaTransaction
breaks the meta-transaction functionality. Consider this real-world scenario:
The root cause is simple but severe - when executeMetaTransaction
appends the user's address:
There's no corresponding _msgSender()
implementation to extract this address. This means:
Meta-transactions will fail for all role-protected functions
Users can't use gasless transactions even with valid permissions
The entire meta-transaction infrastructure becomes non-functional
Add to NativeMetaTransaction
:
After fix, the scenario works:
This fix enables the intended gasless transaction functionality for users while maintaining proper role-based access control.
This matches the implementation currently in OWPIdentity
and:
Recovers the original sender's address when the contract calls itself (meta-transaction case)
Returns the regular msg.sender for direct calls
Works in conjunction with the existing executeMetaTransaction
function which appends the user's address to the calldata
The current implementation in OWPIdentity
was implementing what should have been in the base contract. The fix is to move _msgSender() OWPIdentity implementation to NativeMetaTransaction
where it belongs, and then have OWPIdentity
either remove its implementation or properly override it.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.