A white hat hacker finds security flaws and reports them, or rescues funds during an attack, in exchange for a reward. A black hat exploits those flaws and keeps what they take. A grey hat sits in between, draining a protocol first and negotiating what to give back afterwards. In crypto, the line between the three is thinner than anywhere else, because the hacker and the rescuer often use the exact same exploit.
The last two years produced an example of each at nine-figure scale. So this guide explains the three roles, the bounties and legal cover that make white hats possible, why grey hats keep getting away with it, and how to read the next “white hat” headline. It follows on from our exchange protection funds guide, which covers what happens when nobody gives the money back.
Black hats: the ones who keep it
Black hats are the default. They find a flaw, drain the funds and launder them. No message to the team, no negotiation, no return. Every entry near the top of our biggest crypto hacks ranking is a black hat operation, and most of them trace back to one organisation.
North Korea’s Lazarus Group is the largest black hat operation in history, with more than $12 billion stolen from exchanges, bridges and wallets. Binance, Bybit, Ronin and DMM Bitcoin all fell to it. Our guide on who is Lazarus Group covers how it operates. Beyond Lazarus, black hats range from organised SIM-swap gangs to lone developers who found a bug and decided to retire.
The defining trait is not skill. Plenty of black hats use simple phishing. The defining trait is that the funds never come back unless law enforcement or a stablecoin freeze forces it.
White hats: the ones who report or rescue
A white hat does one of two things. Either they find a vulnerability and report it privately before anyone can exploit it, or they use an active exploit to move funds to safety before the attacker can.
The reporting version is the cleaner one. In 2026, a security firm found a bug in the XRP Ledger that could have minted unlimited XRP, reported it quietly and let the developers patch it. Nobody lost anything. Our post on the XRP infinite mint bug covers how close that call was.
The rescue version is messier, and I have watched one up close. When Flooring Protocol got exploited this year, Yuga Labs’ security lead 0xQuit used the same bug class to pull NFTs out before the attackers could finish. I know Quit from his Discord and our DMs, so I followed that one in real time. The full story is in our Flooring Protocol exploit post. It worked because Yuga had the skills, the money and a reason to care. Most protocols have none of those on call.
White hats get paid through bug bounties. Immunefi and similar platforms let protocols post rewards for reported flaws, and the biggest payouts run into the millions. In 2022, a researcher earned $10 million for finding a critical bug in Wormhole, months after the bridge had already lost $325 million to a black hat who found a different one.
Grey hats: exploit first, negotiate later
Here is where crypto gets strange. A grey hat drains a protocol, then announces they were only testing security and offers to return the funds, usually minus a self-declared bounty. Nobody asked them to test anything.
Poly Network in 2021 is the famous case. The attacker took $611 million, started calling himself “Mr. White Hat” on chain, and returned everything within two weeks. Poly offered a $500,000 bounty and a job. Euler Finance in 2023 went the same way. The attacker drained $197 million, negotiated for weeks on chain, then returned nearly all of it with an apology.
Liquid Network in September 2026 pushed the model further. The attackers took 4,000 BTC, about $320 million, then returned 3,400 BTC and kept 598 BTC as a “bounty” worth $47 million. Blockstream had no say in the amount. Our Liquid Network hack post walks through the whole negotiation. Plenty of people in the industry called it extortion with better branding, and they have a point.
The reason grey hats keep winning is simple. Returning 85% and keeping 15% is often safer than keeping 100% and spending years laundering it. For the protocol, getting most funds back beats a lawsuit against an anonymous wallet. Both sides shake hands, and the “bounty” quietly becomes the price of the hack.
Where the legal line actually sits
Crypto has tried to formalise the white hat role, with mixed results.
The Security Alliance’s Safe Harbor agreement, adopted by a growing list of protocols since 2024, gives white hats legal cover to rescue funds during an active exploit. The terms are specific. Funds must go to a designated recovery address, the rescuer gets a capped reward, and anything beyond that is theft. Protocols that have not signed it leave rescuers exposed.
Outside that framework, “I was only testing” is not a defence. The Mango Markets exploiter argued his $110 million drain was a legal trading strategy and still ended up arrested and in court. Draining first and labelling yourself a white hat later does not change what the blockchain recorded.
For users, the practical point is this. A protocol with a public bug bounty and a signed safe harbor agreement has given white hats a reason to report rather than exploit. One without either is relying on luck. Our running DeFi hacks 2026 guide notes which exploited protocols had a bounty programme in place, and the pattern is not encouraging.
How to read the next “white hat” headline
When a hack gets reported as a white hat rescue, ask three questions before relaxing.
Who moved the funds first? If the protocol’s own team or a known security firm moved them to a safe address, it is a rescue. If an anonymous wallet drained everything and then started talking, it is a grey hat at best.
Was the bounty agreed or declared? A bounty the protocol offered is a reward. A bounty the attacker kept without asking is a ransom.
Did everything come back? Poly Network, yes. Euler, nearly. Liquid, 85%. The gap is the real cost, and it usually lands on users or the treasury.
And if your own funds are stuck in the middle of one of these, our guide on whether stolen crypto can be recovered covers what to do while the negotiation plays out. Every term above, from bug bounty to clawback, is defined in the crypto security glossary.
Keep This Content Free
Most of the money stolen in crypto never comes back, which is why I keep trading capital only on exchanges that have proven they can absorb a black hat. OKX and Bybit both publish proof of reserves, and Bybit paid out in full after the second-largest hack ever. Signing up through our links gets you their welcome bonus and keeps this cluster of guides free.
Final Words
The hats are a useful shorthand, but crypto blurs them on purpose. The same exploit drains a protocol or rescues it, depending on who runs it and where the funds land. Black hats keep everything, white hats report or rescue for an agreed reward, and grey hats take first and name their own price.
Treat every “white hat” announcement with the three questions above, and keep an eye on whether the protocols you use have a bounty programme and a safe harbor agreement. Our security tag tracks each of these cases as they unfold. Next in this series, what a smart contract audit actually checks, and why “audited” protocols keep getting drained anyway.

FAQ
What is a white hat hacker in crypto?
A white hat hacker finds security flaws and reports them privately, or moves funds to safety during an active exploit, in exchange for an agreed reward. Bug bounty programmes and safe harbor agreements exist to make that legal and worthwhile.
What is a black hat hacker?
A black hat exploits a flaw and keeps the stolen funds. North Korea’s Lazarus Group is the largest black hat operation in crypto, responsible for the Binance, Bybit and Ronin hacks among many others.
What is a grey hat hacker?
A grey hat drains a protocol without permission, then negotiates a return while keeping part of the funds as a self-declared bounty. The Liquid Network attackers kept $47 million of a $320 million haul this way in 2026.
Was the Poly Network hacker a white hat?
Not by the strict definition. He drained $611 million without permission, then returned it all and accepted the label. Most researchers call it the most famous grey hat case in crypto.
What is a bug bounty in crypto?
A reward a protocol pays for privately reported vulnerabilities. Payouts range from a few thousand dollars to the $10 million Wormhole paid in 2022 for a critical bug.
Is it legal to hack a protocol and return the funds?
Not automatically. Draining funds without permission is theft regardless of what happens next. Safe harbor agreements give white hats legal cover only if they follow the protocol’s published terms and return funds to a designated address.










