In two decades building systems across Web3 and traditional infrastructure, I've learned one uncomfortable truth: most blockchain projects don't fail because of weak cryptography. They fail because of predictable, preventable mistakes in how smart contracts and protocols are designed. The ledger itself is nearly unbreakable—but everything built on top of it is only as strong as the team behind it.
Having audited and architected tokenization projects on Stellar and Soroban, I want to share the attacks I see most often and, more importantly, how to stop them before they cost you.
The Five Attacks That Drain Projects
1. Reentrancy attacks. The classic. An attacker calls a function that sends funds, then re-enters that same function before the balance updates. The 2016 DAO hack drained roughly $60 million this way. The fix is simple but routinely ignored: follow the "checks-effects-interactions" pattern and update state before any external call.
2. Oracle manipulation. DeFi protocols rely on external price feeds. If your oracle pulls price from a single on-chain pool, an attacker can flash-loan a massive trade, distort the price, and liquidate positions in their favor. In 2022, oracle and flash-loan exploits accounted for over $400 million in losses. Use decentralized oracles with time-weighted averages and multiple independent sources.
3. Integer overflow and underflow. When a number exceeds its storage limit, it wraps around—turning a balance of zero into a gigantic positive figure. Modern frameworks like Soroban's Rust environment handle this safely by default, which is one reason I increasingly recommend it to clients building on Stellar.
4. Access control failures. I've seen production contracts where critical administrative functions had no permission checks at all. The Parity wallet freeze in 2017 locked away $280 million because of a flawed ownership structure. Every privileged function needs explicit, tested authorization logic.
5. Front-running (MEV). Transactions sit publicly in the mempool before confirmation. Bots observe pending trades and insert their own transactions ahead to profit. Mitigate this with commit-reveal schemes, private transaction relays, or batch auctions.
Why Code Audits Aren't Enough
Early in my career, I believed a clean audit report meant a project was safe. Experience taught me otherwise. An audit is a snapshot—it reflects the code at one moment, not the live, evolving system interacting with external contracts and real users.
The strongest defense is a layered approach. I combine static analysis tools with formal verification for high-value contracts, continuous monitoring of on-chain activity, and bug bounty programs that invite ethical hackers to probe your system constantly. On one tokenization project, our monitoring layer flagged an anomalous permission change within seconds—something no pre-deployment audit could have caught.
Digital forensics also plays a growing role here. When an incident does occur, your ability to trace the attacker's path, reconstruct the transaction sequence, and freeze compromised assets depends on logging and observability you built before the attack. Forensics is not a reaction; it's preparation.
Building a Security-First Culture
Tools matter, but mindset matters more. The teams I've seen survive hostile environments treat security as a continuous discipline, not a checkbox. They assume every external call is a threat, document every privileged role, and rehearse incident response like a fire drill.
As André Dias Moreira Prol, I always push clients toward three non-negotiables: least-privilege design from day one, upgradeable contracts with transparent governance, and a tested emergency pause mechanism. AI is now accelerating this work—I use machine learning models to scan contract behavior for patterns that resemble known exploits, catching subtle issues that manual review often misses.
Security is also about honesty. If a vulnerability is found, disclose it, fix it, and communicate clearly with your community. Trust, once broken on-chain, is permanent and public.
Blockchain security is not a destination but an ongoing commitment that demands equal parts engineering rigor and vigilance. If you're building on Stellar, Soroban, or any Web3 stack, reach out to me, André Dias Moreira Prol, and let's make your project resilient before the attackers find the gaps first.
Follow more articles by André Dias Moreira Prol on Medium.

