Level Finance Gets Leveled

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Revision as of 14:33, 5 May 2023 by Azoundria (talk | contribs) (Another 30 minutes.)
Jump to navigation Jump to search

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.

Level Finance

Level Finance is a decentralized perpetual exchange that offers innovative liquidity solutions and risk management for BTC, ETH, BNB, and stablecoins. Recently, the platform suffered an attack where $1.1 million in referral rewards were stolen due to a bug in the LevelReferralControllerV2 contract, allowing for repeated reward claims to be processed. The attacker used flash loans to create referrals and increase their reward tier, draining 214k LVL tokens, which were swapped for 3,345 BNB. Losses were contained to the referral program, with Treasury funds and LP remaining safe. The funds remain in the attacker's address.

About Level Finance

Level is a decentralized perpetual exchange that combines functional risk management and innovative liquidity solutions. The platform allows users to manage their exposure with just 1/50th collateral, and features a virtually zero slippage and low fee perpetual AMM for leveraged trading in BTC, ETH, BNB, and stablecoins. Level also offers user-elected credit exposure frameworks for liquidity providers, complete transparency, and generates revenue from trading and lending natively in cryptocurrency. The platform is designed to be permissionless with fully transparent open-source smart contracts on BNB Chain. The platform has a user-owned decentralized perpetual exchange and two tokens: the LVL utility token, which is earned via participation on the platform and staked for governance, and the LGO governance token, which is used to make major decisions relating to the platform via voting on the Level DAO[1].

"On-Demand Liquidity Meets Bespoke Risk Management. A Decentralized Perpetual Exchange with Functional Risk Management and Innovative Liquidity Solutions."

"Maximize Your Strategy. Manage your exposure with just 1/50th collateral. Best in kind perpetual AMM with virtually zero slippage and low fees."

"Leveraged Trading. Innovative liquidity solution for BTC, ETH, BNB, and stablecoins."

"Programmable Risk. Define your risk. Level offers an innovative user-elected credit exposure framework for liquidity providers."

"Complete Transparency. No custody, no accounts. Level is designed to be permissionless. Fully transparent open source smart contracts on BNB Chain"

"Real Yield. Revenue from trading and lending generates income natively in the cryptocurrency transacted."

"Decentralized Leadership. First of a kind user owned decentralized perpetual exchange."


"Yesterday, $1.1M in referral rewards were robbed from the BSC-based perps platform."

"The alarm was raised by definalist (whilst the attack was still ongoing) and confirmed two hours later by the Level Finance team."

"Luckily, the losses were contained to the project’s referral programme, with Treasury funds and LP both safe."

"The hacker dumping LVL tokens for BNB initially crashed the price by 65%, though this has mostly recovered since."

"Level Finance’s LevelReferralControllerV2 contract contained a bug which allowed for repeated referral reward claims to be processed within the same epoch."

"The exploiter prepared the attack by creating many referrals and using flash loans to make swaps, thereby increasing their reward tier."

"In total, 214k LVL tokens were drained by the exploiter, who swapped them for 3,345 BNB, worth approximately $1.1M at the time of writing. The funds currently remain in the attacker’s address."

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.

Key Event Timeline - Level Finance Gets Leveled
Date Event Description
April 23rd, 2023 11:11:16 PM MDT Attacker Withdraws From TornadoCash The exploiter withdraws 100 ETH from TornadoCash[2].
April 24th, 2023 7:40:20 AM MDT Funds Moved Between Wallets The exploiter moves their funds from the TornadoCash receive wallet to their attack wallet[3][4].
April 24th, 2023 7:43:32 AM MDT Malicious Smart Contract Created The attacker creates a smart contract for their initial attack attempt[5].
April 24th, 2023 7:52:59 AM MDT Initial Attack Attempted The same attacker[4] attempted a similar attack against the Level Finance protocol a week earlier[6][7], but failed[8]. "[An] attack was initially attempted over a week ago, but it seems nobody noticed."
April 24th, 2023 8:00:05 AM MDT Attacker Gives Up After 3 more failed attempts (4 in total) to use the malicious smart contract he'd created, the attacker appears to give up[9].
May 1st, 2023 7:11:15 AM MDT Guess Who's Back? The attacker is back active again, with their first transaction upon returning[10]. TBD - Need to understand this transaction better.
May 1st, 2023 11:47:32 AM MDT Malicious Smart Contract Creation The attacker creates a new version of the smart contract to launch the attack with[11]. TBD what's the difference between the first and second smart contract?
May 1st, 2023 11:50:41 AM MDT First Malicious Transaction The first malicious attacker transactions occurred[12]. TBD more details.
May 1st, 2023 12:53:00 PM MDT Definalist Tweet About Hack Twitter user Definalist announces that Level Finance "is currently under attack from hackers" who are "currently withdrawing LVL tokens in increments of 15,000 using the delegate function"[13].
May 1st, 2023 1:33:21 PM MDT Attacker Moves Funds The attacker moves his funds to a second wallet[14]. TBD Double check this transaction.
May 1st, 2023 2:54:00 PM MDT Twitter Announcement Level Finance first posts about the issue on Twitter. They report an exploit that targeted the Referral Controller Contract. The attacker drained 214k LVL tokens, worth approximately $1.1M, and swapped them for 3,345 BNB. The exploit was isolated from other contracts, and LP's and DAO treasury were unaffected. A fix is expected to be deployed in the next 12 hours, and more details will be provided[15].
May 2nd, 2023 12:46:00 PM MDT Remediation Proposal Announced The Level Finance team posts a proposed remediation[16]. The team states they have already taken steps to secure the contract, and a fix will be pushed once the timelock expires. The team has proposed three options to minimize the impact on the community, including conducting a special auction to burn LVL tokens, creating a special LVL auction, and committing the DAO's treasury to buy or burn LVL tokens. LGO token holders are eligible to vote on the proposed options. Going forward, the team will place an emphasis on DevOps and OPSEC to minimize future attacks[17].
May 2nd, 2023 2:54:00 PM MDT Rekt News Report The incident is reported on Rekt.news[18]. The news report states that on May 2, 2023, the Binance Smart Chain-based DeFi platform, Level Finance, suffered a hack that drained $1.1 million in referral rewards from its LevelReferralControllerV2 contract. The attacker used flash loans to increase their reward tier, and their successful attack went unnoticed for a week. The attack resulted from a bug in the contract that allowed repeated claims within the same epoch. The hack initially caused a 65% drop in LVL's price, but it has mostly recovered since. The incident highlights the need for improved on-chain monitoring systems to prevent future attacks on DeFi protocols[6].

Technical Details

This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?

Total Amount Lost

The total amount lost has been estimated at $1,802,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?

Initial Posts on Twitter By Level Finance

Level Finance announced the exploit on Twitter shortly after it occurred[15].

An exploit targeted our Referral Controller Contract.

- 214k LVL tokens drained to exploiters address.

- Attacker swapped LVL to 3,345 BNB

- Exploit was isolated from other contracts.

- Fix to be deployed in 12 Hrs.

- LP's and DAO treasury UNAFFECTED.

More details to follow.

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

There do not appear to have been any funds recovered in this case.

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?

Individual Prevention Policies

No specific policies for individual prevention have yet been identified in this case.

For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.

Platform Prevention Policies

Policies for platforms to take to prevent this situation have not yet been selected in this case.

For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.

Regulatory Prevention Policies

No specific regulatory policies have yet been identified in this case.

For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.

References

  1. Level - Decentralized Perpetual Exchange (May 3, 2023)
  2. TornadoCash Withdrawal of 100 ETH By Attacker - BscScan (May 5, 2023)
  3. Attacker Shifting Funds To Attack Wallet - BscScan (May 5, 2023)
  4. 4.0 4.1 Level Finance Attacker's Address - BscScan (May 5, 2023)
  5. Attempted Malicious Smart Contract Creation - BscScan (May 5, 2023)
  6. 6.0 6.1 Rekt - Level Finance - REKT (May 3, 2023)
  7. BlockSecTeam - "@Level__Finance was reported to be hacked due to the lack of checks of repeated items for the array argument of the vulnerable function." - Twitter (May 5, 2023)
  8. First Attempt At Exploit - BscScan (May 5, 2023)
  9. Attacker's Fourth Failed Attempt - BscScan (May 5, 2023)
  10. Attacker Returns With Another Transaction - BscScan (May 5, 2023)
  11. Attacker Creates Final Smart Contract - BscScan (May 5, 2023)
  12. Binance Transaction Of Exploit - BscScan (May 3, 2023)
  13. Definalist - "Looks like @Level__Finance is currently under attack from hackers. Hacker created an unverified contract 7 days ago and are currently withdrawing LVL tokens in increments of 15,000 using the delegate function. The hacker's source of funds came from Tornado Cash." - Twitter (May 5, 2023)
  14. Attacker Transferring His Funds From The Attack Wallet - BscScan (May 5, 2023)
  15. 15.0 15.1 Level__Finance - "An exploit targeted our Referral Controller Contract. 214k LVL tokens drained to exploiters address." - Twitter (May 3, 2023)
  16. Level__Finance - "Remediation for Referral reward exploit DAO proposal." - Twitter (May 3, 2023)
  17. Remediation for Referral reward exploit - Level DAO - May 2nd, 2023 (May 3, 2023)
  18. RektHQ - "@Level__Finance got levelled. $1.1M in referral rewards were robbed from the BSC-based perps platform yesterday." - Twitter (May 3, 2023)