1. Incident review
On August 26, 2024 15:00 (UTC+8), Tokenlon QA team discovered a suspicious transaction during a routine security check:
- Suspicious address: 0xBa37cA397fC63b9FF6674220C4fBaa516b66bAF4
- Suspicious tx: https://etherscan.io/tx/0xfc6765d71ed1f9081318793fbc89f3373e9407de075d8d1f0bb15cb4c34010eb
The team immediately launched an emergency investigation and handling. The situation is as follows:
- User assets are safe and unaffected.
- A report has been filed with the relevant authorities
- Established communication with the attacker
- RFQ v2 contract has been paused
- Other swap services are operating as usual
2. Current situation
- RFQ v2 backend has been shut down
- RFQ v2 smart contract suspended
- Market makers have been notified to stop RFQ v2 quotes for the time being
3. Impact assessment
- Tokenlon RFQ v2 protocol fee loss: 149.059637215189 ETH (approximately 398,000 USD, based on the exchange rate on August 26th, 2024)
- PMM v5, RFQ v1, and AMM contracts are safe and risk-free
- Market maker and user assets unaffected
4. Incident analysis
Attacker information
- Attacker address: 0xba37ca397fc63b9ff6674220c4fbaa516b66baf4
- Attacked contract (fake taker and fake maker): 0x15665fce53b51d798ed838b8e5185cebc2043ffc
- Attacked transaction:
https://app.blocksec.com/explorer/tx/eth/0x35747db8e6aa2cf851abb10fdd43544793042d5b02714936372a8a36246068c1
Affected scope of the attack
- This attack occurred in the RFQv2 contract of Tokenlon v5. The vulnerability stemmed from the failure to distinguish between ETH and ERC20 token transfer types during the process of transferring tokens from market makers to the RFQv2 contract. This allowed the attacker, under certain circumstances, to impersonate a market maker and use ETH for transactions, thereby transferring away protocol fees from the RFQv2 contract without actually transferring in any ETH. The impact of this incident is limited to the protocol fees within the RFQv2 contract and will not affect normal users or market makers. Normal users can still use ETH for transactions, while our market makers only use ERC20 tokens for market making. Therefore, the overall impact is controllable.
Attacked transactions summary
The attacker initiated a total of 9 attack transactions, exploiting the contract vulnerability to obtain protocol fees. The hash values of these transactions have been recorded for further investigation.
- 0x35747db8e6aa2cf851abb10fdd43544793042d5b02714936372a8a36246068c1
- 0x164c72c596d6c9c53258cfa9145e1e33174aee0f125a23fb2c4378e52e625b14
- 0x309a06b40e893b58609bcef1b9e363c364664c7bd9464ae8b07e30d170b75167
- 0xdcc564591f3f71d8e9af40347cb20c1ec8b4b8f69460bbeba76600ac42824799
- 0x08bba63554cd84dfdef5eb6704bc70f896b1fcf40511aa6fc01122c9d669d4f7
- 0xed91ff3f8333ada4935d7e7c30b40c0729c5812f9a242113fdd9f831e77b6aaf
- 0xada3c67e067d8aa6089d4de226ee52fe90e28e25ecbc894ee0de714e09759b34
- 0xeb45b1cdb89b953448e30238efd0d906a7e6c74fa80e585426ceedaefab1be6d
- 0xfc6765d71ed1f9081318793fbc89f3373e9407de075d8d1f0bb15cb4c34010eb
5. Follow-up action plan
- Continue to cooperate with law enforcement to identify the attacker
- Comprehensive security audit of RFQ v2
- Develop and deploy security patches
- Formulate a restart plan for RFQ v2 under the premise of ensuring contract audit security
- Strengthen overall system security monitoring measures
6. To our users and partners
The Tokenlon team is fully committed to handling this incident and ensuring the safe and stable operation of the protocol. Please contact us if you have any further questions:
- Email: support@tokenlon.im
Official Twitter: @tokenlon