Skip to content

How It Works

Architecture

BAGSxBAGS is built on:

  • Solana - Fast, low-cost blockchain
  • bags.fm tokens - BAGS ecosystem tokens
  • Off-chain API - Manages collab state and eligibility
  • On-chain verification - Token balances and swap history

Flow

1. Collab Creation

Creator → Deposits tokens → Creates collab → Pool initialized

The creator:

  1. Selects two BAGS tokens
  2. Sets participation requirements
  3. Deposits tokens to the reward pool
  4. Collab goes live

2. Participation

User → Checks eligibility → Enters collab → Slot secured

When joining:

  1. System verifies token balances on-chain
  2. System verifies bags.fm swap history
  3. Entry is recorded with balance snapshot
  4. Participant count increases

3. Rewards

Collab ends → Pool divided → Users claim → Tokens sent

At conclusion:

  1. Status changes to "Claimable"
  2. Reward per user = Pool / Participants
  3. Each user claims their share
  4. Tokens transferred from operator wallet

Eligibility Verification

Token Balance Check

We query the Solana blockchain to verify you hold the minimum required tokens:

balance = getTokenAccountBalance(wallet, mint)
eligible = balance >= minimumRequired

Swap Verification

We check your transaction history to verify you've swapped on bags.fm:

transactions = getSignaturesForAddress(wallet)
swapFound = transactions.some(tx => isBagsSwap(tx))

Security

  • No token deposits required to join - You keep your tokens
  • On-chain verification - Balances checked directly on Solana
  • Equal distribution - No favoritism, everyone gets the same share
  • Transparent - All transactions visible on Solana Explorer

Built for the BAGS community