- DEX / AMM contract architecture
Case studies
Blockchain
Confidential DEX Protocol
(NDA)
Product type:DEX / AMM protocol
System state:Live system (public liquidity, immutable contracts)
01
Launch context
At the moment architectural decisions were made, the system was preparing for deployment as a public decentralized exchange:
⌵Smart contracts were intended for immediate public release,
⌵Liquidity was external and permissionless,
⌵The system would enter an environment dominated by arbitrage, MEV, and adversarial transaction ordering.
Several decisions had to be finalized before deployment, because once liquidity was live:
•Changes would require migration,
•Or administrative intervention that would undermine protocol neutrality.
02
Core risk
Primary risk
A DEX with open liquidity is economically exploitable from the first block after launch, even when contracts are formally correct.
Secondary effects
⌵Economic attacks appear as valid trades,
⌵MEV cannot be patched post-deployment,
⌵Emergency intervention compromises trust.
This risk was systemic, not technical.
03
Decisions
Early decisions
•Architecture was designed under adversarial market assumptions.
•Core contracts were treated as immutable after deployment.
•Priority was given to predictability and resilience over short-term volume.
Explicitly rejected:
post-launch tuning and complex dynamic parameters.
Locked constraints
After the system went live, the following constraints became permanent:
•No manual pool control,
•Limited administrative authority,
•No economic adjustments without redeployment.
These constraints were accepted as the cost of neutrality.
Validation
•Threat and failure mode mapping before irreversible steps.
•Test strategy focused on abuse paths and operational correctness.
•Review gates before deployment and before any privilege changes.
04
Outcome
What stabilized
⌵Pools operate without emergency pauses or migrations.
⌵AMM behavior follows pre-modeled scenarios.
⌵No post-launch intervention was required.
The outcome is stability, not acceleration.
What Remained Risky
⌵MEV remains unavoidable.
⌵Liquidity growth depends on market behavior.
⌵The protocol is not optimized for short-term metrics.
These risks were accepted, not removed.
05
Ownership
What we owned
- Constraint model and refusal of post-launch control
- Irreversible architectural decisions
What the Client Owned
- Liquidity strategy
- Public communication
- Market outcomes after launch