# mErc20Host: It is not possible to permissionlessly call "external" endpoints when source chain is Eth mainnet, because l1Inclusion flag cannot be set to true

mErc20Host requires l1Inclusion=true for permissionless proofs, but the ZK coprocessor panics on ETH mainnet, blocking permissionless external actions.

- Payout: Audit contest
- Severity: medium
- Program: Malda
- Found by: LeFy
- Disclosed: 2025-07-22
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2025-07-malda-judging/issues/264
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-07-malda%3AM-8
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:rust tech:solidity technique:source-review vuln:access-control vuln:dos

**Target:** mErc20Host proof verification and malda-zk-coprocessor viewcalls
**Root cause:** _verifyProof requires L1Inclusion=true for non-sequencer callers, but get_env_input_for_l1_inclusion_and_l2_block_number panics for ETH mainnet since only OP-stack/Linea chains are handled.
**Steps:**
1. Call an external endpoint on mErc20Host as a non-sequencer with a proof whose journal has L1Inclusion=true and chainId=ETH mainnet.
2. _verifyProof passes the L1Inclusion check.
3. Coprocessor calls get_env_input_for_l1_inclusion_and_l2_block_number with l1_inclusion=true.
4. Chain is neither opstack nor linea, so `panic!("L1 Inclusion only supported for Optimism, Base, Linea...")` triggers.
5. Proof generation fails; permissionless external action impossible.
**How found:** Code reading of _verifyProof's L1Inclusion requirement against the Rust viewcalls handler, noticing the else-branch panic for non-OP/non-Linea chains including ETH mainnet.
**Insight:** When a contract enforces a flag that a separate off-chain prover must honor, check the prover's chain-dispatch branches for unsupported chains that panic instead of returning a default.

