Web3 × AI Engineer · Rust + Anchor on Solana · Solidity on Ethereum & Base · Cairo on Starknet · Building in public with Claude Code · Open to remote roles
Spent two weeks building a rug-pull detector on Solana. Not the "we flag suspicious
tokens" kind — one with a measured number next to every alert.
The signal: the creator adds liquidity to its own token. 97.9% of those ended in a
drain (422 of 431, 431 distinct wallets), median 8 minutes of warning before the
pool went to zero.
The part nobody publishes: it only catches 65.3% of pool rugs. The other 35% are dev
dumps and migration pulls, where the drain IS the event — there is nothing to warn
about beforehand. That's on the dashboard, not buried in a footnote.
I also killed four of my own hypotheses with data. ">10 launches in 24h" as a signal:
1.0% precision. Sell-share before the drain: inverted once I fixed the liquidity
metric. Both documented as discarded, with the numbers that killed them.
Calibrated against 17M frames from one full night of mainnet, over Solami's Blur
stream. TypeScript, 242 tests, docker compose up and it runs. Without an API key it
replays a real recorded hour through the same detector.
@useSolami
@W3B_AI_SR Exactly the order I'm following: old contest repos first. Two CodeHawks First Flights in, the storage collision in Thunder Loan taught me more than any article.
@Howling__Husky@Lighter_xyz@0xTria Scoped keys are the cheapest fix on that list. The key my Solana monitor uses is data-only: if it leaks, it can read, not move anything.
@anza_xyz@lorismatic This is what EIP-712 did for Ethereum. Building a wallet there, typed data was the only way a user could actually read what they were signing. Good to see it on Solana for something as common as a Jupiter swap.
@kodr_pro The stage 12 caveat hit home. Same thing with property tests: I measured only 39–56% of my cases reaching the assertion, and dropped prop_assume because it was filtering out exactly the cases where the bugs live.
@AayushStack Option 2. The other three get worse the more access the agent has. A mistake with read-only access is a bug report; with write access it's an incident.
CodeHawks Practice audit #2: Thunder Loan, the flash-loan protocol from Cyfrin's security course. It sits behind a UUPS proxy.
The bug: the planned upgrade deletes one variable.
V1: s_feePrecision, s_flashLoanFee
V2: s_flashLoanFee, FEE_PRECISION (now a constant)
Constants take no storage, so everything after it moves up one slot. After the upgrade, s_flashLoanFee reads the old precision: 1e18. The flash loan fee jumps from 0.3% to 100%.
V2's initialize() sets the fee back to 0.3%. It never runs: the proxy was already initialized.
Found it with forge inspect <Contract> storage on both versions, comparing slot by slot.
🔑 In an upgrade, variables are positions, not names.
@mitansh_j07 Especially because the diff looks like a cleanup. Turning a variable into a constant reads like a gas optimization, not a breaking change.
CodeHawks Practice audit #2: Thunder Loan, the flash-loan protocol from Cyfrin's security course. It sits behind a UUPS proxy.
The bug: the planned upgrade deletes one variable.
V1: s_feePrecision, s_flashLoanFee
V2: s_flashLoanFee, FEE_PRECISION (now a constant)
Constants take no storage, so everything after it moves up one slot. After the upgrade, s_flashLoanFee reads the old precision: 1e18. The flash loan fee jumps from 0.3% to 100%.
V2's initialize() sets the fee back to 0.3%. It never runs: the proxy was already initialized.
Found it with forge inspect <Contract> storage on both versions, comparing slot by slot.
🔑 In an upgrade, variables are positions, not names.
Verifiable build for my Solana program: six weeks of mismatched hashes, fixed by one flag.
The official 4.2.2 image defaults to platform-tools v1.56. My build uses v1.57. Different compiler, different bytecode.
solana-verify build --cargo-build-sbf-args="--tools-version v1.57 --arch v3"
Now the Docker build is byte-for-byte my devnet deployment.
The explorer badge still won't show: remote verification is mainnet-only.
If you're moving to sBPFv3 on 4.2.x, check which platform-tools your build actually uses.
https://t.co/fafMUfadUh
@0xhashlol Not that I found. I pass it on every build, and the exact command is in the README. Jonas mentioned that from 4.3 it shouldn't be needed anymore.
Verifiable build for my Solana program: six weeks of mismatched hashes, fixed by one flag.
The official 4.2.2 image defaults to platform-tools v1.56. My build uses v1.57. Different compiler, different bytecode.
solana-verify build --cargo-build-sbf-args="--tools-version v1.57 --arch v3"
Now the Docker build is byte-for-byte my devnet deployment.
The explorer badge still won't show: remote verification is mainnet-only.
If you're moving to sBPFv3 on 4.2.x, check which platform-tools your build actually uses.
https://t.co/fafMUfadUh
Soon you will only be able to deploy sBPFv3 Programs! 🚨
Please let us know if you see any problems with that asap!
Check the guide:
https://t.co/fH6tty5alI
18.6 ETH in fees. totalFees() returns 0.153.
uint64 tops out at ~18.44 ETH, and an explicit cast doesn't revert: it keeps the low 64 bits. withdrawFees() requires balance == totalFees, which never holds again. Fees locked.
0.8 wouldn't save you here. It checks overflow, not downcasts.
Trace from my PoC 👇
https://t.co/lag9G4c5A3
https://t.co/3uxX1ntNMN
18.6 ETH in fees. totalFees() returns 0.153.
uint64 tops out at ~18.44 ETH, and an explicit cast doesn't revert: it keeps the low 64 bits. withdrawFees() requires balance == totalFees, which never holds again. Fees locked.
0.8 wouldn't save you here. It checks overflow, not downcasts.
Trace from my PoC 👇
https://t.co/lag9G4c5A3
https://t.co/3uxX1ntNMN
I practiced auditing on Puppy Raffle, CodeHawks' First Flight #1.
Found 6 of its 16 known issues and wrote 4 Foundry PoCs. The one I missed taught me the most.
refund() looks fine on its own. So does selectWinner().
But refund() doesn't remove you from players[]. It writes address(0) in your slot.
selectWinner() still counts that slot:
→ the winner can be address(0)
→ the prize math counts ETH that was already refunded
I reviewed each function separately. The bug lives in the state they share.
🔑 Audit the system, not the functions.
Findings + PoCs: https://t.co/lag9G4cDpB
@SolPlay_jonas The --tools-version v1.57 tip in the guide fixed my verifiable build. The 4.2.2 image defaults to v1.56, so my hashes never matched. With the flag, the Docker build is byte-for-byte identical to my devnet deployment. Thanks for writing it up.