Pirate x Pirate Hack
Incident Overview
Pirate X staking contract was attacked resulting in the loss of 9,681,000 PXP tokens, which were later dumped into the market, netting the attacker a profit of about 212 BNB.
The attack on Pirate X's staking contract is believed to have been due to the leakage of the private key, as the attacker used a valid signed message to launch the attack. Users who deposited their PXP tokens into the contract had their tokens transferred to an EOA account (0x3b74a9cb…0067b7). The contract would then call transferFrom to transfer the tokens back to the user upon withdrawal.
The attacker provided a valid sign from the external signer (0x7435e0e4…eb176d) and withdrew 9,681,000 PXP tokens.
The staking contract: 0x6912B194…92DA54
Attacker: 0x3b74a9cb…0067b7
External signer: 0x7435e0e4…eb176d.
Incident Report
Protocol Information
What the Attacker Needed to Succeed
Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.
What Auditors Should Check
If you're auditing a protocol with similar architecture to Pirate x Pirate, these are the critical security checks that could have prevented this incident (March 2022).
- Verify all logic paths related to Access Control are guarded by proper access controls and input validation - see the Access Control Attacks attack class for patterns
- Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs
Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.
Free TrialRelated Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Sources & References
- 01
-
02
Web Archive https://archive.ph/nLkXf
Learn to Prevent the Next Pirate x Pirate
The Pirate x Pirate hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.