Prerequisites: Familiarity with smart contract security and Solidity.
What You’ll Do
- Find an attackable contract
- Review the Safe Harbor agreement
- Execute an attack
- Handle recovered funds correctly
Step 1: Find an Attackable Contract
Query theAttackRegistry to check if a contract is attackable:
AgreementStateChanged events:
Step 2: Get the Agreement Details
Once you find an attackable contract, get its agreement:You now know the bounty terms. In this example: 10% bounty, $5M cap, retainable.
Step 3: Verify the Contract is in Scope
Double-check the contract is covered:Step 4: Get the Recovery Address
Note where to send recovered funds:Step 5: Execute Your Attack
Now execute your exploit. Here’s an example attacking a reentrancy vulnerability:Step 6: Handle Funds Correctly
After a successful attack:1
Calculate Your Bounty
2
Send Remainder to Recovery
Transfer
RecoveredAmount - Bounty to the recovery address3
Keep Your Bounty
The remaining amount is yours
You’ve completed your first attack! The protocol received their funds (minus your bounty), and you’re protected under Safe Harbor.
Step 7: Document Everything
Keep records of:- The contract you attacked
- The vulnerability exploited
- Transaction hashes
- Your bounty calculation
- Funds sent to recovery
What’s Next?
How to Claim Bounties
Learn more about bounty calculations and caps
Safe Harbor Protection
Understand your legal protections