DebtSettlementModule
Module Type: Identity & Access Category: TRN Balance Enforcement Purpose: Prevents users from performing TRN-based actions if they owe more than their fruit-entitled daily balance; ensures all debts are reconciled before TRN can be transferred out of the ecosystem.
🎯 Purpose
The DebtSettlementModule
enforces strict real-time debt control over user accounts. No action on the platform can bring a user into an unrecoverable TRN-negative state. The module works alongside the TRNUsageOracle
to:
Track fruit-based consumption vs. earning
Block TRN outflows (transfers or withdrawals) if any portion of the daily or accumulated balance remains unsettled
Ensure all outgoing TRN flows reconcile with the daily Merkle tree and credit/debit history
🔐 Core Enforcement Rules
No Negative TRN Balances Allowed
A user cannot spend, subscribe, bless, or boost if they exceed their real-time
fruit balance
.Fruit balance is governed live by the
TRNUsageOracle
, derived from content views, post rewards, and other events.
Withdrawal Gatekeeping
TRN cannot be moved out of the platform (e.g. via the TRN↔USD AMM or private exchange) until the user’s Merkle-aligned TRN balance is non-negative.
Transfer Blocking
All TRN token transfers (even P2P) route through the
TRNUsageOracle
, which invokes theDebtSettlementModule
to check:Daily fruit earnings
Consumption history
Any temporary credit (based on view rewards not yet finalized)
Merkle alignment status
Consumption Locks
If a user’s fruit balance = real TRN balance, the system enters a soft lock:
The user can only access:
Their own content
Previously viewed content
Boosted content
Ads (to earn more TRN)
No new blessings, subscriptions, or retrns will process.
⚙️ How It Works
Every TRN-consuming action (viewing premium content, subscribing, boosting) is checked in real time.
If the action exceeds what the user is permitted to consume based on daily fruit allocation and past earnings:
The action is rejected immediately
No negative balance occurs
Each end-of-day Merkle drop validates and applies:
Earned TRN
Spent TRN
BRNs deducted for burns
Boosted views processed
If a mismatch exists, the module denies further TRN access until resolved.
💼 Example Scenario
User has 12 fruit TRN today
Can perform actions up to 12 TRN worth
User views content worth 8 TRN
8 TRN deducted live, 4 TRN remain
User tries to boost a post for 5 TRN
Rejected — 5 > 4 available
User watches 2 boosted ads
Earns 2 TRN (now has 6 total)
User reattempts 5 TRN boost
Accepted — 6 > 5, fruit updates accordingly
User tries to send TRN externally
Rejected unless balance has no pending debt
🔁 Interaction with Other Modules
TRNUsageOracle
Provides live fruit balance, triggers enforcement checks
TRNUsageOracleViewAdapter
Provides external systems/admins a live read-only balance + debt status
TRN Token Contract
Consults this module before allowing transfers or redemptions
MintThrottleController
References global debt state to determine mint/burn pressure limits
SubscriptionManager
Pauses and requires opt-in renewal if prior sub was priced differently
BoostingModule
Checks if user has enough clean TRN to initiate or continue boosts
LottoModule
Ensures only solvent accounts participate in daily TRN lotto drops
🧾 System Guarantees
No negative balances ever occur
No TRN can exit the ecosystem unless debt is zero
All platform consumption must be backed by fruit entitlement or live earnings
All Merkle-settled balances are final and reflected in the next day's usage window
🚫 Abuse Prevention
Users cannot over-subscribe or re-subscribe to lower-priced plans
Users cannot game fruit balance through boosting and retrns without content performance
If a user runs out of TRN, they must:
View ads
Wait for organic views of their posts
Receive blessings
Participate in LottoModule rewards
✅ Outcomes
Zero-debt enforcement ensures economic sustainability
Real-time enforcement preserves UX fluidity while maintaining platform integrity
No staking required — the fruit + ledger system replaces traditional locks
Last updated