SubscriptionNFT
The SubscriptionNFT
contract represents a non-transferable NFT that grants access to a creator’s token-gated content on a daily renewal basis. It forms the core enforcement mechanism of the subscription system, tightly integrated with the SubscriptionManager
and TRNUsageOracle
.
📌 Summary
1 NFT per creator per user
Auto-renews daily, subject to
TRNUsageOracle
approvalNon-transferable and non-reacquirable once revoked
Used as an access flag for all gated posts
Enforced burn if moderation or pricing changes apply
🔐 NFT Behavior & Rules
🔁 Auto-renewal
Each NFT renews once per day if the user has sufficient TRN or credit
🔒 Non-transferable
Cannot be transferred or traded
🧯 Burnable
Can be burned by the platform if rules are violated or pricing changes
🚫 Permanent lockout after burn
Once revoked, the user can never subscribe to that creator again
⏳ One per creator
User can only hold one SubscriptionNFT
per creator
✅ Access flag
Checked at view-time to determine permission for gated content
These NFTs are not collectible or tradable. They function purely as logic and access-layer tokens.
🧠 Access Enforcement Logic
Each token maps:
user → creator → active (bool)
expiresAt (timestamp)
lastRenewed (timestamp)
burned (bool)
priceAtTimeOfMint (uint256)
The view contract or frontend checks for the following conditions:
Does the user hold a valid, unburned
SubscriptionNFT
for the post's creator?Is the NFT’s timestamp still valid?
Is the subscription in "paused" or "burned" state due to pricing change or moderation?
Has the renewal succeeded for the current day?
If all checks pass, access is granted.
🔄 Renewal Process
The
SubscriptionManager
handles the daily renewal queue.Renewal charges 1 day’s worth of TRN from the user’s fruit balance via
TRNUsageOracle
.Renewals are automatically triggered post-drop, using actual earned balances (not projections).
Users with insufficient balance or moderation restrictions are paused.
Paused subscriptions can be resumed only if the creator hasn’t burned the NFT or raised the price.
🧯 Burn Conditions
NFTs are forcefully burned under the following conditions:
User chooses to cancel
NFT burned; user cannot re-subscribe to that creator again
Creator raises subscription price
All NFTs paused; users must opt-in again if permitted
Creator bans user
NFT burned permanently
Creator is regionally blocked
NFT becomes inert in that country
Platform moderation action
NFT burned as part of enforcement
The platform never allows re-entry once an NFT is burned.
🔎 Key Contract Interfaces
mint(address user, address creator)
Mints a new SubscriptionNFT if one does not exist
burn(address user, address creator)
Forcefully burns the NFT and flags user as banned
isValid(address user, address creator)
Checks if NFT is valid and not expired
pause(address user, address creator)
Temporarily disables a subscription for price-change scenarios
resume(address user, address creator)
Allows user to re-enter if not burned
NFT expiration and burn data is also reflected in the TRNUsageOracle
for sync.
🛡️ Enforcement Guarantees
Users cannot bypass the system via wallet changes, as burn logs are indexed by user ID or CID, not wallet address alone.
NFT minting is only allowed via
SubscriptionManager
, which checks all pricing and cooldown conditions.NFTs are non-renewable once burned, even if the creator deletes their account or lowers their price later.
🔗 Integration
SubscriptionManager
Orchestrates minting, burning, and renewal queues
TRNUsageOracle
Verifies credit, applies deductions, and manages renewals
BurnRegistry
Logs NFT burns tied to moderation or pricing logic
PostVaultSplitter
Routes revenue from active subscriptions to creators
DailyVaultSplitter
Sends the DAO's cut from subscription proceeds
📘 Example Flow
User subscribes to Creator A for 5 TRN/day.
NFT is minted by
SubscriptionManager
→SubscriptionNFT
.User views gated posts, verified by
SubscriptionNFT.isValid(...)
.Next day, renewal attempt pulls 5 TRN from
TRNUsageOracle
.If user only earned 2 TRN, renewal fails → NFT is paused.
If price is raised to 8 TRN, paused NFTs require re-opt-in at new price.
If user chooses to burn the NFT, they are permanently locked out.
Last updated