# Unbacked mint via replay or duplicate entry

Mint/credit paths accepting replayed proofs, aliased token addresses, or self-referential bridge messages

_Area: DeFi accounting and math bugs. Seen in 3 disclosed reports; 2 confirmed bounties: $50,000 and $1,000,000; latest 2025-02-20. Updated 2026-11-09._

## How it works
A mint or credit path trusts an input that is not unique or not bound to the real asset. The assumption that breaks: that a valid-looking proof, token address, or bridge message corresponds to exactly one real deposit. When two inputs alias the same underlying thing — a view call that also yields an execution proof [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md), two token addresses sharing one balance [E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md), a message whose source equals its destination [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md) — the contract credits value that was never locked, so supply outruns backing.

## Where it shows up
- Proof validation keyed on `executor_id` where read-only/view entrypoints also set that executor [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md)
- Deserialization of return bytes where only a fixed prefix (e.g. Borsh status) is constrained [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md)
- Balance tracking keyed by token address, with proxy/implementation or double entry-point tokens [E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md)
- Bridge handlers that whitelist destination chain/handler but never reject `from == to` [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)
- Lock-and-mint paths where the contract's own chain/address is in the supported set [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)
- Fee or surplus loops comparing post vs pre balance per address [E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md)

## How to review
For every mint/credit path, state the invariant: each unit minted is backed by exactly one locked unit, and each input maps to at most one credit. Check:
- Can two distinct inputs (addresses, messages, proofs) resolve to the same underlying balance or deposit? [E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md)[E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)
- Does every entrypoint that can produce a valid proof actually prove a state-changing action, not just a read? [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md)
- Are attacker-influenced bytes fully validated, not just a status prefix? [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md)
- Is `from == to` (same chain, same handler) explicitly rejected? [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)

## How finders spotted it
- Noticed both `call()` and `view()` set the Aurora contract as executor via `make_executor`, so any view execution yields a valid proof, and the return bytes are attacker-controllable [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md)
- Reasoned from `flashLoan` code that pre-balances are per token address; hypothesized listing both entry points of one token makes repayment look like surplus [E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md)
- Noticed the odd requirement that the handler's own chain/address be whitelisted, hypothesized a self-referential message passes, confirmed with a Foundry test [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)

## Variants seen
- Forged proof from a read-only path whose return data deserializes as a burn result [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md)
- Duplicate token entry causing repayment counted as excess fees [E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md)
- Self-referential bridge message re-minting just-locked tokens [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)

## Impact and severity
Drained 50,550 ETH from EthCustodian [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md); drained Vault balance to ProtocolFeesCollector and DoS'd swaps [E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md); inflated ckrBTC supply beyond BTC held in MuSig2 [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md). Impact scales with the custodied balance reachable by the mint path; combining with a read-only entrypoint or aliased address widened reach without needing a real deposit [E1](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md)[E2](https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md).

## Seen in real software
Open-source packages and projects, and products, where this pattern was found. If the target runs one, compare the version it runs with the fix.
- **Aurora** (view()) (version not stated): Aurora Withdrawal Logic Error Bugfix Review. Report: https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md

## Evidence
- E1: https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-aurora-withdrawal-logic-error-bugfix-review.md
- E2: https://bugbountylibrary.com/r/blog%3Aimmunefi-com-blog-bug-fix-reviews-balancer-dos-bugfix-review.md
- E3: https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md
