AMM & Liquidity
The TRN platform maintains two internal automated market makers (AMMs) to support its circular token economy without relying on external exchanges. These AMMs facilitate deterministic, rules-based swaps of TRN with:
BRN (Burn-Reserve-Note) — used for internal engagement mechanisms like burns and moderation
USD (Fiat Price Reference) — used for consistent pricing of platform features such as subscriptions, views, boosts
All AMM behavior is governed by usage constraints, Merkle drop balances, and smart contract-enforced caps to ensure the system remains economically sound and manipulation-resistant.
🔁 Internal AMMs Overview
TRN↔BRN AMM
Internal swaps to enable burning, retrns, and moderation mechanisms
Platform-only (via TRNUsageOracle)
TRN↔USD AMM
Converts user funds to target TRN rates for feature pricing (e.g., 1 view = 1 TRN)
Platform-only (used behind scenes)
All token flows through AMMs are enforced via the TRNUsageOracle, ensuring that swaps only occur with real-time reconciled balances and respecting global system limits.
🔁 Private TRN↔BRN AMM
File Reference:
TrnBrnSwapModule.sol
This AMM maintains a strict 1:1 peg between TRN and BRN. It enables key engagement actions such as:
Post burns
Downvotes
Retrns of other people’s content
🔒 Rules:
Users do not receive BRN in their wallet — all BRN is staked internally via
BurnRegistryBRN is minted temporarily and burned after the next Merkle drop batch
TRN input is burned during swap → equivalent BRN is staked on the user’s behalf
Any swap that would break the 1:1 peg or exceed system limits is rejected
A per-swap cap of 333,333 TRN is enforced until the stability pool is fully funded
Transactions that would cause price movement >2% are held until the next block cycle
This AMM is never exposed to the public. It’s used by engagement-related contracts and always reconciled through the TRNUsageOracle.
💵 Private TRN↔USD AMM
File Reference:
TrnUsdPricingOracle.sol
This AMM sets the effective fiat price of TRN across the platform. It exists to anchor TRN pricing for:
Subscriptions
Views
Boost campaign budgets
AI targeting and ad spend calculations
💡 Peg Rules:
Target price is fixed at 0.003 USD per TRN
All user transactions are denominated in TRN, but guided by this peg for stability
Any swap that moves price more than ±2% is rejected or deferred
Pricing pulls a time-weighted average to prevent flash attacks or slippage abuse
Swap size limits are enforced based on vault liquidity and stability pool reserves
Users never interact with this AMM directly — it informs all platform feature pricing invisibly and consistently.
🧱 Swap Limits & Stability Trigger
Files Referenced:
MintThrottleController.sol
StabilityVault.sol
TrnBrnSwapModule.sol
TrnUsdPricingOracle.sol
🚨 Swap Caps:
Max 333,333 TRN per swap for TRN↔BRN (pre-threshold)
TRN↔USD swaps capped dynamically based on real-time Merkle liquidity state
No batch can mint more TRN than needed for reconciled Merkle settlements
🛑 Price Movement Rejection:
Any transaction that would shift TRN price >2% from current value is rejected
Transactions exceeding this range are held until the AMM re-equilibrates
🔄 Flash Loan Safeguards:
AMM uses private internal liquidity only
Arbitrage attempts using flash loans are ineffective due to:
Locked access
Time-weighted averaging
Per-tick throttling
AMM can simulate a counter-arbitrage and capture profit into the
DAO Vault
🪙 Stability Vault & DAO Earnings
File Reference:
StabilityVault.sol
The Stability Vault activates after the system crosses a pre-defined funding threshold. Until then:
All swaps must respect AMM limits
Liquidity is throttled via the
MintThrottleControllerFlash loan-based stabilization remains disabled
Once live:
The AMM can pull temporary liquidity from the vault
Excess earnings from arbitrage or overflow mints go directly to the
DAO VaultSwap profits are not retained by users or bots — all surplus supports the ecosystem
🧾 Flow Summary
User views a post → 1 TRN consumed
Platform references TRN↔USD AMM to confirm consistent pricing
Booster funds campaign in TRN → amount is deducted and locked
Burn event triggers swap → TRN burned, BRN staked
All transactions reconciled through
TRNUsageOracleDAO receives TRN from:
AMM overflow earnings
Post burns
Platform fees
Last updated