๐ŸŒ‘ Project Story

About Shadow Arena

What if you could prove that your trading strategy follows the rulesโ€”without revealing the strategy itself?

That question inspired us to build Shadow Arena, a privacy-native competitive trading game where players compete on their trading performance while keeping their risk strategies private.

Traditional trading competitions often create a difficult trade-off:

$$ \text{Transparency} \rightarrow \text{Less Privacy} $$

while:

$$ \text{Privacy} \rightarrow \text{Less Verifiability} $$

We wanted to explore whether blockchain privacy technology could give us both.

The result is Shadow Arena:

Trade privately. Compete openly. Prove everything.


๐Ÿ’ก What Inspired Us

We were fascinated by the intersection of DeFi, gaming, privacy, and competitive systems.

Trading competitions are naturally game-like: every player starts with a defined amount of capital, makes decisions under pressure, manages risk, and ultimately competes on performance.

But a player's strategy can be their most valuable piece of intellectual property.

Imagine a player has a private policy such as:

  • Never expose more than 40% of the portfolio to BTC
  • Never use more than 2ร— leverage
  • Never lose more than 5% in a day

The player should be able to prove that a trade respects those rules without necessarily publishing the rules themselves.

That led us to the core idea behind Shadow Arena:

                 PRIVATE
                    โ”‚
              Trading Strategy
                    โ”‚
                    โ–ผ
             Privacy Layer
                    โ”‚
                    โ–ผ
              Verification
                    โ”‚
                    โ–ผ
                  PUBLIC
                    โ”‚
                    โ–ผ
             Trade Valid / Invalid

The blockchain should not just record what happened.

It should help prove why an action was valid without exposing information that does not need to be public.


๐ŸŽฎ What We Built

Shadow Arena turns this concept into a competitive trading experience.

Players can:

  1. Connect their wallet
  2. Join a trading arena
  3. Create a private risk strategy
  4. Lock their strategy
  5. Enter a deterministic market
  6. Buy and sell assets
  7. Have trades evaluated against their private risk policy
  8. Build their portfolio
  9. Receive a risk-adjusted score
  10. Compete on a global leaderboard

Instead of ranking players purely by profit, Shadow Arena considers factors such as return, drawdown, risk, and consistency.

This creates a more interesting competitive environment where reckless strategies are not automatically rewarded.


๐Ÿ” Why Privacy Matters

One of the most important design decisions was separating public outcomes from private strategy information.

A player's public profile can show:

Return:       +18.4%
Risk Score:       92
Win Rate:         73%
Rank:              #1
Verification:      โœ“

But it should not need to reveal:

Maximum BTC Exposure: 40%
Maximum Leverage:     2ร—
Maximum Daily Loss:   5%

The idea is simple:

Reveal the result, not the edge.

This is where Midnight's privacy capabilities become especially interesting for the project.


๐Ÿ› ๏ธ How We Built It

We designed Shadow Arena as a modular application rather than putting all of the logic directly inside the frontend.

The architecture separates the system into several layers:

                 Shadow Arena
                      โ”‚
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚              โ”‚              โ”‚
       โ–ผ              โ–ผ              โ–ผ
    Frontend       Backend       Privacy Layer
       โ”‚              โ”‚              โ”‚
    Next.js       Trading API      Midnight
       โ”‚              โ”‚              โ”‚
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚
                Market Engine
                      โ”‚
                      โ–ผ
                Arena / Scoring

The frontend provides the trading experience.

The backend handles application logic, market state, trades, scoring, and persistence.

The market engine generates deterministic market conditions so that the same arena can be reproduced reliably.

The privacy layer isolates strategy validation and verification from the rest of the application.


๐Ÿ“ˆ Deterministic Markets

Instead of depending entirely on live exchange APIs during a competition, we designed a deterministic market simulator.

Market behavior can be derived from:

$$ P_t = f(S, A, t) $$

where:

  • (S) = arena seed
  • (A) = asset
  • (t) = market tick
  • (P_t) = generated price

This means that the same arena can reproduce the same market conditions.

That is particularly useful for a hackathon because the demonstration remains predictable and does not depend on external market volatility or API availability.


๐Ÿง  Risk-Adjusted Competition

We also learned that simply ranking traders by profit creates an incentive for excessive risk.

For example:

Trader A
Return: +30%
Drawdown: 28%

Trader B
Return: +18%
Drawdown: 5%

A simple profit leaderboard would automatically favor Trader A.

Shadow Arena instead explores a risk-adjusted scoring model:

$$ Score = ProfitScore \times RiskMultiplier \times ConsistencyMultiplier $$

This encourages players to optimize not only for returns, but also for sustainable risk management.


๐Ÿค– AI-Assisted Strategies

Another part of the project is Shadow AI.

Instead of forcing users to manually configure every parameter, a player can describe a strategy in natural language:

"Create a balanced crypto strategy with moderate risk and limited leverage."

The system can convert that request into a structured policy proposal.

Natural Language
       โ†“
      AI
       โ†“
Strategy Proposal
       โ†“
User Approval
       โ†“
Policy Validation
       โ†“
Private Strategy

The important design principle is that AI proposes the strategyโ€”the user remains in control.

We also avoid treating AI-generated strategies as guaranteed financial advice.


๐Ÿ“š What We Learned

Building Shadow Arena taught us several important lessons.

1. Privacy is a product feature, not just a cryptographic feature.

It is easy to say "this application uses privacy."

The harder question is:

What information should actually remain private?

Thinking about this forced us to model the application around public and private state from the beginning.


2. Blockchain should solve a real problem.

We did not want to add blockchain simply because it was a Web3 hackathon.

The blockchain/privacy layer has a specific responsibility:

$$ \text{Private State} \rightarrow \text{Verification} \rightarrow \text{Public Result} $$

That gives the technology a meaningful role in the product.


3. Good game design needs more than financial returns.

If the only objective is maximizing profit, the optimal strategy can become extremely risky.

Introducing drawdown, consistency, and risk into the scoring system makes the competition more strategic.


4. Developer experience matters.

Working with a new privacy-focused blockchain ecosystem also taught us that rapidly evolving developer tooling can be challenging.

We learned to isolate blockchain-specific code behind adapters instead of coupling the entire application to one implementation.

This makes the application easier to test, debug, and evolve.


โš”๏ธ Challenges We Faced

Privacy vs. usability

The biggest challenge was making privacy understandable.

Terms such as:

  • zero knowledge
  • commitments
  • private state
  • proofs
  • verification

can quickly become intimidating.

We therefore designed the UI around simple concepts:

๐Ÿ” Strategy Protected

โœ“ Strategy committed
โœ“ Policy verified
โœ“ Trade allowed

The complexity should exist underneath the productโ€”not in the user's face.


Blockchain integration

Integrating privacy infrastructure into a real application introduces additional complexity around:

  • wallets
  • network configuration
  • contracts
  • transaction states
  • verification
  • asynchronous operations
  • evolving SDKs

We addressed this by separating the privacy engine from the trading engine.

Conceptually:

interface PrivacyEngine {
  registerPlayer(): Promise<void>;
  commitStrategy(): Promise<void>;
  validateTrade(): Promise<boolean>;
  verifyProof(): Promise<boolean>;
}

This allows the application to evolve without rewriting the entire trading system whenever the blockchain layer changes.


Building something judges can understand quickly

A technically sophisticated application can still fail if people do not understand it.

So we designed the core demonstration around one simple interaction:

Create Private Strategy
          โ†“
       Lock It
          โ†“
      Enter Arena
          โ†“
      Make Trade
          โ†“
    Verify the Policy
          โ†“
     Public Result

The key moment is when a valid trade succeeds while the underlying strategy remains private.


๐ŸŒ What's Next?

Shadow Arena is designed as more than a hackathon prototype.

Our long-term vision is to build privacy infrastructure for competitive financial applications.

Potential future applications include:

  • private trading competitions
  • confidential auctions
  • prediction markets
  • AI-agent competitions
  • strategy marketplaces
  • private portfolio management
  • competitive DeFi
  • privacy-preserving financial games

The larger vision looks like:

                 SHADOW ARENA
                       โ”‚
                       โ–ผ
                Competitive DeFi
                       โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ–ผ        โ–ผ        โ–ผ
           Shadow AI  Shadow SDK  Cross-Chain
              โ”‚        โ”‚        โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ–ผ
             Privacy Infrastructure

๐Ÿš€ Why We Think This Matters

Financial applications increasingly need both transparency and privacy.

Users should be able to prove that they followed the rules without automatically exposing every piece of information about how they operate.

Shadow Arena explores that idea through a format that is easy to understand:

a game.

Instead of explaining privacy-preserving computation only through abstract examples, we let users experience it:

Create a strategy. Keep it private. Make a trade. Prove the trade is valid. Compete with everyone else.

That's the idea behind Shadow Arena.

๐ŸŒ‘ Trade privately. Compete openly. Prove everything.

Built With

Share this project:

Updates

Submission history