Back to Blog

Code Like a Mammal: Undestanding Perpetual Trades

Evolve to stay a step ahead.

Boyd Stowe
October 15, 2025

Table of Contents

One of the best mentors I ever had told me a long time ago: in high tech, if you're standing still, you're already falling behind.

This blog isn't really about dinosaurs, Douglas Adams references, mammals, or comets—it's about change and how standing still means you get left behind.

Dinosaurs, Mammals, and the Rise of Intelligence

65 million years ago, dinosaurs ruled the Earth. They had been the dominant species for hundreds of millions of years. Then a massive ball of iridium and iron smashed into the planet.

Earth froze into a snowball, and cold-blooded species couldn’t survive. It would not have mattered if they had brains the size of a planet—their era was over.

From the ashes, mammals began to rise. It wasn’t just that mammals were warm-blooded— it was that they were data-processing machines. They evolved from tiny mouse-like creatures into the OI, the “Original Intelligence” that dominates Earth today.

What made mammals different was their ability to ingest huge amounts of information, filter out what wasn’t immediately needed, analyze it in real time, adapt to changing conditions, and retain knowledge for future use. Access to essential information was crucial for their survival and dominance, enabling them to make the right decisions in rapidly changing environments. No animal before them had that combination.

You can see this in action:

  • Humans process massive streams of sensory input, make decisions instantly, and carry forward those lessons through memory, language, and culture. That ability has taken us from stone tools to space travel in the blink of evolutionary time.
  • Dolphins use advanced communication and echolocation to interpret thousands of data points in their environment, adapting strategies for hunting or navigation while passing techniques from one generation to the next.
  • Bats rely on rapid-fire echolocation, ingesting and analyzing signals in milliseconds to catch insects mid-flight in total darkness—a perfect example of real-time adaptation.

This capacity to combine speed, adaptability, and memory is what allowed mammals to rise and dominate where dinosaurs could not.

So, What Are Perpetual Futures???

Perpetual trading (with the unfortunate abbreviation “perps”) is the financial world’s version of a game that never ends. Unlike traditional futures contracts, there’s no expiration date — no “see you next quarter” moment. Traders can open and hold positions indefinitely, adjusting them in real time as markets move.

Instead of rolling over contracts or watching them expire into awkward settlements, perpetuals stay… well, perpetual. Perpetual contracts are traded on leading exchanges, which provide the infrastructure for real-time pricing and liquidity. Prices stay anchored to the spot market through a clever mechanism called the funding rate — small periodic payments between long and short traders that keep the system balanced. Accurate pricing is critical for maintaining the balance between long and short positions.

The result? A 24/7, self-stabilizing, high-velocity marketplace where liquidity never sleeps. Daily trading volumes in perpetual futures often reach billions of dollars across major cryptocurrency exchanges. It’s Wall Street meets esports: fast, continuous, and ruthlessly efficient.

Big Data: The Dinosaur of Perp Trading

In technology, Big Data has played the role of the dinosaur. It gave us incredible advantages. It powered breakthroughs in e-commerce personalization, fraud detection, medical research, and supply chain optimization.

But in perpetual trading, Big Data shows its limits. It can analyze massive amounts of historical data, but it doesn't adapt in real time.

  • By the time Big Data flags unusual funding rate patterns, the arbitrage window has already closed.
  • By the time liquidation cascades are spotted, the market has already dumped.
  • By the time slippage risk is measured, the order book has already moved.

In perpetual swaps—where markets shift in milliseconds—Big Data reacts too slowly. Like the dinosaurs, it's powerful, but not adaptive enough for the new environment.

Generative AI: Toddler or Einstein?

So what’s the “new species” everyone points to? Generative AI.

People imagine it as an Einstein-level intelligence: ask it anything, and it will produce the right answer. But in reality, it’s closer to a drooling toddler without the right inputs.

The single most important aspect of intelligence is wisdom—the ability to recognize when you don’t know the answer. Generative AI literally won’t say “I don’t know the answer’. Instead, it makes something up. That’s what we call hallucinations.

In trading, hallucinations aren’t harmless—they’re expensive. An AI that “guesses” a price level or misreads sentiment can cost millions in seconds. Strategies or models that look promising on paper often fail when not grounded in real, validated data.

Which is why context is everything.

Context Lake: The Mammal of Perp Trading

If Big Data is the dinosaur, Context Lake is the mammal. Like humans, dolphins, and bats, a Context Lake can:

  • Ingest massive flows of on-chain, off-chain, and exchange data continuously, leveraging cloud-based infrastructure for scalable, secure, and efficient data processing.
  • Filter out what is noise and pass on what is needed.
  • Analyze and adapt in real time, spotting liquidation risks, funding arbitrage opportunities, or whale movements as they happen.
  • Retain knowledge, allowing the system to compare today’s volatility to prior events and adjust strategy instantly.
  • Facilitate collaboration among trading teams through real-time data sharing and version control, improving teamwork and decision-making.

This is what generative AI needs in trading. Without the right context, it hallucinates. With a Context Lake feeding it real-time signals, it can react with precision and execute strategies before the window closes. Maintaining critical security standards is essential for protecting trading strategies and data, making Context Lake a robust solution for the challenges of perpetual trading.

Trading Psychology: The Mammalian Mindset

In the wild world of perpetual futures, survival isn’t just about speed—it’s about mindset. The mammalian brain, honed by millions of years of evolution, is built to process threats and rewards in real time. That same wiring comes into play every time a trader stares down a volatile market, a sudden funding rate swing, or the relentless tick of a 24/7 order book.

Perpetual futures offer traders the ability to hold positions indefinitely, unlocking new levels of flexibility and liquidity. But with that freedom comes a unique set of challenges. Funding rates—where longs pay shorts and vice versa—can turn the market into a psychological battleground, triggering anxiety, impulsive trades, and costly mistakes. The key to thriving in this space is discipline: the ability to manage emotions, stick to a strategy, and make decisions based on real-time access to data, not gut reactions.

For companies and platforms, supporting this mammalian mindset means more than just fast servers and slick interfaces. It’s about building infrastructure that delivers operational efficiency, cost efficiency, and secure, compliant access to global markets. Regulatory compliance isn’t just a box to check—it’s a shield against existential risk. Archival data and robust records aren’t just paperwork; they’re the backbone of effective analysis, reporting, and strategy refinement.

In a market where contracts can be held indefinitely and liquidity never sleeps, the ability to streamline processes and minimize costs is crucial. One platform that unifies trading, data, and compliance can give users a decisive edge, eliminating the friction and inefficiency of juggling multiple tools. Customer experience becomes a competitive weapon—traders demand platforms that are intuitive, responsive, and secure, with real-time data and instant execution.

The perpetual futures market is fiercely competitive. To stay ahead, traders and companies alike must embrace the mammalian approach: adapt quickly, leverage technology, and manage risk with precision. That means investing in software and infrastructure that can scale, support, and secure every trade—no matter how wild the market gets.

Ultimately, trading is a high-stakes game where the ability to manage risk, leverage, and emotion separates the mammals from the dinosaurs. Companies that prioritize operational efficiency, regulatory compliance, and customer experience will lead the pack. In the world of perpetual futures, it’s not just about surviving—it’s about thriving, evolving, and staying one step ahead.

From Standing Still to Fast Trades

Dinosaurs dominated the Earth for millions of years, but they couldn't adapt when the world changed. Mammals could.

Big Data has dominated finance for decades, but in the world of perpetual trading, the environment has shifted. Markets move in milliseconds. Liquidations cascade in seconds. Arbitrage disappears in the blink of an eye.

What's needed now is the mammalian equivalent in tech: a system that can ingest, adapt, and provide the right context—fast enough to survive and thrive in perpetuals.

If you're standing still, you're falling behind.

At this point, if you're a technology executive and you don't need to understand the technical details, you can stop reading. Just remember: DON'T BE A DINOSAUR. If you stand still, your competition will eat you alive.

If you want more technical context, please keep reading.

A Developer’s View: Perps in a Context Lake

Here’s what it looks like in practice. A new order book event comes in:

What a single order book tick looks like

A new order book event arrives:

{
  "exchange": "Binance",
  "symbol": "BTC-PERP",
  "bid": 63985.50,
  "ask": 63987.20,
  "funding_rate": 0.00045,
  "open_interest": 2.5e7,
  "timestamp": "2025-09-25T10:42:17Z"
}

Why the usual pipeline is too slow

In a typical GCP setup, that tick often travels:

Pub/Sub → Dataflow → BigQuery → (maybe Pinecone) → trading engine

By the time it lands, the arbitrage window is usually gone.

Tacnode: one query, end-to-end

With Tacnode, the agent can run a single query that joins live and historical state, computes exposure, and scores risk in-line:

SELECT
  o.exchange,
  o.symbol,
  o.bid,
  o.ask,
  o.funding_rate,
  o.open_interest,
  SUM(p.size * p.price) FILTER (
    WHERE p.wallet_id = '0xABC123'
      AND p.timestamp > now() - interval '10 seconds'
  ) AS recent_exposure,
  1 - (o.embedding <=> $liquidation_patterns) AS risk_score
FROM orderbook o
JOIN positions p
  ON o.symbol = p.symbol
WHERE o.symbol = 'BTC-PERP'
   OR p.wallet_id = '0xABC123';

What that query is doing

  • Pulls the live order book, including open_interest for market positioning and leverage context.
  • Calculates recent exposure for a specific wallet over a tight time window.
  • Runs vector similarity against historical liquidation patterns to produce a risk_score.
  • Produces ML-ready features so the agent can decide whether this tick is signal or noise.
  • Supports retrieval of current + historical context for analysis, monitoring, and compliance workflows.

All in milliseconds.

Scoring relevance (example)

Once the query returns, you can score relevance like this:

ml_input = {
  "bid": 63985.50,
  "ask": 63987.20,
  "funding_rate": 0.00045,
  "open_interest": 2.5e7,
  "recent_exposure": 1.25e6,
  "risk_score": 0.92
}

relevance = ml_model.predict(ml_input)

The model might output:

{
  "relevance_score": 0.87,
  "action": "hedge_exposure"
}

Act on signal, ignore noise

So instead of reacting to every tick, the trading agent can:

  • Ignore noise when the relevance score is low.
  • Immediately hedge, arbitrage, or close when the score is high.

This makes the context lake not just a place for real-time joins, but a launch pad for in-the-loop ML that filters signal from noise as data arrives.

Conclusion: Code Like a Mammal

In perps, every millisecond counts. By the time your Pub/Sub job buffers, your arb edge is gone. By the time BigQuery aggregates, the liquidation cascade has already rippled through the book.

A Context Lake flips that equation: one query, live joins, embeddings in memory, and ML relevance checks in-the-loop. Instead of reacting after the fact, your trading agent filters noise, acts only on high-signal ticks, and executes before the window closes.

Perpetual data solutions like Tacnode’s Context Lake support business efficiency and secure operations by ensuring ongoing access, collaboration, and compliance. Customers benefit from real-time access, secure infrastructure, and additional services such as compliance tools and reporting platforms that enhance the core offering. Our focus is on delivering accurate, timely, and secure data to empower both trading platforms and businesses.

Adopting advanced data solutions can drive growth for trading platforms and businesses, enabling them to scale and compete effectively. Choosing perpetual data technology is like the purchase of a long-term asset—an investment that delivers ongoing value and ownership, much like buying a washing machine for indefinite use.

It’s also important to note the difference between perpetual futures and spot markets: while spot markets trade continuously and offer straightforward, consistent price data, perpetual futures introduce complexities like funding rates and basis differentials, requiring more sophisticated data infrastructure.

Think of it less as “big data analysis” and more as “big reflexes.” You’re not warehousing history—you’re building a nervous system for your trading stack.

Dinosaurs stored data. Mammals processed it, adapted and survived.

Generative AI will either hallucinate like a toddler or execute like Einstein—depending on whether you feed it noise or context.

If you’re serious about perps, code like a mammal.