MetaMask / MetaMask/delegation-framework

ExactCalldataBatchEnforcer should pin terms target and value

Open
#198 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Solidity
Stars
226
Forks
118
Avg merge
1h 51m
Merged PRs (30d)
1

Description

## Summary

`ExactCalldataBatchEnforcer` terms are encoded as `Execution[]` (target, value, calldata), but `beforeHook` only compares calldata. A redeemer can reuse the same calldata against a different `target` (or attach native `value`).

Sibling enforcer `ExactExecutionBatchEnforcer` already pins the full execution. Single-call `ExactCalldataEnforcer` correctly treats terms as raw calldata only; the batch variant's terms ABI implies the fuller check.

## Proposal

In the batch loop, also require `target` and `value` equality with the terms executions (fail closed), plus regression tests for target-swap and non-zero value.

Happy to open a PR against `main`.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating ExactCalldataBatchEnforcer and its beforeHook, then compare its batch-checking logic with ExactExecutionBatchEnforcer and the terms ABI described in the issue. Add regression coverage for swapping a target and for attaching a non-zero value, and run the existing Solidity test suite to confirm both cases fail closed.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.