Private TRN↔USD AMM

Module Name: TrnUsdAMM Type: Internal Pegged AMM Access: Platform-only Governed By: TRNUsageOracle + MintThrottleController

The TrnUsdAMM module establishes and maintains an internal price peg for TRN against a fiat-denominated reference (USD). It ensures all platform actions — views, boosts, subscriptions, and post pricing — remain anchored to predictable and stable pricing, regardless of external token volatility.

This AMM is not accessible to the public and is used exclusively for internal pricing enforcement, budget allocation, and economic balancing across the TRN network.


🎯 Purpose

  • Peg TRN to a USD-equivalent value (e.g. 1 TRN = $0.003).

  • Ensure all platform-level pricing (view cost, boosts, subscriptions) operates on stable purchasing power.

  • Smooth out volatility by adjusting mint/burn and liquidity flows across the system.

  • Enable future on/off ramps via regulated, KYC-controlled withdrawal layer.


💵 Peg Mechanics

  • Target Price: 1 TRN = $0.003 (default)

  • Max Slippage Allowed: ±2%

  • All platform pricing is denominated in TRN, but calibrated against this peg.

The peg does not rely on external exchanges — it is algorithmically maintained by internal pricing signals, Merkle flow data, and AMM pressure.


🧠 Oracle-Driven Price Setting

The TRNUsageOracle is responsible for:

  • Aggregating Merkle view data (TRN inflows/outflows)

  • Observing TRN→USD pressure from withdrawals and deposits

  • Calculating TWAP (time-weighted average price) internally

  • Blocking or delaying any swaps or actions that would shift the price >2%


🔁 Swap Behavior

TRN → USD (Simulated)

  • A user’s intent to cash out triggers:

    1. Reconciliation of their TRN fruit and ledger balance.

    2. USD equivalent is calculated via current internal price.

    3. KYC Withdrawal Layer verifies user and initiates off-ramp.

  • No direct AMM call occurs — this is fully internalized and permissioned.

USD → TRN (Simulated)

  • When a user purchases TRN to fund a wallet:

    1. Their USD is received via off-ramp.

    2. The AMM mints new TRN using MintThrottleController logic.

    3. That TRN is made available in their account and recorded in the Merkle ledger.


🛑 Swap Limit Rules

  • Max Swap Limit Per Transaction: 333,333 TRN

  • Max Daily Aggregate Impact: capped via StabilityVault trigger

  • No large swap allowed that would shift peg >2%

If a transaction attempts to exceed this threshold:

  • It is rejected or deferred to the next block

  • Oracle recalculates and reassesses

  • Optional: triggers AMM flash arbitrage to balance liquidity (via DAO funds)


🏛️ DAO Interaction

The DAO can configure:

  • Minimum vault threshold before flash stabilization is allowed

  • Percentage of swap proceeds routed to DAO Vault

  • AMM behavior during high-pressure days

All excess TRN from minting or BRN burning events may also flow back into the AMM or DAO, depending on system pressure.


💰 Vault + Stability Pool Integration

  • The AMM interacts directly with:

    • DailyVaultSplitter

    • StabilityVault

    • MintThrottleController

If the system detects excess TRN demand, it may:

  • Throttle minting (if pool is low)

  • Use DAO funds for flash loans to rebalance

  • Delay settlement of high-impact swaps

These controls are designed to prevent speculative exits, protect price integrity, and preserve Merkle alignment across the board.


🔒 Enforcement & Access

  • No direct user access

  • No public liquidity pools

  • All interactions gated by:

    • TRNUsageOracle

    • KYC Withdrawal Layer

    • MintThrottleController

  • All swaps simulated against internal peg pricing, not real-time markets

This ensures TRN retains value predictability while remaining insulated from external market instability or bot manipulation.


⚠️ Abuse Prevention

  • Users cannot mint TRN arbitrarily

  • Users cannot withdraw without reconciling fruit/ledger debt

  • Slippage guards and swap limits enforced at the contract level

  • If demand pressure exceeds safe thresholds, the AMM halts activity, and a DAO-controlled arbitration or cooldown may be triggered


  • TRNUsageOracle

  • MintThrottleController

  • DailyVaultSplitter

  • StabilityVault

  • KYC Withdrawal Layer

Last updated