Reproduced Exploit

GTE — free LP mint when accrued launchpad fees are non-zero

1. Reserves = balances − fees. 2. mint without transfer sees amount = fees → free LP. 3. Burn cashes out the free share of pool assets. 4. HARM: both tokens stolen with zero deposit.

Aug 2025Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Aug 2025

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 64853-h-05-gtelaunchpadv2pair-permits-minting-lp-tokens-for-free-w. Standalone Foundry PoC and full write-up: 64853-h-05-gtelaunchpadv2pair-permits-minting-lp-tokens-for-free-w_exp in the evm-hack-registry mirror.


Vulnerability classes: fee-calculation · direct-drain · fee-accounting

Reproduction: self-contained Foundry PoC with only forge-std. Full trace: output.txt. PoC: test/64853-h-05-gtelaunchpadv2pair-permits-minting-lp-tokens-for-free-w_exp.sol.

AuditVault taxonomy: lang/solidity · platform/code4rena · has/github · has/poc · severity/high · sector/dex · sector/launchpad · genome: fee-calculation · direct-drain · fee-accounting


Key info#

ImpactHIGH — free LP then burn drains pair assets
ProtocolGTE
Vulnerable codeGTELaunchpadV2Pair.mint amount0/1 = balance − reserve
Bug classFee-inclusive deposit measurement
FindingCode4rena 2025-08 GTE · #64853 · H-05 · AvantGard
ReportCode4rena report
SourceAuditVault
Compiler^0.8.24 (PoC)

TL;DR#

  1. Reserves = balances − fees.
  2. mint without transfer sees amount = fees → free LP.
  3. Burn cashes out the free share of pool assets.
  4. HARM: both tokens stolen with zero deposit.

The vulnerable code#

SOLIDITY
uint256 amount0 = balance0.sub(_reserve0); // @> VULN
uint256 amount1 = balance1.sub(_reserve1); // @> VULN

Fix: subtract accrued launchpad fees from the measured amounts.


Root cause#

Deposit delta equals fee residual when the caller transferred nothing.


Preconditions#

  • Non-zero fees on both sides (or enough on one side after min with the other).
  • Same-block fee retention.

Attack walkthrough#

  1. Seed pool with fees on both tokens.
  2. Call mint with no pre-transfer → free LP.
  3. Burn free LP → extract tokens.

Diagrams#

flowchart LR F["Accrued fees"] --> M["mint with no transfer"] M --> L["Free LP minted"] L --> B["burn"] B --> S["Stolen tokens"]

Impact#

Drain of pair liquidity proportional to free LP minted; repeatable same-block.


Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.