Skip to content

Memes.surf Contract

The Memes.surf smart contract is the on-chain backbone of the platform. It handles meme creation, share-token issuance, trading via bonding curves, and NFT claiming - all on the TON blockchain.

Architecture Overview

Memes.surf consists of several interconnected smart contracts:

ContractPurpose
MemesSurf MasterFactory contract that deploys individual meme contracts
Meme ContractPer-meme contract managing shares and bonding curve
Share-Token (Jetton)TEP-74 compliant fungible token (1,000,000 supply per meme)
NFT Collection (TEP-62)TEP-62 compliant NFT collection (1,000 NFTs per meme)

Contract Lifecycle

Deploy Master Contract


┌──────────────────┐
│  User Launches   │──── Master deploys new Meme Contract
│  a Meme          │     + creates NFT collection (1,000 NFTs)
└──────────────────┘     + deploys Jetton (1,000,000 shares)


┌──────────────────┐
│  Users Trade     │──── Meme Contract handles buy/sell
│  Shares          │     via bonding curve pricing
└──────────────────┘


┌──────────────────┐
│  User Mints      │──── Burns all 1,000,000 shares
│  NFT             │     Mints 1 NFT from collection to user
└──────────────────┘

Master Contract

The master contract serves as the entry point for the platform. Its responsibilities include:

  • Meme Deployment - When a user launches a meme, the master contract deploys a new Meme Contract with the specified parameters
  • Fee Collection - Collects launch fees and trading fees
  • Registry - Maintains a registry of all deployed meme contracts

Master Contract Address

EQC...XXXXX

The contract address will be published upon mainnet deployment.

Meme Contract

Each meme gets its own dedicated contract that manages:

State

FieldTypeDescription
creatorAddressWallet address of the meme creator
nft_collectionAddressAddress of the NFT collection (1,000 NFTs)
jetton_addressAddressAddress of the share-token Jetton (1,000,000 supply)
total_sharesuint1,000,000 (fixed supply)
shares_burneduintNumber of shares burned (from NFT mints)
reservecoinsTON reserve in the bonding curve
nfts_minteduintNumber of NFTs minted from collection (out of 1,000)

Bonding Curve

The Meme Contract implements a bonding curve for price discovery:

  • Buy Price: Increases as more shares are purchased
  • Sell Price: Decreases as shares are sold back
  • Reserve: TON deposited in the contract backs the curve, ensuring liquidity

NFT Minting Mechanism

Each meme has a collection of 1,000 NFTs and 1,000,000 shares. When a user holds all 1,000,000 shares:

  1. The 1,000,000 shares are burned - permanently removed from circulation
  2. One NFT is minted from the collection and sent to the user's wallet
  3. This process can repeat until all 1,000 NFTs in the collection have been minted

Security

  • All contracts are written in FunC / Tact for the TON Virtual Machine
  • Non-custodial: users retain control of their assets at all times
  • Trading fees are collected at the contract level and distributed to the protocol treasury
  • NFT minting is irreversible - once shares are burned and an NFT is minted, the shares are permanently destroyed