Constant-product engine
Pool initialization, swaps, add / remove liquidity and unified 8-decimal scaling — the entire exchange inside one audited contract.
SATURN PROTOCOL // PHANTASMA CHAIN
From a single battle-hardened contract to a twenty-two-contract modular exchange — and a credit layer built on top of both. This is everything Saturn runs, catalogued.
Saturn DEX v3 is one contract: SATRN_v2.tomb. The full
exchange — AMM, LP certificates, fee routing — shipped as a single
unit and hardened release after release until it simply refused to break.
Pool initialization, swaps, add / remove liquidity and unified 8-decimal scaling — the entire exchange inside one audited contract.
Every liquidity position mints a SATURN NFT ticket carrying its own reserve share — transferable, inspectable, on-chain.
One predictable rate, split three ways: 0.21% to liquidity providers, 0.09% to the protocol, 0.10% to the token owner.
Holders of a Series-5 FACTORY NFT trade with an 80% swap-fee discount, verified on-chain at swap time.
Many LP tickets fold into one — pending TACAL rewards are claimed before the old certificates burn.
Reentrancy sentinels, truncation guards, minimum-amount gates and skim protection, refined across 30+ patch releases.
v4 splits the monolith into single-purpose contracts: a lean core, a financial-products layer and an agent layer — wired through one centralized reentrancy guard, financial locks and a fee-redirect switch. The swap engine alone is ~100 lines of audit surface.
Protocol owner, fee-split ratios, pool-fee bounds and the centralized reentrancy guard shared by every contract.
Canonical pair keys, multi-pool-per-pair storage, reserves, scale factors and the financial locks other layers rely on.
Create pools, add and remove liquidity with slippage + truncation guards. Sole custodian of pool tokens.
The hot path — constant-product math and per-pool fee routing, isolated to ~100 auditable lines.
Per-provider fee accrual and claims, plus the redirect switch that powers bonds and rentals.
One certificate NFT per pool — minted on create, burned on remove. The only contract that is a token.
Permissionless liquidity mining: fund a campaign, enroll pools, claim rewards pro-rata to liquidity.
Best-pool-for-swap selection and aggregated single-call reads — one entry point for frontends.
Securitize future fee income as fixed-yield bonds. Partial or collateral-buffered hybrid modes, tradable on secondary.
Franchise a pool: the owner collects guaranteed SOUL rent while the operator runs fees within owner-set bounds.
Derivatives on fee policy — buy the right to set a pool’s fee rate for a period; the original rate restores at expiry.
Crowdfund large pools. Fee revenue distributes pro-rata to contributors; dissolution refunds are built in.
Fixed-price token launches on syndicate mechanics with refund-safe accounting for unsold supply.
Atomic two-pool arbitrage with executor capital. Profit splits 80 / 20 with the treasury; per-executor stats on-chain.
Resting on-chain orders. Any agent may execute when price crosses — and earns a 0.1–5% bounty for doing so.
Bet over / under on pool fee or reserve metrics. Self-resolving at claim time — no oracle, no keeper.
Deposit into agent-run strategies with share accounting. Performance fees apply only above the high-water mark.
Range-bound pools quote only inside their declared band — roughly 10× the capital efficiency per token deposited.
Stream large swaps over hours. Permissionless, bounty-paid chunk execution makes size sandwich-resistant by construction.
Borrow protocol liquidity with zero capital, arbitrage two pools, repay plus a 0.05% fee — or the whole tx reverts.
Stake-to-earn a slice of swap fees via accumulator math, with pledge-locking that integrates the lending layer.
Bots flash-borrow idle staked capital, round-trip it across two pools and split the profit 50 / 50 with stakers.
A full P2P lending protocol built on both DEX generations. Loans are TAZ-denominated, collateral is live LP — a v4 pool or a v3 LP NFT — and every asset prices through its RA-anchored pool. No external oracle.
On-chain creditworthiness built from account age, repayment history and streaks — the input to every loan term.
Borrowers post requests; lenders answer with direct quotes. Terms are agreed peer-to-peer, settled on-chain.
Pawn a v4 pool or a v3 LP NFT as collateral. Financial locks hold the position until the loan resolves.
The state machine: draws, scheduled payments, defaults and liquidation — one auditable lifecycle per loan.
Every loan and collateral token prices through its RA-paired pool, on both DEX generations. No external oracle.
Fully repaid loans mint TAZ, split 30 / 30 / 40 across borrower, lender and RA pledgers — bounded, anti-abuse formula.
Vouch for lenders in 30-day locked windows — custodial for v3, stake-locked via holder rewards for v4.
Algorithmic term calculation, deployed with full ABI and deliberately disabled at v1.0 — the P2P market runs first.
Every input capped and floored — micro-loans, flash repays and self-pledges earn zero.
Pledges lock for a fixed 30-day window, then release instantly — no open-ended traps.
Swap, provide, lend and automate — every contract above is deployed on Phantasma.