Skip to content
Start a project

Blockchain and DeFi

A decentralized exchange on mainnet, with contracts you can read and tests you can run

We design and ship decentralized exchanges: the pool and router contracts, the trading interface and the indexing behind the charts. Each release comes with a threat model, a test suite and a codebase prepared for independent audit.

Decentralized exchanges at a glance

Workflows
Swaps, liquidity provision, multi-hop routing, fee collection, LP rewards
Chains
Ethereum, Polygon, BNB Smart Chain and Layer 2s such as Arbitrum, Optimism and zkSync Era; also Tron, Kaspa, Solana, Sui, TON, Cosmos and Polkadot parachains such as Astar and Reef
Controls
Minimum-output and deadline checks, time-weighted prices, pause guardian, timelocked upgrades
Start
A 30-minute scoping call

What can we build for you?

AMM

Your token trades on its own pools

Factory, pool and router contracts for spot swaps, with LP tokens and a protocol fee switch you control; we recommend a multisig for it.

Concentrated liquidity

Deeper markets from the same capital

Range positions let LPs place capital near the current price. We build the position manager and the per-range fee accounting.

Order book

Limit orders that settle on-chain

Traders sign orders off-chain and a matching service pairs them. A settlement contract checks every fill against the signed terms.

Aggregator

Swaps routed across every pool you run

A smart router that splits each trade across your pools, fee tiers and other exchanges' liquidity, then enforces a minimum output on-chain.

Launch

An orderly first day of trading for a new token

Liquidity bootstrapping pools, locked LP tokens and per-wallet buy limits for a token's first hours on the market.

Interface

A trading screen your users understand

Swap, pool and portfolio views with TradingView charts, wallet connection and clear price-impact warnings before each trade.

How we work on it

A threat model before the first contract

We list the attacks that matter for your trading model, then write a test for each one.

Charts and history from your own subgraph

Swaps, pools and positions are indexed, so the interface and your analytics read the same data.

Admin powers you control

Fee switches, pauses and upgrades go to the signers you choose; we recommend a multisig and a public delay.

Which risks do we engineer for?

Risks in Decentralized exchanges work and how we handle them
RiskWhy it mattersHow we handle it
Price manipulationFlash loans can move a pool's spot price inside one transaction and drain any contract that reads it.Contracts read time-weighted averages or external feeds, and we test them against flash-loan scenarios.
Sandwich attacks and MEVBots trade just before and after a large swap, so the user gets a worse price.Enforced minimum output and deadlines, conservative default slippage and optional private transaction routing.
Liquidity fragmentationThin pools spread across chains or fee tiers mean high price impact, and traders leave.We model expected volume per pair, choose fee tiers deliberately and route across pools from launch.
Unlimited router approvalsA buggy or compromised router can spend every token a user ever approved to it.Exact-amount approvals or signed permits by default, a minimal router and no upgradeable logic behind approvals.
Upgrade and admin keysWhoever holds the upgrade key can change pool logic or redirect trading fees.We recommend multisig ownership and a timelock on every parameter change, and keep core pools immutable where the design allows.

How is it delivered?

  1. Scope the mechanism

    We map the mechanism, the assets at risk and the chains you need.

    Output Written specification and milestone plan

  2. Architecture and threat model

    We design the contracts, roles and upgrade path, then list how each part could be attacked.

    Output Architecture document and threat model

  3. Milestone builds on testnet

    Each milestone ships to testnet with unit, fuzz and invariant tests.

    Output Tested contracts and a testnet deployment

  4. Audit, mainnet and after

    We freeze the code for an independent audit and fix the findings. Then we deploy, verify and stay on after launch.

    Output Audit report, verified contracts and a deployment record

Contracts
Solidity, Hardhat, fuzz and invariant tests
Indexing
Subgraphs for swaps and positions, PostgreSQL for analytics
Interface
React, TradingView charts, MetaMask and Trust Wallet connections
Operations
Multisig and timelock ownership (recommended), on-chain monitoring and alerts

Shipped work

Questions

Short answers to the questions we hear most often.

Should we build an AMM or an order book?

Pick an AMM for always-on liquidity in long-tail tokens. Pick an order book when traders want limit orders and tight spreads on liquid pairs. Many exchanges combine both, and we help you choose on the scoping call.

Can you fork an existing DEX instead of starting from scratch?

Yes, when the license allows it and the design fits. We check the original license and audit history, then test every change we make. A fork still needs its own audit, because small edits break old assumptions.

How do you protect traders from front-running?

With limits the contract enforces, not interface settings. Every swap carries a minimum output and a deadline, and defaults keep slippage low. Large trades can go through private transaction routing.

Do you build DEX aggregators?

Yes. We have built routers that split a swap across a client's own pools and other exchanges' liquidity, and the smart router for Kaspa Finance on Kasplex. Each route is quoted from every source, and a contract checks the final amount against the minimum output.

What drives the cost and timeline of a DEX?

Every engagement is quoted after a scoping call. The main drivers are the trading model, the number of chains, routing and aggregation, the interface and the audit scope. Our DEX development cost guide covers each one.

Who controls the exchange after launch?

You do. At handover we move owner roles to the wallets you choose, and we recommend a multisig. We document every admin function and leave a runbook for pauses and upgrades.

Have an agent, protocol or product to ship?

Send a short brief and we'll reply with times for a 30-minute scoping call.