Bent Finance Malicious Balance Injection
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' and 'General Prevention' sections 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 Bent Finance platform suffered from a malicious injection during the development of their smart contract hot wallet. This resulted in one of the developers giving themselves a very large balance, which was not discovered for 20 days. The malicious developer was eventually convinced to return the stolen funds, and the community made up the difference which occurred based on the value falling.
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]
About Bent Finance
"Bent is a staking and farming platform to enhance your curve returns, by the people for the ppl."
"Like CVX, BENT has been developed by an “anon team” and is more or less to CVX what CVX is to CRV, this is how it works: Anon will deposit stables to Curve but not “stake in gauge”. Instead of staking these Curve LP tokens in Convex, they stake them in BENT which yields out all of the Convex rewards they would have received by directly staking on Convex minus 17% (more on this below) plus this yields a healthy amount of BENT, which will make up for and more than the 17% slash. Keep in mind this system is emulated from convex which itself takes a 17% clip from crv deposits."
"Anon can also stake in the DAI/BENT pool on Sushi Swap for happy rewards or participate in BENT staking or CVX staking. CVX staking will be used to vote on the Convex Gauge and controlled by the BENT stakers. Fun right? The end result here is by staking your Curve LP or CVX into BENT instead of Convex you will yield more and this allows BENT stakers to effectively get a piece to control the Curve Gauge vote in a practical manner."
"For the 17% slash on Convex rewards, it is pretty simple, 10% goes to the CVX stakers (got to keep them fat and happy) 6% to the BENT stakers and 1% to the harvester. So the entire system is a decentralized perpetual flywheel."
"Bent Finance contracts were deployed without multisig wallet contract ownership."
"In December 2021, Bent Finance was the victim of an internal attack. A rogue developer inserted a backdoor into the contract that later allowed them to extract 513k cvxcrv LP tokens from it." "Bent Finance first realized [an] exploit on Monday[, December 20th] at roughly 8:55 pm EST, a timeline when the company reported no loss of funds."
"What happened was that a few days ago BENT went live on debank and in that, community members were able to see the amount of “deposits” of various tokens. This showed one wallet with a balance of over half a billion dollars of CVXCRV and nearly the same MIM. This balance wasn’t real, but it “fooled” the contract that effectively allowed them to withdraw other peoples tokens until the pool was drained."
"There is a possible exploit. [W]e have disabled claims, you will not be able to claim rewards at the moment. [W]e are investigating the curve LP pools, if you want to be safu, you can withdraw it now. We will update you as soon as we know more, as of now, no funds have been lost."
"[A]ccording to Joe McGill - the founder of a digital currency risk and advisory company CyChain, and former cyber and cryptocurrency investigator at US Secret Service - an attacker has been funnelling approximately 440 ethereum (ETH) (USD 1.78m) since December 12 after they had "funded one of the primary wallets via TornadoCash cash deposits" on December 9."
"However, the community suspected a rug-pull event when blockchain investigator PeckShield allegedly located the source of the hack transactions."
"Most recently, the Bent Finance team said that there was an exploit from the bent deployer address, which added various amounts of Convex CRV (cvxCRV) and Magic Internet Money (MIM) to "an address on an unverified update 20 days ago.""
"As the Bent Finance dev team ramped up security processes by migrating contract ownership to multisig wallets, there was a brief timeframe when a rogue dev had the opportunity to inject an exploit on 2 pools. This happened 3 days before multisig wallets were in place and, therefore, the dev would never have the opportunity again."
"In the process of burning the proxy and tightening security (kek) “someone” had slipped an unverified contract update in before updating to the next verified contract. This update hardcoded half a billion dollars in deposits they didn’t actually own, allowing them in the future to drain the pools whenever they liked."
"[T]he BENT Team consists of numerous full time core team members including swisshed, ape, santonicle and conrad plus a few others in support roles. Also the CTO had employed a “dev” on various projects for some time. This dev had worked with him for sometime in a support role. Well, as it happens, sir dev was shared the private keys to the deployer, in order to do the updates and during this time, dev slipped in the exploit."
"The attacker targeted Bent Finance’s cvxcrv and mim pools and performed a series of updates to the contracts. The goals of these updates were to hardcode a balance for a particular account via a backdoor and then conceal this modification by updating the contract with a non-backdoored version after the balance had been updated."
"The attacker’s modifications to the code assigned a balance of 100000001000001 * 10^12 to address 0xd23cfffa066f81c7640e3f0dc8bb2958f7686d1f. Once the contract’s balances were updated, replacing the backdoored code with a clean version has no impact on this balance. This allowed the attacker to later withdraw this liquidity from the cvxcrv pool, draining it."
"There was an exploit from the bent deployer address, it added balance of cvxcrv and mim to an address on an unvierifed update 20 days ago. We just discovered this today. There are multiple members on this team and we will make this right." "We recommend you withdraw all funds until it is clear."
"The BENT coin dropped more than 70% in a single day." "The price of the native BENT token has plummeted since the attack was announced and is still 73% in the red on that day. The token is currently trading at $ 4.12, down 74% from the all-time high of $ 15.9 set on December 19, 2021."
"“We came to the same conclusion and are working on it,” said Bent Finance as the team appointed two independent white hat developers to better understand the current situation. The company confirmed shortly thereafter:
“Twenty days ago there was an exploit from the developer address Bent that added cvxcrv and mim balances to an address in an unverified update. We only discovered that today. There are many members of this group and we will take appropriate action.”
"Bent Finance continues to advise its pool investors to withdraw funds until mining is fully completed. However, the company has confirmed it will get back any funds stolen from the Bent pool."
"Rouge dev has been passed on to relevant authorities as the investigation continues." "As of now the 513k cvxcrv LP has been stolen , we are working to recover this directly from the rogue dev, if we are unable, we will institute a plan for community recovery. If you have been effected , please get in contact with @swishedd in the discord or telegram."
"What happened next was a few days of “interesting things” but we can say that the exploiter agreed to return the funds to the multisig at 0xaBb8B277F49de499b902A1E09A2aCA727595b544."
"Now since he dumped the curve at the bottom and it has been pumped since, and sent us ETH and DAI, we came a little short, but have worked it out.To date, we have raised an additional 200,000 cvxcrv ~ ($1M) from the community to help plug the gap. Also you can see what we did to patch access so nothing like this can happen again here."
[As of December 24th,] "[w]e have recovered lost funds from the exploit and made it right." "You can see the reimbursement of lost funds for 512,696.06482288612 cvxcrv-f paid in full."
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 |
|---|---|---|
| December 21st, 2021 | Main Event | Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here. |
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,780,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
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?
General Prevention Policies
Audits need to be performed after the smart contract is fully deployed, and should include an investigation of the balances which are present.
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
- ↑ Rekt - Bent Finance - REKT (Jan 3, 2022)
- ↑ https://app.bentfinance.com/ (Jan 3, 2022)
- ↑ Audits - Hacken (Jan 3, 2022)
- ↑ https://docs.bentfinance.com/general-information/how-to-bent (Jan 3, 2022)
- ↑ Bent Finance confirms pool exploit, advises investors to withdraw funds (Jan 3, 2022)
- ↑ @peckshield Twitter (Jan 3, 2022)
- ↑ @BENT_Finance Twitter (Jan 3, 2022)
- ↑ @BENT_Finance Twitter (Jan 3, 2022)
- ↑ Ethereum Transaction Hash (Txhash) Details | Etherscan (Jan 3, 2022)
- ↑ @BENT_Finance Twitter (Jan 3, 2022)
- ↑ 6th Hack This Month Confirmed: Bent Finance Asks Investors to Withdraw all Funds (Jan 3, 2022)
- ↑ @joes_mcgill Twitter (Jan 3, 2022)
- ↑ Bent Finance Becomes 6th Hacked Platform In December, BENT Price Down 73% - CoinCu News (Jan 3, 2022)
- ↑ Santa Hackathon? Visor Finance Marks 7th Hack in December (Dec 1, 2022)