Karura Parachain Lost Tokens
Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' section to other sections, and add any missing information or sources you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.
Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!
The unaudited Karura smart contract contained an exploit which the team hadn't noticed. This was exploited in an attempt to take the funds. The attacker was too stupid to move the funds or negotiate a bounty, and kept them in the same wallet while the Karura governance system put through a proposal for them to be taken back to the treasury, voted on it, and executed it on the blockchain. (not just once, not just twice, but three times, since the frist 2 failed.) As a result, all funds were recovered without issue.
This is a global/international case not involving a specific country. [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16]
About Karura
"Reimagine DeFi Possibilities. Meet Karura’s all-in-one DeFi platform to help you swap, borrow, lend, earn, and more – all with micro gas fees." "Karura is an all-in-one decentralized finance (DeFi) hub and stablecoin platform built on Kusama (KSM) and integrated into Polkadot (DOT). Karura was created by the Acala Network, which has won four Web3 Foundation grants and founded the Substrate Developer Academy."
"Founded by the Acala Foundation, Karura is a scalable, EVM-compatible network optimized for DeFi." "Karura was founded by the same team that is behind the Acala Network: Ruitao Su, Bette Chen and Bryan Chen." "Ruitao Su is a co-founder of Acala and current CEO of Laminar Protocol. Prior to that, he was the CTO of Centrality. Su is an award-winning software engineer, entrepreneur, investor and advisor to tech companies and startups."
"Self-described as "Polkadot's wild cousin," Kusama is an experimental blockchain platform that is designed to provide a massively interoperable and scalable framework for developers." "Kusama is built on Substrate — a blockchain building kit developed by Parity Technologies. Kusama has almost the same codebase as Polkadot — one of the most successful interoperable blockchains."
"Karura aims to be the first project to lease a parachain through a crowdloan on the Kusama network, and it is designed to function as a hub for decentralized finance on the blockchain, similar to Acala's role on Polkadot."
"The Kusama network has a near-identical codebase to Polkadot, and Karura also bears many similarities with Acala. Both platforms are fast-paced, efficient, inexpensive to use and sufficiently secure for all kinds of financial applications."
"Karura offers a stablecoin — Karura Dollar (kUSD), which maintains a 1:1 peg to the value of the U.S. dollar. This removes the need to send KSM tokens to Binance because users can safely swap KSM to a stablecoin (or to other assets such as Bitcoin)."
"The Kusama network, the experimental hotbed of unaudited, pre-production code serving as Polkadot’s wild cousin and somewhat rash trailblazer lived up to its “Expect Chaos” mantra and had another adventure."
"While XCM v2, which is in use on the Kusama Relay-chain and is nearing audit completion without any major issues found, has some expectation of security, XCM v0 and v1 were early revisions which were not audited and as such not intended for production use. Though Kusama is an unaudited and pre-production network, owing to the large attack surface of XCM, the ability for users to execute hand-crafted XCM messages was intentionally disabled."
"On October 12, 2021 Karura, a Kusama’s parachain, lost $3.5M worth of KSM tokens after an attacker injected malicious XCM (cross-chain message) transactions exploiting vulnerable code base. Most of the stolen funds were reclaimed through a governance action."
"The Karura team (one of Kusama’s parachains) discovered that the balance of KSM tokens held by Karura parachain on the Kusama Relay-chain did not match the total number of KSM tokens recorded in the Karura tokens pallet. To be precise, the Karura parachain account was holding 11,000.00 KSM less than could be explained. The team identified a number of suspicious XCM transactions that transferred KSM tokens out of Karura parachain account."
"This happened due to the compounding of three factors on the Karura chain: The misconfiguration of the XCM pallet The usage of older, flawed, code. The utilization of Reserve asset transfers. The combination of these factors led to the possibility of the attacker being able to execute a message which could make a withdrawal from Karura’s reserve account on the Relay-chain."
"They then took three actions. They notified centralised ecosystem infrastructure providers about the account containing the stolen funds; they helped Karura governance to invoke a special contingency-plan pallet to disable the ability to send raw XCM transactions immediately; and they requested the Kusama Relay chain’s decentralized governance bodies to help recover the funds."
"As a result of the latter, motion 373 was proposed by the council to recover the transferred funds (accounting for 10,000 KSM), followed by a Technical Committee proposal for fast-track referendum and the referendum itself. The period of the referendum and enactment was intentionally kept minimal by Kusama governance in order to maximise the chances of the recovery of stolen funds, which wouldn’t work if the attacker were to have transferred the funds during the vote."
"The force transfer referendum was approved & executed, and 9,999.00 KSM were transferred back to the Karura parachain account. Note: the motion failed to execute twice prior (referenda 141 and 142) due to incorrect usage of the preimage registration extrinsics, owing to the short enactment period."
"The remaining 1,000 KSM was burned by the attacker and we expect a proposal to be made to the Kusama council in due course to re-mint this missing KSM back into the Karura sovereign account."
"All parachains connected to Kusama network have since patched and upgraded their code if needed and no other attacks, successful or otherwise, have been detected."
This is a global/international case not involving a specific country.
The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.
Include:
- Known history of when and how the service was started.
- What problems does the company or service claim to solve?
- What marketing materials were used by the firm or business?
- Audits performed, and excerpts that may have been included.
- Business registration documents shown (fake or legitimate).
- How were people recruited to participate?
- Public warnings and announcements prior to the event.
Don't Include:
- Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
- Anything that wasn't reasonably knowable at the time of the event.
There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.
The Reality
This sections is included if a case involved deception or information that was unknown at the time. Examples include:
- When the service was actually started (if different than the "official story").
- Who actually ran a service and their own personal history.
- How the service was structured behind the scenes. (For example, there was no "trading bot".)
- Details of what audits reported and how vulnerabilities were missed during auditing.
What Happened
The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.
| Date | Event | Description |
|---|---|---|
| October 12th, 2021 12:00:00 AM | Main Event | Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here. |
Total Amount Lost
The total amount lost has been estimated at $3,500,000 USD.
How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?
Immediate Reactions
How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?
Ultimate Outcome
What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?
Total Amount Recovered
The total amount recovered has been estimated at $3,500,000 USD.
What funds were recovered? What funds were reimbursed for those affected users?
Ongoing Developments
What parts of this case are still remaining to be concluded?
Prevention Policies
This type of issue was one which could have been easily detected through a professional audit. However, since professional audits cannot be guaranteed to catch all problems, the safest approach is to store most funds in offline multi-signature wallets. Online or hot systems can be insred through self-insurance, smart contract insuracne, or an industry insurance fund.
References
- ↑ No Title (Jan 10, 2022)
- ↑ Acala - The DeFi & Liquidity Hub of Polkadot (Jan 28, 2022)
- ↑ https://coinmarketcap.com/currencies/karura/ (Jan 28, 2022)
- ↑ https://coinmarketcap.com/currencies/kusama/ (Jan 28, 2022)
- ↑ Karura: The DeFi hub of Kusama Network. A canary network of Acala. (Jan 28, 2022)
- ↑ Karura Crypto The Uniswap of Kusama - YouTube (Jan 28, 2022)
- ↑ Kusamas Governance Thwarts Would Be Attacker (Jan 28, 2022)
- ↑ Subscan | Substrate based blockchain explorer (Jan 28, 2022)
- ↑ Subscan | Substrate based blockchain explorer (Jan 28, 2022)
- ↑ Subscan | Substrate based blockchain explorer (Jan 28, 2022)
- ↑ Polkassembly (Jan 28, 2022)
- ↑ Polkassembly (Jan 28, 2022)
- ↑ Polkassembly (Jan 28, 2022)
- ↑ Polkassembly (Jan 28, 2022)
- ↑ Polkassembly (Jan 28, 2022)
- ↑ Polkassembly (Jan 28, 2022)