🔥
XenBurner GitBook - $XBURN
  • XenBurner v1.0: Technical Whitepaper
Powered by GitBook
On this page
  • Introduction
  • Core Components
  • Burning Mechanism & Tokenomics
  • XLOCK NFT System
  • Swap & Burn Cycle
  • Contract Details & Security Features
  • User Interaction
  • Economic Incentive Structure
  • Technical Specifications
  • Conclusion

XenBurner v1.0: Technical Whitepaper

What Is XenBurner?

Last updated 1 month ago

Introduction

XenBurner is an EVM protocol designed to enhance the XEN ecosystem through a sophisticated deflationary mechanism that leverages NFT-based time-locked positions. Version 1.0 introduces the XLOCK NFT system, amplifier mechanics, and an improved reward structure to create a sustainable economic model that benefits both short and long-term participants.

This whitepaper outlines the technical specifications, mathematical models, contract interactions, and economic principles that form the foundation of the XenBurner ecosystem.

Core Components

XenBurner v1.0 consists of two primary smart contracts that work in tandem:

  1. XBurnMinter: The main contract responsible for burning XEN, minting XBURN, tracking user statistics, and managing the swap mechanism.

  2. XBurnNFT (XLOCK): An ERC-721 contract that represents time-locked burning positions as tradable NFTs, with on-chain generated SVG images.

Burning Mechanism & Tokenomics

Token Distribution Model

The XenBurner protocol operates on a burn-to-earn model with a time-preference component:

  • Base Ratio: 1,000,000 XEN = 1 XBURN (base)

  • Initial Supply: 1,000,000 XBURN (allocated for liquidity)

  • Supply Dynamics: Deflationary for both XEN and XBURN through systematic burning

Split Burning Mechanism

When users burn XEN tokens, the amount is divided:

  • 80% is burned directly through the XEN contract's burn function

  • 20% is accumulated in the XenBurner contract for future swap operations

This split approach ensures immediate supply reduction while providing resources for the ongoing swap-and-burn cycle.

Amplifier System

The amplifier is a time-based multiplier that rewards early participation:

  • Starting Value: Xen's Amp on Launch Day

  • Decay Rate: Decreases by 1 each day

  • Minimum Value: 1 (reached after 2999 days)

  • Formula: CurrentAmplifier = MAX(AMP_START - daysSinceLaunch, AMP_END)

For transparency, the current amplifier value is accessible through the getGlobalStats() function.

Time-Preference Model

Users can lock their positions for varying durations:

  • Minimum Term: 1 day

  • Maximum Term: 3650 days (~10 years)

  • Term Bonus: Calculated as a percentage of the 365-day period

Reward Calculation

XBURN rewards are determined by a formula that considers three key factors:

CopyBaseAmount = XENBurned / BASE_RATIO
TermPercentage = (termDays * 100) / 365
AmpPercentage = (amplifierSnapshot * 100) / AMP_START
Bonus = (BaseAmount * TermPercentage * AmpPercentage) / 10000
TotalReward = BaseAmount + Bonus

This formula creates a balanced reward system where:

  • Burning more XEN increases the base reward linearly

  • Longer lock periods increase rewards up to 100% (at 365 days)

  • Earlier participation (higher amplifier) increases rewards up to 100% (at 3000 amplifier)

  • Maximum possible bonus is 100% (double the base amount)

XLOCK NFT System

NFT Representation

Each burning position is represented by an NFT that contains:

  • Amount of XEN burned

  • Lock duration and maturity timestamp

  • Amplifier value at lock creation

  • Base and total reward amounts

  • Dynamic on-chain generated SVG image

NFT Lifecycle

  1. Creation: When a user burns XEN, an NFT is minted to their wallet

  2. Maturity: After the lock period expires, the NFT becomes claimable

  3. Claiming: User claims the XBURN reward, and the NFT is burned

  4. Emergency End: User can choose to exit early with just the base reward

Transferability

XLOCK NFTs are transferable until claimed, allowing for:

  • Secondary market trading of lock positions

  • Transfer of positions between wallets

  • Potential price discovery for time-locked XBURN

After claiming, the NFT is burned and cannot be transferred.

Swap & Burn Cycle

Accumulation Phase

XEN tokens accumulate in the contract from the 20% portion of all burns.

Threshold Trigger

When accumulated XEN reaches the threshold (100,000 XEN), the swap function becomes available.

Swap Execution

Any user can trigger the swap function, which:

  1. Rewards the caller with 5% of the accumulated XEN

  2. Swaps the remaining 95% XEN for XBURN through Uniswap

  3. Burns 100% of the received XBURN, reducing supply

Cyclical Deflation

This creates a self-perpetuating cycle of deflation:

  • XEN burns create XLOCK positions

  • Accumulated XEN is swapped for XBURN

  • The swapped XBURN is burned

  • Both tokens continuously decrease in supply

Contract Details & Security Features

XBurnMinter Contract

Key functions in the XBurnMinter contract:

solidityCopy// Burns XEN and creates a locked position
function burnXEN(uint256 amount, uint256 termDays) external nonReentrant

// Claim XBURN from a matured position
function claimLockedXBURN(uint256 tokenId) external nonReentrant

// Claim multiple positions at once
function batchClaimLockedXBURN(uint256[] calldata tokenIds) external nonReentrant

// Early exit with reduced reward
function emergencyEnd(uint256 tokenId) external nonReentrant

// Trigger the XEN-XBURN swap and burn
function swapXenForXburn(uint256 minXburnReceived) external nonReentrant

// Initialize liquidity (one-time function)
function initializeLiquidity(uint256 xenAmount) external onlyOwner

XBurnNFT Contract

Key functions in the XBurnNFT contract:

solidityCopy// Mint a new NFT position (called by XBurnMinter)
function mint(address to, uint256 xenAmount, uint256 termDays, uint256 ampSnapshot, uint256 rewardAmount) external onlyMinter returns (uint256)

// Mark a position as claimed (called by XBurnMinter)
function setClaimed(uint256 tokenId) external onlyMinter

// Burn an NFT after claiming (called by XBurnMinter)
function burn(uint256 tokenId) external onlyMinter

// View function to get lock details
function getLockDetails(uint256 tokenId) external view returns (...)

// View function to get all locks owned by a user
function getAllUserLocks(address user, uint256 page, uint256 pageSize) external view returns (...)

Security Measures

XenBurner v1.0 incorporates multiple layers of security:

  1. Reentrancy Protection: All state-changing functions use OpenZeppelin's ReentrancyGuard

  2. Safe ERC20 Transfers: Uses SafeERC20 for protection against non-compliant tokens

  3. Access Control: Functions restricted by appropriate modifiers (onlyOwner, onlyMinter)

  4. Error Handling: Custom errors with descriptive messages for better debugging

  5. Gas Optimization: Functions split to reduce stack depth and batch operations limited to prevent gas limits

  6. Checks-Effects-Interactions Pattern: State variables updated before external calls

  7. Input Validation: Extensive parameter checking with appropriate error messages

User Interaction

Burning XEN for XLOCK

javascriptCopy// Approve the contract to spend your XEN
await xenContract.approve(xburnMinterAddress, amount);

// Burn XEN for a lock position (amount in wei, termDays in days)
await xburnMinter.burnXEN(amount, termDays);

Claiming XBURN

javascriptCopy// Claim a single position
await xburnMinter.claimLockedXBURN(tokenId);

// Emergency claim (get base amount only)
await xburnMinter.emergencyEnd(tokenId);

Swapping Accumulated XEN

javascriptCopy// Check accumulation progress
const progress = await xburnMinter.getAccumulationProgress();

// Trigger swap when threshold is reached
await xburnMinter.swapXenForXburn(minXburnReceived);

Viewing User Information

javascriptCopy// Get user's locked tokens
const locks = await xburnMinter.getUserLocks(userAddress);

// Get detailed stats
const stats = await xburnMinter.getStats(userAddress);

// Get global stats
const globalStats = await xburnMinter.getGlobalStats();

Economic Incentive Structure

User Incentives

  1. Long-term Holders: Maximize rewards by locking for longer periods

  2. Early Adopters: Benefit from higher amplifier values

  3. Arbitrageurs: Trade XLOCK NFTs based on time value

  4. Swap Initiators: Earn 5% of accumulated XEN by triggering swaps

Protocol Incentives

  1. Continuous Deflation: Both XEN and XBURN decrease in supply

  2. Liquidity Deepening: Swap operations strengthen liquidity pools

  3. Reduced Sell Pressure: Time-locked rewards distribute selling over time

  4. Self-Sustaining Economics: No external subsidies or emissions required

Technical Specifications

  • Base Ratio: 1,000,000 XEN = 1 XBURN

  • Initial Supply: 1,000,000 XBURN

  • Swap Threshold: 500,000,000 XEN

  • Amplifier Start: Xen's Amp

  • Amplifier End: 1

  • Minimum Term: 1 day

  • Maximum Term: 3650 days

  • Caller Reward: 5% of swapped XEN amount

Conclusion

XenBurner v1.0 represents a significant evolution in token burning mechanics, combining time-preference economics, NFT technology, and automated market operations. By creating a system where users can choose their commitment level and receive proportional rewards, the protocol establishes a balanced economy that benefits participants across different time horizons.

The XLOCK NFT system adds a new dimension to traditional burning mechanisms by making time-locked positions tradable, creating secondary markets and price discovery for future XBURN rewards. Meanwhile, the automated swap and burn cycle ensures continuous deflation of both tokens without requiring ongoing management.

Through careful economic design and robust technical implementation, XenBurner v0.2 aims to create long-term value for the XEN ecosystem while providing transparent and flexible participation options for users at all levels.