Reproduced Exploit
KittenSwap — Lack of `lastMintedPeriod` update allows unlimited minting of Kitten
1. Minter.updatePeriod() is meant to mint weekly Kitten once per epoch period. 2. The guard is if (currentPeriod > lastMintedPeriod). 3. After minting, the code never writes lastMintedPeriod = currentPeriod. 4. Once period advances past the initial value, every call remints the full weekly amount.
Chain
Other
Category
untagged
Date
Jun 2025
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
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.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 58066-c-02-lack-of-lastmintedperiod-update-allows-unlimited-mintin. Standalone Foundry PoC and full write-up: 58066-c-02-lack-of-lastmintedperiod-update-allows-unlimited-mintin_exp in the
evm-hack-registrymirror.
Vulnerability classes: access-roles · specific-token-type · inflation
Reproduction: self-contained Foundry PoC with only
forge-std— no fork. output.txt · test/58066-…sol.
AuditVault taxonomy: lang/solidity · sector/farm · sector/token · severity/high · genome: access-roles · specific-token-type
Key info#
| Impact | HIGH — Kitten emissions mint unbounded once the first period elapses |
| Protocol | KittenSwap — Minter.updatePeriod |
| Vulnerable code | if (currentPeriod > lastMintedPeriod) never followed by lastMintedPeriod = currentPeriod |
| Bug class | Missing state update / emission guard bypass |
| Finding | Pashov Audit Group — KittenSwap 2025-06-12 · #58066 |
| Report | KittenSwap-security-review_2025-06-12.md |
| Source | AuditVault |
| Fix | lastMintedPeriod = currentPeriod after the mint |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
Minter.updatePeriod()is meant to mint weekly Kitten once per epoch period.- The guard is
if (currentPeriod > lastMintedPeriod). - After minting, the code never writes
lastMintedPeriod = currentPeriod. - Once period advances past the initial value, every call remints the full weekly amount.
Vulnerable code#
if (currentPeriod > lastMintedPeriod) { // @> VULN
// mint emissions to rebaseReward + voter
// FIX: lastMintedPeriod = currentPeriod;
return true;
}
Root cause#
A one-sided guard: the comparison is present, but the state variable that makes it one-shot is never updated. After the first successful period, lastMintedPeriod stays at 0 forever.
Preconditions#
- At least one period has elapsed so
currentPeriod > lastMintedPeriod(initially 1 > 0). - Caller can invoke
updatePeriod(permissionless in the audited design).
Attack walkthrough#
- First
updatePeriod()mints 1× weekly (legitimate). - Nine more calls each remint another weekly amount.
- Supply = 10× weekly;
lastMintedPeriodstill 0.
Diagrams#
Impact#
Unbounded Kitten inflation dilutes all holders and corrupts emissions to RebaseReward / Voter.
Sources#
- AuditVault #58066
- Pashov KittenSwap 2025-06-12
- Reduced from Kittenswap/contracts review commit
65c8bdd(private at time of reduction; logic from report + Solidly-style minter)
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 58066-c-02-lack-of-lastmintedperiod-update-allows-unlimited-mintin_exp (evm-hack-registry mirror).
- AuditVault finding: 58066-c-02-lack-of-lastmintedperiod-update-allows-unlimited-mintin.
Alerts & third-party analyses
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.