The Stacks ecosystem has had some brutal hacks. I've been tracking these since early 2024 and spent way too many late nights debugging similar issues. The pattern is clear: "Bitcoin security" doesn't automatically protect your smart contracts from dumb mistakes that cost millions. The Stacks security landscape has unique challenges beyond traditional blockchain security.
ALEX Protocol Disasters (2024-2025)
ALEX got destroyed twice in 13 months. The June 2025 hack was an access control nightmare - exact loss numbers vary depending on who's counting, but it was somewhere between $8M and $16M. Both incidents were basic access control failures that any decent audit should have caught. ALEX's security response shows how they're addressing these issues.
How the ALEX Hack Worked
- Fake Token Creation: Attacker deployed malicious
ssl-labubu-672d3
token with backdoor transfer function - Permission Bypass: Called
set-approved-token
to grant vault permissions to malicious contract - Access Control Failure: Used
as-contract
to make vault appear as caller, bypassing security checks - Systematic Drain: Malicious transfer function systematically drained vault of multiple token types
The critical flaw: ALEX trusted external contracts without proper validation. When swap-x-for-y
called the fake token's transfer function using as-contract
, the vault's identity was spoofed, completely bypassing access controls. I wanted to throw my laptop out the window debugging a similar pattern last month - this shit will fail silently and you'll spend 2 hours figuring out why your vault permissions are fucked.
Previous ALEX Hack (May 2024)
This wasn't ALEX's first rodeo - they lost $4.3M in May 2024. Two major exploits within 13 months demonstrates systemic security problems, not isolated incidents. The DeFi security report provides detailed attack analysis.
Other Documented Stacks Exploits
Zest Protocol (April 2024): $322,000 STX
Zest Protocol's vulnerability was simpler but equally damaging. The borrow
function failed to validate collateral asset uniqueness:
;; Vulnerable code - no duplicate checking
(define-public (borrow (assets (list 100 asset-type)))
;; Missing: duplicate asset validation
(let ((total-value (fold + assets 0)))
;; Attacker lists same asset 100 times
Attack vector: List the same collateral asset multiple times in the assets parameter to artificially inflate collateral value and over-borrow.
Charisma Protocol (September 2024): $183,548 STX
The Charisma exploit exploited as-contract
to escalate privileges. The unwrap
function updated tx-sender
to the contract address, giving attackers contract owner permissions.
;; Vulnerable pattern
(define-public (unwrap)
(as-contract
;; tx-sender becomes contract address here
(stx-transfer? amount tx-sender recipient)))
The January 2025 Network Outage
On top of smart contract vulnerabilities, the entire Stacks network went down for 5 hours in January 2025. All transactions halted completely, affecting every application regardless of how well-secured their contracts were. Lost a weekend dealing with panicked users asking why their transactions disappeared into the void.
This outage highlighted infrastructure risks:
- Single point of failure in consensus mechanism
- No graceful degradation - complete service interruption
- Recovery time uncertainty - users didn't know when service would resume
- Cross-chain impact - sBTC bridging also affected
Security Audit Reality Check
Even with audits, vulnerabilities slip through. The sBTC Rewards Program audit found 18 findings including 1 critical and 1 high severity in a core Stacks protocol component.
Audit findings breakdown:
- 1 Critical: Potential fund loss scenario
- 1 High: Access control vulnerability
- 3 Medium: Logic errors and edge cases
- 3 Low: Gas optimization and minor bugs
- 10 QA: Code quality improvements
This was for a rewards program, not even a complex DeFi protocol. If core Stacks infrastructure has critical vulnerabilities, your contracts definitely need multiple audit rounds - learned this the hard way after shipping code I thought was bulletproof.
What I've Tracked in Total Losses
The major incidents I've been following:
- ALEX Protocol (June 2025): Somewhere between $8M-$16M depending on source
- ALEX Protocol (May 2024): Around $4M
- Zest Protocol (April 2024): $322K STX worth
- Charisma Protocol (September 2024): $183K STX worth
- Probably other incidents I haven't tracked
Beosin's analysis mentions "total losses of more than $2 million" but that's clearly low-balling it just from the ALEX hits alone.
Why Traditional Security Doesn't Work
Stacks' unique architecture creates security challenges that Ethereum security practices don't address:
Bitcoin Integration Complexity: Reading Bitcoin state introduces new attack vectors not present in other L2s. Contracts that verify Bitcoin transactions can be fooled by carefully crafted Bitcoin data.
PoX Consensus Dependencies: Stacks relies on Bitcoin miners for security, but the Proof of Transfer mechanism adds complexity. The January 2025 outage showed this dependency can break catastrophically.
Clarity Language Gaps: While Clarity prevents reentrancy, it doesn't prevent the access control failures that caused the ALEX hack. The `as-contract` function documentation warns about privilege escalation but developers keep misusing it.
Limited Tooling: Fewer security tools and monitors compared to Ethereum ecosystem. Issues like the ALEX Protocol's malicious token wouldn't have been detected by standard monitoring - I spent 3 hours manually checking contract calls that would've been flagged automatically on Ethereum. Security monitoring tools exist but require manual setup.
The next sections cover specific hardening measures that address these documented failure modes.