๐ 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:
- Connect their wallet
- Join a trading arena
- Create a private risk strategy
- Lock their strategy
- Enter a deterministic market
- Buy and sell assets
- Have trades evaluated against their private risk policy
- Build their portfolio
- Receive a risk-adjusted score
- 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
- ai
- blockchain
- compact
- contracts
- defi
- gamefi
- knowledge
- midnight
- next.js
- privacy
- react
- rust
- smart
- trading
- typescript
- web3
- zero
Log in or sign up for Devpost to join the conversation.