
RXDex
AMM infrastructure for synthetic asset liquidity.

About This Project
RXDex is a custom AMM for the REAX synthetic asset ecosystem. We built specialized pool types, single-sided deposits, swap routing, LP position tracking, veREAX incentives, and risk controls for synth pairs where generic DEX assumptions break down.
Client
Timeline
Technologies
Why Standard AMMs Don't Work for Synthetics
Pool Architecture
- Stableswap Pools: For stable synthetic pairs, we used curve-based math that concentrates liquidity near the peg. This gives deep liquidity where it matters and keeps slippage low even on large trades between similarly-valued assets.
- Variable Pools: Constant product pools with some extras for volatile synth pairs. We tuned the parameters to balance trade execution quality against acceptable IL levels for LPs.
- Weighted Pools: These support custom token ratios instead of forcing a 50/50 split, which helps pools match demand and exposure targets.
- Hybrid Pools: Hybrid designs combine elements from multiple pool types for pairs that do not fit a single curve cleanly.

Liquidity Provision
- Single-Sided Liquidity: Users can deposit one token while the contract handles internal balancing against the pool.
- Multi-Asset Deposits: Standard balanced deposits are supported too, with optimizations to reduce slippage during the deposit itself, especially for large adds.
- Dynamic Deposit Routing: The router reads the deposit asset and current pool state, then selects the path that protects received LP value.
- Position Management: We built tools for tracking your LP positions: current value, fees earned, IL exposure, and easy rebalancing. You can see exactly how your position is performing.

veREAX Yield System
- LP Token Staking: Stake your LP tokens to earn additional yield from protocol fees and emissions. Straightforward mechanism that rewards LPs who keep their positions active.
- Vote-Escrow Model: Lock REAX tokens to get veREAX. Longer locks mean bigger yield boosts, more governance weight, and a larger share of protocol fees. The math is proportional to both amount and duration.
- Yield Boosting: veREAX holdings multiply your LP yields. This creates a flywheel where committed participants earn more, which encourages deeper, longer-lasting liquidity.
- Gauge System: veREAX holders vote on which pools get emissions. This lets the community direct incentives where they think liquidity matters most.
- Fee Distribution: A cut of all trading fees flows to veREAX holders. It's passive income that scales with protocol usage, not just token emissions.

Trading Experience
- Smart Order Routing: The router checks multiple pools and paths to find the best execution. For multi-hop trades, it picks the route that minimizes total slippage.
- Flash Swap Support: We wired up flash swaps so arbitrageurs and advanced strategies can execute without upfront capital. This improves overall market efficiency and tightens spreads.
- Price Impact Display: Before you confirm a trade, you see exactly how much price impact you're taking. No surprises. Users can adjust trade size or timing based on real data.
- MEV Protection: We added protections against sandwich attacks and other MEV extraction. Traders shouldn't lose value to bots just for swapping tokens.

Yield Opportunities
- Trading Fee Yield: LPs earn a share of every swap in their pool. This is organic yield that scales directly with protocol usage. No token printing required.
- Emissions Incentives: Token emissions bootstrap liquidity in key pools early on. The emission schedule tapers over time to keep things sustainable long-term.
- Lockdrop Events: Periodic lockdrops give boosted rewards for users who commit liquidity for set periods. Good for bootstrapping depth in new synth pools.
- Yield Dashboard: We built a dashboard that shows current returns, historical performance, and projected earnings across all your positions. Everything in one place.

Risk Management
- Impermanent Loss Mitigation: The pool math and incentive design work together to reduce IL impact. Stableswap pools in particular handle this well since liquidity concentrates where it's needed.
- Oracle Circuit Breakers: If a price feed looks wrong or stale, trading pauses automatically. This prevents exploitation during oracle hiccups or periods of extreme volatility.
- Gradual Parameter Changes: Pool parameters like fees and weights change gradually, not all at once. This avoids disrupting existing LPs and traders with sudden shifts.
- Liquidity Concentration Controls: We monitor for large position holders that could manipulate price discovery. Concentration limits keep things fair.
- Risk Visualization: The UI shows IL projections and other risk metrics clearly. Users can see what they're getting into before committing capital.
REAX Ecosystem Integration
- Synthetic Asset Flow: Users can mint synths on REAX, trade them on RXDex, and use them as collateral on RXLend. The full lifecycle works end-to-end without leaving the ecosystem.
- Shared Tokenomics: REAX and veREAX work across all protocols. One token, one governance system, consistent incentives everywhere.
- Cross-Protocol Strategies: The integration enables strategies like leveraged LP positions and yield stacking that use multiple protocols together. This is where the real capital efficiency shows up.
- Unified Interface: Same design system, wallet connection, and navigation patterns across the REAX protocol suite.
Security
An AMM holding real liquidity needs serious security. We layered multiple approaches, from formal methods to economic simulations to external audits.
Formal Verification
We formally verified the critical pool math and swap execution paths. If the core functions have bugs, everything else falls apart, so we proved them correct mathematically.
Incremental Testing
Ran extensive tests with different parameter configs and market conditions, including edge cases like extreme volatility and large liquidity events.
Sandboxed Deployment
Launched with pool size caps and raised them gradually as confidence grew. Limits potential damage during the early days when the protocol is least battle-tested.
Economic Simulation
Built agent-based simulations to probe for attack vectors and exploitable edge cases. Made sure the incentive structure holds up under adversarial conditions.
Independent Security Audits
Multiple specialized firms audited the code before launch. Every finding was addressed and verified in follow-up reviews.
Governance Timelock
All governance actions go through a time delay. The community can review proposals and act before changes take effect.
Emergency Shutdown
Graduated emergency controls can pause specific functions or shut things down orderly if a critical issue is found.
Bug Bounty Program
Ongoing bounty program with defined reporting paths and payouts for valid findings.
What's Next
The roadmap adds concentrated liquidity, limit orders, deeper LP analytics, and cross-chain deployment. Each item extends the same thesis: better capital placement, clearer position data, and more trading control for synthetic markets.
Visual showcase
