Security writeups

Vulnerability deep-dives, DeFi exploit analysis, and pre-audit guidance — written to be useful to the teams I audit and build for.

AccountingDeFiAudit

Pear Protocol: A Fee Setter That Erased Every Referrer Payout

A smart contract audit finding from the Pear Protocol V1 review with Shieldify: how an overwrite instead of an add silently deleted every pending referrer fee.

Jun 26, 20267 min read
Read writeup
Audit PrepBest PracticesSmart Contract Security

How to Prepare Your Contracts for an Audit

What actually makes a smart contract audit faster and better, from the auditor reading your code: freeze scope, write the intent down, ship tests, and run the free tools first.

Jun 26, 20269 min read
Read writeup
FoundryToolingSmart Contract Security

How I Use Foundry in Smart Contract Audits

How I actually use Foundry on a smart contract audit: writing proof-of-concept exploit tests, poking at contracts with Anvil and cast, and running gas reports.

Jun 26, 20268 min read
Read writeup
Audit ProcessMethodologySmart Contract Security

How I Actually Audit a Smart Contract

My real smart contract audit process, start to finish: docs before code, why tests are gold, automated first, then manual function-by-function tracing.

Jun 26, 20268 min read
Read writeup
LiquidationDeFiCodeHawks

A Hardcoded Health Factor That Liquidates Healthy DeFi Positions

A smart contract audit finding from my first CodeHawks contest: how a hardcoded 1e18 health factor can liquidate well-collateralized stablecoin positions.

Jun 26, 20267 min read
Read writeup
Access ControlNFTCode4rena

AI Arena: Hand-Picking Rare Fighter NFTs via redeemMintPass

A smart contract audit finding from my AI Arena Code4rena audit: how redeemMintPass let players hand-pick rare fighter attributes and mint Dendroids at will.

Jun 26, 20266 min read
Read writeup