Liquidity that bends, not breaks.
Automated market makers are a decade old and still face the same structural problems. Large trades hurt. Liquidity providers get whiplashed. Protocols calcify. v5 ASAMM is our answer to all three.
Decentralised trading has come a long way. Most automated market makers have not. Large trades still cause painful slippage. Liquidity providers still get frustrated with impermanent loss. Protocols still struggle to evolve without painful migrations that break composability.
The v5 Adaptive Sigmoid Automated Market MakerASAMMis a single protocol that addresses all three. It brings together progressive fees, an on-chain order book, oracle-pegged pools, and full upgradeability through the Diamond Standard. The design target is simple: pools that feel smooth for normal trades and protect everyone from disruptive flow.
The adaptive sigmoid curve
At the heart of ASAMM sits a single piece of mathematics. Traditional constant-product AMMs treat every trade the samea small buy and a whale market order follow the same curve, with predictable results for the whale and painful ones for the pool. ASAMM instead shapes the price response to the size of the trade.
For a trade of size x against pool liquidity L:
new_price = mid_price · (1 + k · tanh(α · x / L)) The hyperbolic tangent does the work. Small trades move price barely at all — near-zero slippage for retail-sized flow. Medium trades move price along a smooth, predictable curve. Very large trades hit the asymptote, where the curve flattens and further impact is capped. Whales don't get to walk the book infinitely; the pool refuses to let them.
To run this on-chain, the protocol uses a high-precision rational
approximation of tanh in fixed-point arithmetic. Gas stays
reasonable. Precision stays tight across all realistic trade sizes.
Two pool types, one curve
Standard pools
Work like most familiar token pairs. The mid price comes from the current ratio of reserves, and the sigmoid curve operates around that price. Any pair works. No oracle dependency.
Oracle-pegged pools
Built for wrapped and bridged assetswrapped bitcoin, staked ether, anything whose on-chain price should track a canonical external one. The mid price is anchored to a trusted oracle rather than to reserve ratio. Reserves can become imbalanced without the price drifting away from reality. Liquidity providers earn fees with dramatically less impermanent-loss exposure to peg dynamics.
Oracle-pegged pools use both time-weighted average pricesfor stability — and spot priceas a safety check. If the oracle data goes stale, the pool auto-pauses. A stale oracle is a mispricing waiting to happen; we refuse to trade into one.
Progressive fees, by impact
One of the most distinctive features is how fees scale. Instead of a flat percentage, ASAMM's fees grow with the square of relative trade size:
total_fee = base_rate + impact_component · (x / L)² The result is a fee schedule that naturally punishes disruptive flow:
- 0.01% tradealmost nothing. Retail-grade.
- 1% trademodest, roughly 0.11%.
- 5–10% tradefees climb sharply, 2.5% up to 10%.
Actions that would otherwise cause massive price swings pay for that privilege. The pool never bleeds silently for the benefit of one trader.
Where the fees go
Collected fees split three ways: 70% to liquidity providers, 20% to the protocol treasury, and 10% to the trader reward pool. Every participant is paid in alignment with what they bring.
Loyalty is a first-class primitive
Successful markets need participants who stay. ASAMM compensates them explicitly.
Liquidity providers earn a fee multiplier based on how long they have been staking and how much volume their pool contributes. An LP who has stayed for more than 180 days can earn up to 2× the base rate.
Traders are not forgotten. Every seven days, the protocol examines the distribution of trade sizes across users and rewards those whose behaviour looks like healthy flowmany smaller trades, consistent participationwith rebates drawn from the trader reward pool.
A full on-chain order book
Beyond basic swaps, ASAMM ships a complete order book as a first-class citizen. Not as a bolted-on secondary layeras a native primitive inside the exchange runtime.
- Limit orders execute when the pool price reaches the trader's target.
- Stop orders trigger against oracle prices, independent of pool statecrucial for risk management.
- Price-tick organisation keeps the book gas-efficient.
- FIFO execution at each level, as swaps cross the ladder.
- Keeper bounties for external parties who help execute resting orders.
Upgradeable without migration
One of the oldest problems in smart contracts is the inability to fix bugs or ship features after deployment. ASAMM solves this with EIP-2535the Diamond Standard.
The protocol is split into smaller logic contracts called facets that attach to a central diamond proxy. Each facet owns a domain: swapping, liquidity provisioning, order management, fee accounting. Facets can be upgraded or replaced one at a time, without touching the rest of the system and without migrating user funds. The protocol's address never changes; its behaviour can.
The periphery
Around the core protocol sits a suite of supporting contracts:
- Routermulti-hop trades with slippage and deadline protection.
- Quoteraccurate pre-trade simulation for front-ends and keepers.
- Position Managerissues NFTs that represent liquidity positions, making them tradable.
- Order Managerhandles the limit order book on-chain.
- On-chain SVG renderingso position NFTs have real visual identity without off-chain dependencies.
- Gasless approvalsEIP-2612 permit support throughout.
Everything is built from the ground up with custom libraries for math, security, and token standards. No external dependencies; the team owns every line it deploys.
Security and efficiency
Security was a first-order design constraint, not an audit checklist:
- Custom reentrancy protection with tighter gas costs than the OpenZeppelin baseline.
- Time-weighted prices rather than easily manipulated spot oracles.
- Flash-loan attacks made prohibitively expensive by the progressive fee curve.
- Storage layouts organised to prevent slot collisions across facets.
- Safe-math patterns throughout, with documented
uncheckedblocks where proven correct.
On the efficiency side, storage is tightly packed, hot-path calculations run unchecked where the invariants hold, and the modular facet design keeps duplicated code out of the deployment.
What this means
ASAMM is not a better Uniswap. It is a different kind of thinga trading runtime that serves retail and institutional flow fairly through the same curve, that rewards loyalty as a first-class primitive, that ships order-book functionality natively, and that is architected to keep evolving without ever asking its users to migrate.
Whether you're a liquidity provider looking for stable yield, a trader who wants low-impact execution, or a developer who refuses to accept that protocols must calcify after deployment, ASAMM brings tools to the table that AMM design has not seen before.
The full specification will be published alongside mainnet. The research archive is the canonical home for everything we build.