How It Works

Bag vs Bag revolutionizes token economics by creating a winner-takes-most system. Using the bags.fm API, we configure tokens so that the largest holder receives 99% of all trading fees, while the remaining 1% goes to the development team.

This creates an intense PvP environment where every trade matters and holding the biggest bag means earning almost all the rewards.

99%
Fees to Top Holder
1%
To Dev Team
Real-time
Updates

The Competition Process

  • 1
    Token Launch
    A new token is created with Bag vs Bag mechanics using the bags.fm API, setting up the 99% to top holder / 1% to dev team fee split.
  • 2
    Trading Begins
    Users buy and sell tokens. All trading fees are collected and distributed according to holder rankings.
  • 3
    Real-time Tracking
    The system continuously monitors who holds the most tokens and automatically updates fee recipients.
  • 4
    Crown Changes Hands
    When someone accumulates more tokens than the current leader, they instantly become the new 99% fee recipient.

Technical Implementation

We leverage the bags.fm API to create and manage these competitive token mechanics. Here's how the system works under the hood:

Setting Up Fee Distribution
// Configure the 99% to top holder / 1% to dev team split const setupBagVsBag = async (tokenAddress, devWallet) => { const config = { 'distributionType': 'winner-takes-most', 'topHolderShare': '0.99', // 99% to biggest bag 'devTeamShare': '0.01', // 1% to development team 'devWallet': devWallet, 'updateFrequency': 'realtime' }; await fetch('https://bags.fm/api/configure-fees', { 'method': 'POST', 'body': JSON.stringify({ tokenAddress, config }) }); };
Monitoring Top Holder
// Track holder rankings and update fee recipients const monitorHoldings = async (tokenAddress) => { const response = await fetch( `https://bags.fm/api/holders/${tokenAddress}` ); const holders = await response.json(); // Get current top holder const topHolder = holders.sort((a, b) => b.balance - a.balance )[0]; // Update fee recipient to top holder await updateFeeRecipient(tokenAddress, topHolder.address); };
Real-time Updates
// Listen for balance changes and update rankings const handleBalanceChange = async (event) => { if (event.type === 'TRANSFER') { // Check if this transfer changed the top holder const newRankings = await getHolderRankings(event.tokenAddress); const currentTop = newRankings[0]; // Update fee distribution if crown changed hands if (currentTop.address !== previousTopHolder) { await redistributeFees(event.tokenAddress, currentTop.address); console.log(`New king: ${currentTop.address}`); } } }; // Subscribe to bags.fm events bagsAPI.on('balanceChange', handleBalanceChange);

Why This Changes Everything

Traditional token economics distribute rewards proportionally - boring and predictable. Bag vs Bag creates real stakes where winner takes almost all.

This system transforms token holding from passive investment into active competition. Every purchase could dethrone the current leader. Every sale could lose the crown.

The 99% concentration means that being the top holder isn't just about bragging rights - it's about capturing nearly all the value generated by the token's trading activity. Meanwhile, the development team receives 1% to support ongoing project development.

Creating a Bag vs Bag Token
// Launch a new competitive token on bags.fm const launchBagVsBagToken = async (tokenData) => { const response = await fetch('https://bags.fm/api/create-token', { 'method': 'POST', 'headers': { 'Content-Type': 'application/json' }, 'body': JSON.stringify({ 'name': tokenData.name, 'symbol': tokenData.symbol, 'feeStructure': { 'type': 'competitive', 'winnerShare': 0.99, 'loserShare': 0.01 }, 'realTimeUpdates': true }) }); return await response.json(); };