DYdX Pledge Contract Bug

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Revision as of 15:26, 27 January 2023 by Azoundria (talk | contribs) (Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/dydxpledgecontractbug.php}} thumb|DYdXThe audited dYdX contract was launched with an incorrect ratio, which prevented users from performing withdrawals as anticipated. Funds were locked in the smart contract, and all are recoverable. This is a global/international case not involving a specific country. == About DYdX == "Perpetuals, decentralized." "Trade Perpetual Contracts wit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

DYdX

The audited dYdX contract was launched with an incorrect ratio, which prevented users from performing withdrawals as anticipated. Funds were locked in the smart contract, and all are recoverable.

This is a global/international case not involving a specific country.

About DYdX

"Perpetuals, decentralized." "Trade Perpetual Contracts with low fees, deep liquidity, and up to 25× more Buying Power. Deposit just $10 to get started."

"We built the fastest and most powerful decentralized exchange ever." "Once you deposit to Layer 2, you will no longer pay fees to miners for each transaction." "Trades are executed instantly and confirmed on the blockchain within hours." "Unlike other platforms, there is no wait required to withdraw your funds from Layer 2." "We've redesigned our exchange from the ground up, so you can use it from any device." "StarkWare's Layer 2 solution provides increased security & privacy via zero-knowledge rollups." "Access leverage across positions in multiple markets from a single account."

"During the deployment of the upgradeable smart contract, the dYdX security module made an error, which caused the ratio of DYDX to stkDYDX to change from 1 to 0, so that users who pledged DYDX did not receive stkDYDX. dYdX stated that the error was caused by an error in the smart contract deployment process. It believed that there was no error in the code itself. The security module was previously audited by the smart contract, and based on the liquidity module design, the design was also audited. The security module is thoroughly tested before deployment."

"Twitter netizen "mhonkasalo" stated that there was a bug in the dYdX pledge contract. The user received 0 stkDYDX when pledged, the front end was disabled, and there were 64 affected addresses."

"There's a bug in the dYdX staking contract (users receiving 0 stkDYDX in return for staking)." "Frontend is now disabled."

"[T]heres probably a reimbursement incoming for those affected, its only 153,611 DYDX"

"Later, dYdX released the "Pledge Contract Bug" incident report."

"After the Safety Staking Pool launch, we discovered an error in the deployment process for the Safety Staking Pool smart contract. In response, access to the Safety Pool was temporarily removed."

"The error will necessitate a smart contract upgrade to be passed through a DYDX governance vote during the first epoch. The team is working on open sourcing a fix for the contract that the community can choose to deploy."

"The design of the Safety Staking Pool included deposits being locked for a minimum of 1 epoch (28 days). Assuming an upgrade proposal can be passed within the next week, no user impact will have occurred, & the few early stakers will still be able to withdraw their funds on time."

"Governance may also decide if or how to compensate the few early stakers for the rewards they should have received. No compensation for deposited funds should be necessary as the funds are not at risk."

"As always, all our smart contracts adhere to the highest security standards: 100% test coverage and full audits. We will be sharing a full post-mortem soon, and look forward to working with the community to resolve the situation with no user impact."

"At present, user funds are safely locked in the security module until the end of the 28-day epoch, and no security module rewards are distributed and no withdrawals are possible. In order to restore the contract function, an upgrade is required. The suggested solution is to restore the security module function, allow the pledged user to retrieve the funds, and compensate the user for the wrong reward for participating in the security module."

"No user funds are at risk. All funds are recoverable."

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.

Key Event Timeline - dYdX Pledge Contract Bug
Date Event Description
September 9th, 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 $1,992,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?

Prevention Policies

Which policies could have prevented this event from happening?

References

SlowMist Hacked - SlowMist Zone (Jun 25)

@mhonkasalo Twitter (Dec 5)

@dydxfoundation Twitter (Dec 5)

Commonwealth (Dec 5)

InitializableAdminUpgradeabilityProxy | 0x65f7ba4ec257af7c55fd5854e5f6356bbd0fb8ec (Dec 11)