Jaypeggers Reentrancy Exploit Drained 15.32 ETH Through Malicious Token Contract
Canton Signals. Infiniti Markets. Jan 10, 2023 · 7:00 AM EST
Jaypeggers suffered a reentrancy attack on December 29, 2022, losing 15.32 ETH worth approximately $18,000. Hypernative detected the exploit in real time and contacted the team to assist with the investigation and efforts to prevent further losses.
Jaypeggers, an NFT tax-loss harvesting application, lost 15.32 ETH, worth approximately $18,000, in a reentrancy attack on December 29, 2022. The attacker exploited missing validation in the application's buyJay function and cashed out the stolen funds through Tornado Cash and Aztec.
Hypernative detected the malicious contract deployment and the exploit in real time. Its team immediately contacted Jaypeggers, assisted with the investigation and worked with the protocol to help prevent further losses.
The attack sequence began when the attacker's address received anonymous funding through Tornado Cash, avoiding funding sources subject to know-your-customer checks. Hypernative's platform detected that transaction and generated an alert about the address receiving funds from a mixer.
The attacker then prepared the tools for the exploit and deployed a contract. Using a contract enabled the attacker to execute complex logic and multiple actions within a single transaction, something difficult to perform from an externally owned account. About three minutes later, the attacker executed the exploit through that contract.
The attack transaction opened with a flash loan of 72.5 WETH. The attacker spent 22 WETH to purchase 13,584 JAY tokens, then used the remaining 50.5 WETH to call buyJay.
That function lacked validation that would have prevented the attacker from supplying a malicious contract as though it were an ERC-721 token. When buyJay called the supplied token's transferFrom function, it instead invoked the attacker's contract.
This interaction allowed the attacker to reenter the JAY contract by calling its sell function. The attacker could then sell JAY tokens at a miscalculated price and extract a profit. After repaying the flash loan, the attacker retained 15.32 WETH. The incident's overall loss was described as 15.32 ETH.
Hypernative's monitoring platform continuously tracks blockchain activity alongside other information sources to provide operational and security monitoring for protocol teams. Its detection capabilities cover governance, financial, security and technical risks, among other categories. The platform includes preconfigured detections intended to warn teams about hacks and exploits before they are launched, allowing time for response and mitigation. In this incident, monitoring identified both the earlier mixer-funded transaction and the subsequent malicious deployment and exploit.
Sources, Attribution & Disclaimer
- Published
- Jan 10, 2023 · 7:00 AM EST
- Source
- Hypernative
- Publisher
- Hypernative
- Cited sources
- Hypernative
Full attribution under the Digital Millennium Copyright Act (DMCA), 17 U.S.C. § 512: this signal is published by Canton Signals, owned and published by Infiniti Markets LLC, and summarizes the reporting of the publishers named above, links to their original work where an address is supplied, and reproduces no protected expression beyond brief factual reference and in-line attribution (“according to Hypernative”). All rights in the underlying reporting remain with the publishers listed; nothing here implies endorsement by or affiliation with them. Rights holders may request correction, update or removal at Infiniiti@w3ai.io.
Disclaimer: For information only; not investment, legal or tax advice. Canton Signals and Infiniti Markets LLC are independent and not affiliated with the Global Synchronizer Foundation or Digital Asset. Check the original sources before relying on any figure.