Security Risks of Connecting MPC Wallets to dYdX: A Comprehensive Analysis

·

In the fast-evolving world of decentralized finance (DeFi), security remains the cornerstone of user trust and asset protection. As more users adopt Multi-Party Computation (MPC) wallets for enhanced control and shared custody, interactions with decentralized applications (dApps) like dYdX introduce new attack surfaces that demand rigorous scrutiny. This article dives deep into the security vulnerabilities arising when MPC wallets connect to dYdX, focusing on a critical issue known as signature-derived key risk.

We’ll explore how seemingly innocuous design choices in dApp authentication can inadvertently undermine core security principles—especially for institutional and multi-user setups relying on MPC technology. By understanding these risks, users and developers alike can make informed decisions to safeguard digital assets.


Understanding the Core Mechanism: Signature-Derived Key Risk

At the heart of this vulnerability lies a concept Safeheron Security Team has identified and termed Signature-Derived Key Risk—a scenario where cryptographic signatures, once generated, are reused not just for authentication but as seeds for deriving long-term secret keys.

In the case of dYdX, the platform uses Ethereum Layer 1 (L1) wallet signatures to deterministically generate two critical components:

These keys are derived from fixed signatures produced via eth_signTypedData_v4—specifically:

Because most EVM-compatible wallets follow RFC6979, which ensures deterministic ECDSA signatures, the same input always produces the same signature. This predictability enables dYdX’s recovery mechanism—but also creates a security loophole.

👉 Discover how secure wallet architectures can prevent unauthorized access today.


How dYdX Derives Keys: A Step-by-Step Breakdown

The current key derivation flow in dYdX operates as follows:

  1. The user signs a typed message "dYdX STARK Key" using their L1 wallet, generating _stark_key_signature.
  2. The user signs another message "dYdX Onboarding", producing _api_key_signature.
  3. Locally, the client derives the STARK Key pair from _stark_key_signature.
  4. Similarly, the API Key material is derived from _api_key_signature.
  5. On first use, the public STARK Key and _api_key_signature are sent to dYdX’s /v3/onboarding endpoint for registration.

Once this process completes, anyone in possession of these two signatures can re-derive both keys independently, without ever needing access to the original private key or further wallet approvals.

This means:
✅ No additional signing required
✅ No hardware wallet interaction needed
❌ Full control over dYdX account operations

Mist Labs (formerly known as SlowMist) has confirmed that possessing these signatures allows full manipulation of a user’s dYdX assets—including placing trades and initiating L2 transfers.


Critical Security Implications

1. Bypassing Hardware Wallet Protection

Hardware wallets (cold wallets) are designed to keep private keys offline and secure. However, signatures themselves are not treated as secrets—they’re routinely broadcast on-chain and considered public data.

When dYdX uses these signatures as key material, they become de facto secrets. Once leaked—via browser logs, memory dumps, or malicious extensions—an attacker gains permanent access to the user’s dYdX account, completely bypassing the hardware wallet’s security model.

This undermines one of the primary reasons users choose cold storage: physical isolation from online threats.


2. Breaking the Self-Custody Principle in MPC Wallets

MPC wallets distribute private key shares among multiple parties (e.g., team members or devices), requiring collaboration to sign transactions. Protocols like GG18, GG20, and MPC-CMP ensure no single party ever holds the full key.

However, in standard MPC implementations:

But because dYdX relies on deterministic signatures, any MPC node that participated in the initial authorization will retain a copy of _stark_key_signature and _api_key_signature. That single node can then:

This violates the fundamental promise of MPC-based self-custody: platforms should never gain unilateral control over user assets.

For organizations, this poses serious operational risks:


3. Asset Loss Risk for Non-RFC6979 Wallets

Not all wallets follow RFC6979. Some browser-based or WalletConnect-integrated wallets use random k-values during signing. In such cases:

Result? After closing the browser or switching devices, users lose access to their dYdX account—even with the correct L1 wallet.

While recovery via Ethereum Key Authentication exists, it’s complex and inaccessible to most non-technical users.


Frequently Asked Questions (FAQ)

Q: Does this vulnerability affect all MPC wallets?

A: Yes, any MPC wallet that participates in deterministic signing for dApps like dYdX is potentially exposed. The risk stems from protocol design, not individual implementations.

Q: Can hardware wallets fully protect me on dYdX?

A: Not in the current setup. Once signatures are extracted post-authorization, hardware wallets are no longer involved in subsequent operations.

Q: Is my mainnet ETH at risk?

A: No. This issue is confined to dYdX’s L2 environment. Your L1 assets remain safe as long as your private key isn’t compromised.

Q: How can I recover access if I lose my derived keys?

A: Use Ethereum Key Authentication to force withdrawal. However, this requires advanced technical knowledge and may involve manual transaction crafting.

Q: Are there alternatives to dYdX’s current key derivation method?

A: Yes. Native support for STARK curve in wallets would allow direct key management without relying on signature derivation—a more secure long-term solution.

👉 Explore next-gen custody solutions that align with evolving DeFi protocols.


Recommended Mitigation Strategies

1. Redesign dApp Authentication with Wallet Integration

Ideally, dApps like dYdX should:

This keeps secret material within trusted execution contexts and restores user sovereignty.


2. MPC Platforms Should Temporarily Block High-Risk dApps

Until safer integration models exist, MPC wallet platforms should:

Safeheron and other leading MPC providers are already implementing such safeguards.


3. Develop MPC-Specific ECDSA for STARK Curve

To enable secure multi-party management of STARK Keys, a dedicated MPC-ECDSA implementation supporting StarkEx’s curve is essential. Safeheron is actively developing and plans to open-source this protocol, enabling institutions to manage dYdX assets securely without compromising custody principles.


4. Enforce RFC6979 Compliance at Connection Time

dApps must verify that connecting wallets produce deterministic signatures. If not:


Final Thoughts: Toward a Safer Web3 Ecosystem

The discovery of signature-derived key risks highlights a broader challenge in Web3: interoperability should never come at the cost of security. While dYdX’s approach simplifies key recovery, it inadvertently weakens protections for advanced users relying on MPC or hardware wallets.

Thankfully, proactive collaboration between security teams (like Safeheron and SharkTeam), protocol developers, and wallet vendors is underway. dYdX has already paused certain L2 functionalities to reduce exposure, and industry players are working toward standardized interfaces for cross-chain key management.

As Web3 adoption grows, so must our commitment to robust, transparent, and user-first security practices.

👉 Stay ahead of emerging threats with cutting-edge crypto security tools and insights.


Core Keywords: