Hundred Finance WBTC Optimism Exploit
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!
Hundred Finance is a multi-chain lending protocol that allows users to borrow and lend assets in a decentralized and economically efficient manner. It was audited by WhiteHatDAO in Feb 2022. The platform integrates with Chainlink oracles to ensure market health and stability. The distribution of HND, its governance token, is ongoing to broaden the ownership of the governance token and the platform's usage. The platform aims to expand to multiple chains in order to deliver its decentralized financial services as widely as possible. However, on April 15th, Hundred Finance suffered a $7.4M exploit on Optimism due to the attacker manipulating the exchange rate by donating a large amount of WBTC to the hWBTC contract. The root cause appears to be the same reentrancy mechanism that hit CREAM Finance in August 2021. Hundred Finance launched a $500k reward for information leading to the attacker's arrest and the return of all funds.
This is a global/international case not involving a specific country.[1][2][3][4]
About Hundred Finance
Hundred Finance is a multi-chain lending protocol that allows users to borrow and lend assets in a trustless and secure manner. It uses veHND model and integrates with Chainlink oracles to ensure market health and stability. The platform was first launched on Ethereum's Kovan testnet in late June 2021, and after extensive testing, it was soft-launched on the Ethereum mainnet. The fully-enabled Arbitrum version of the Hundred Finance dApp was then deployed, and the distribution of HND began. A vote-escrow governance token mechanism was implemented in December 2021, facilitating direct community involvement in the emission of HND through stablecoin staking contracts known as gauges. The platform is currently implemented on several chains, including Ethereum, Arbitrum, Fantom, Harmony, Moonriver, Gnosis Chain, Optimism, and Polygon. Hundred Finance aims to expand to multiple chains to deliver its financial services as widely as possible. Users can access the platform through its integration with compatible Web3 wallets, and the core functionality of the platform remains the same across different chains, although assets, interest rates, and transaction costs may vary[5][6][7].
"The goal of Hundred Finance is to expand to multiple chains in order to deliver its decentralized and economically efficient financial services as widely as possible. The Hundred Finance dApp grants users access to these networks through its integration with compatible Web3 wallets. Users are able to select the network they wish to interact with from the platform’s main page, an action that will automatically trigger the selection of the correct network by their browser-integrated Web3 wallet. While the platform maintains the same core functionality independent of the chain, assets, interest rates and other variables, such as transaction costs, differ between them."
Hundred is a Compound fork which uses hTokens to track lending positions. It was audited in Feb 2022 by WhiteHatDAO[1].
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.
"Shortly after 2pm UTC on April 15th, Hundred Finance suffered a $7.4M exploit on Optimism."
| Date | Event | Description |
|---|---|---|
| April 15th, 2023 8:12:00 AM MDT | First Exploit Transaction | The first exploit by the contract attacker[8]. |
| April 15th, 2023 8:12:30 AM MDT | Second Exploit Transaction | The second exploit transaction by the contract attacker[9]. |
| April 17th, 2023 10:10:00 AM MDT | Negotiations With Attacker | Hundred Finance announces on Twitter that they haven't got any response in 48 hours since starting negotiations with the attacker[10]. |
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?
"[T]he attack vector was the same reentrancy mechanism which hit CREAM Finance in August 2021."
"The root cause appears the attacker donates 200 WBTC to inflate hWBTC's exchange rate so that even a tiny amount (2 wei) of hWBTC can basically drain current lending pools."
"It looks that Hundred got hacked on #Optimism. We will update when there is more information to it."
"The root cause is that the attacker can manipulate the exchangeRate by donating a large amount of WBTC to the hWBTC contract.
In the getAccountSnapshot function, the value of exchangeRateMantissa relies on the amount of WBTC in the contract.
The attacker flashloaned 500 $WBTC, then called the redeem function to redeem the previously staked 0.3 WBTC.
Next, the attack contract 1 sent 500.3 WBTC to attack contract 2. Contract 2 used 4 BTC to mint 200 hWBTC. The redeem function was then called to redeem the 4 BTC.
Here the attacker can redeem the 4 WBTC previously staked with less than 200 hWBTC. At this point the attacker had a very small amount of hWBTC left on contract 2.
Attack contract 2 then sent 500.3 WBTC to the hWBTC contract and borrowed 1021.91 ETH via the remaining 2 hWBTCs.
Finally the attack contract 2 repaid the previous debt by using 1 hWBTC, and withdrew 500.3 WBTC from the contract."
Total Amount Lost
The total amount lost has been estimated at $7,400,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?
Attempted Negotiation With The Attacker
"48h passed since we sent an on-chain message to the hacker and tried to start negotiations with him.
Today we are launching a $500k reward in the hope that this provides additional incentive for info that leads to the Hundred attacker’s arrest and the return of all funds."
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.0 1.1 Rekt - Hundred Finance - REKT 2 (May 3, 2023)
- ↑ @HundredFinance Twitter (May 3, 2023)
- ↑ @peckshield Twitter (May 3, 2023)
- ↑ @BeosinAlert Twitter (May 3, 2023)
- ↑ Hundred Finance Homepage (May 3, 2023)
- ↑ Hundred Finance Documentation (May 3, 2023)
- ↑ Multi-Chain Implementation - Hundred Finance Documentation (May 3, 2023)
- ↑ Optimistic L2 Exploit Transaction 1 - Optimism (May 3, 2023)
- ↑ Optimistic L2 Exploit Transaction 2 - Optimism (May 3, 2023)
- ↑ HundredFinance - "48h passed since we sent an on-chain message to the hacker and tried to start negotiations with him." - Twitter (May 3, 2023)