Reproduced Exploit

Dumont: a losing 1000 USDT bet pays the burner 0 and still mints 100 MONT

A 10% fee applies to winning and losing bets, and 80% of that fee is supposed to buy and burn MONT. On a 1000 USDT bet the burn amount is 80 USDT. transferPlayerRewards sends it only when _isPlayerWinner is true. A losing settlement leaves the burner at 0, leaves the 1000 USDT in the vault, and sti…

Sep 2024•Ethereum•logic•4 min read

Loss

80 USDT that should buy and burn MONT stays in the vault; 100 MONT is still minted

Chain

Ethereum

Category

logic

Date

Sep 2024

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. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 38015-h-01-fees-are-not-burnt-on-losing-games-pashov-audit-group-n. Standalone Foundry PoC and full write-up: 38015-h-01-fees-are-not-burnt-on-losing-games-pashov-audit-group-n_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/missing-check · vuln/logic/fee-calculation

Key info#

FieldValue
Loss80 USDT that should buy and burn MONT stays in the vault; 100 MONT is still minted
Vulnerable contractVault.transferPlayerRewards
Attacker EOA0x1111111111111111111111111111111111111111 (the player)
Attack contractExploit
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 2024-09
Compilersolc 0.8.27, cancun, via IR
Bug classThe burner transfer is inside the winner branch

TL;DR#

A 10% fee applies to winning and losing bets, and 80% of that fee is supposed to buy and burn MONT. On a 1000 USDT bet the burn amount is 80 USDT. transferPlayerRewards sends it only when _isPlayerWinner is true. A losing settlement leaves the burner at 0, leaves the 1000 USDT in the vault, and still mints 100 MONT to the player. The same function with a winner sends the 80 USDT to the burner.

Background#

Pashov Audit Group, Dumont security review, report added 16 September 2024, finding H-01. The vault pays the player and the burner together inside if (_isPlayerWinner). MontRewardManager still distributes MONT on a loss, sized like 10% of the bet. The missing buy pressure is the 80% of the fee that never reaches the burner.

The vulnerable code#

SOLIDITY
pendingBurn = (1000e6 / 10) * 8 / 10; // 80 USDT
if (_isPlayerWinner) { // @> VULN: the burner transfer is inside this branch
    usdt.transfer(player, _totalAmount);
    usdt.transfer(address(burner), pendingBurn);
}
mont.mint(player, 100 ether);
DIFF
- if (_isPlayerWinner) {
-     usdt.transfer(player, _totalAmount);
-     usdt.transfer(address(burner), pendingBurn);
- }
+ usdt.transfer(address(burner), pendingBurn);
+ if (_isPlayerWinner) {
+     usdt.transfer(player, _totalAmount);
+ }

Root cause#

The burn transfer is on the winner path only. A loss skips the whole branch, including the burner, and the MONT mint sits after the branch so it still runs. The fee that was supposed to fund the burn stays with the stake in the vault.

Preconditions#

  • The vault holds the 1000 USDT stake.
  • The fee is 10% and the burn share is 80% of that fee, so 80 USDT.
  • The settled game is a loss. The control is the same function with _isPlayerWinner true.

Attack walkthrough#

  1. transferPlayerRewards(false, ...) runs.
  2. pendingBurn is set to 80 USDT.
  3. The winner branch is not taken. No USDT is sent to the burner.
  4. 100 MONT is minted to the player.
  5. The burner's USDT balance is 0.
  6. The vault still holds the full 1000 USDT.

Diagrams#

flowchart TD A["Losing 1000 USDT bet is settled"] --> B["Burn fee is computed as 80 USDT"] B --> C["VULN winner branch is skipped"] C --> D["Burner receives 0"] D --> E["100 MONT is still minted to the player"] E --> F["80 USDT fee stays in the vault"] B --> G["Control winner path sends 80 USDT to the burner"]

Impact#

The burner does not receive the 80 USDT that should have bought and burned MONT. The player still receives 100 MONT, so the loss creates sell pressure without the buy the token design counted on. The 1000 USDT stake, including that 80 USDT fee, remains in the vault. A winning settlement of the same function does transfer 80 USDT to the burner.

Remediation#

Transfer burnAmount to the burner before the winner check, and leave only the player payout inside the winner branch.

How to reproduce#

BASH
cd 38015-h-01-fees-are-not-burnt-on-losing-games-pashov-audit-group-n_exp
forge test -vv

test_exploit_losing_bet_pays_burner_zero_and_mints_mont asserts a 0 burner balance, 100 MONT minted, and the 1000 USDT still in the vault. test_control_winning_bet_sends_80_usdt_to_the_burner asserts the 80 USDT transfer. Captured output is output.txt.

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.