Build with Ammora
Plan launch, liquidity, position, and fee-sharing transactions with live-state validation and exact integer math.
Ammora launch, liquidity, position, and fee-sharing workflows are available on GIWA Sepolia (chain ID 91342).
npm install @ammora-protocol/sdk@0.2.0-beta.2 viem
import {
ALCClient,
ALMMClient,
ARLClient,
AFSClient,
giwaSepoliaVNext,
} from "@ammora-protocol/sdk";What Ammora is
Ammora is a modular EVM liquidity stack for launching a token, creating its first market, managing liquidity, and distributing the fees that market produces. The contracts hold and settle state on-chain; the TypeScript SDK turns application intent into reviewable calldata, approval requirements, quotes, and live-state preflight results.
| Surface | Use it for | Core model |
|---|---|---|
| Ammora Launch Curve (ALC) | Token launch and graduation | Segmented on-chain price discovery before migration |
| Ammora Liquidity Market Maker (ALMM) | Bin-based liquidity | Fixed-price bins with strategy-shaped liquidity |
| Ammora Range Liquidity (ARL) | Range or full-range liquidity | Concentrated sqrt-price math or constant-product compounding |
| Ammora Fee Sharing (AFS) | Revenue distribution | Immutable weighted recipients with cumulative fee-per-share accounting |
One SDK, two execution surfaces
Offline builders and connected clients intentionally solve different problems. Pick the smallest surface that still knows enough current state to protect the user.
| Surface | What it does | When to choose it |
|---|---|---|
| Builders | Validate local parameters and encode calldata without RPC reads | Backends that already own discovery, simulation, and state freshness |
| Connected clients | Read contracts, bind quotes, inspect policy and authority, and return approvals plus calldata | Wallet applications and launch workflows affected by live state |
- Address-agnostic builders for every protocol surface
- Connected ALC, ALMM, ARL, and AFS workflows
- Pure bigint math re-exported from @ammora-protocol/math
A syntactically valid transaction can still revert or target stale state. Use a connected planner whenever pool state, registry state, ownership, policy, fee configuration, or a deadline affects validity.
The planning lifecycle
Every production integration should make the same boundary transitions explicit. The SDK plans transactions; the wallet remains the only component allowed to sign and submit them.
- 1Describe intent
Choose the product and supply a launch configuration, bin range, liquidity cap, swap amount, or recipient split.
- 2Resolve live state
Read the chain, contract bindings, pool state, token policy, position owner, registry entry, nonces, and fee settings.
- 3Quote and constrain
Convert the quote into minimum output, maximum input, minimum shares, active-bin movement, price-range, and deadline constraints.
- 4Inspect approvals
Display token, spender, amount, permission, and expected sender for every setup transaction.
- 5Simulate, sign, resolve
Simulate with the signing account, submit through the wallet, and decode the receipt before planning a dependent step.
Units and rounding
Ammora uses integer math throughout. Token amounts are raw ERC-20 units, fees and slippage are generally basis points, and price or accounting accumulators use fixed-point scales such as Q128. Never convert execution-critical values through JavaScript number.
| Value | Meaning |
|---|---|
| bigint token amount | Raw token units using the token's decimals |
| 1 basis point | 1 / 10,000, or 0.01% |
| Q128 | Fixed-point scale of 2^128 used for prices or cumulative growth |
| Minimum output/share | Quoted value reduced by the selected slippage tolerance |
Required inputs round up; outputs and user credits generally round down. Use SDK quote fields instead of recomputing them with floating-point arithmetic.
Choose a starting path
Start from the user outcome, not from a contract name. Each product page explains the underlying model before the SDK workflow.
- Launching a new token: read the ALC guide, then the transaction workflow
- Supplying strategy liquidity: read ALMM and choose a bin shape
- Creating a long-lived market: compare ARL concentrated and compounding modes
- Splitting accumulated fees: design recipients and the source path in AFS
- Operating production infrastructure: finish with the security model