Skip to main content

Tiny SPL

Introduction

Tiny SPL enables ownership of Solana tokens without incurring rent fees.

Traditionally, token balances are stored on-chain. Keeping this data on-chain takes up space, so Solana charges a "rent" fee of ~0.002 SOL for the storage. i.e. you paid ~0.002 SOL to store information on how much BONK your wallet owns on-chain.

With the price of SOL rapidly increasing, this rent fee is getting more and more expensive. Tiny SPL utilizes state compression on Solana to allow you to own tokens without paying rent.

This document will be giving a high level technical overview of how the Tiny SPL protocol works.

How does it work

Tiny SPL tokens are represented by compressed NFTs. Token balances are divided into multiple parts, necessitating token management through our website. For instance, using the example of the first Tiny SPL token NUTS, to send 1 NUTS, you would split 125 NUTS into 124 NUTS and 1 NUTS before transferring.

Creating a mint

Since Tiny SPL tokens are NFTs, all tokens under the same mint address are grouped into the same NFT collection. A Tiny SPL's mint address is the same as its NFT collection mint address.

Information for a certain token mint is stored in the tiny_spl_authority account. The account is a PDA of the Tiny SPL program.

Tiny SPL authority account

Seeds
SeedTypeDescription
Tiny SPL
Literal: tiny_spl
The program's prefix for PDA seeds.
Collection mint address
Variable
The public key of the NFT collection that we are grouping the Tiny SPL tokens under.
Fields
FieldTypeDescription
Version
Version
Struct version.
Is Verified Tiny SPL Mint
bool
A boolean flag representing if the PDA stores info of a valid Tiny SPL
Current Supply
u64
The number of minted Tiny SPL tokens part for this certain mint.
Mint Authority
Option<PubKey>
The optional authority who can mint additional Tiny SPL tokens.
Decimals
u8
Max Tiny SPL token decimal count.
SPL Wrapper Mint
Option<Pubkey>
Wrapped SPL token version of this Tiny SPL token. This wrapped SPL token will only be used to perform swaps through the SwAPNuiTrUSw3p96z3dUBW7d51ge8UiRsnWAtRLnF8e program via a CPI.
Seller Fee Basis Points
u16

Fee to receive (basis points) for each sale on an NFT marketplace. The fee is sent to this account (The Tiny SPL authority account),

Update Authority
Option<PubKey>

An optional authority that is allowed to make changes to the fields in this struct. Also allows update of deployed token's metadata after minting.

Metadata Base URL
String

Base URL to use as token metadata. An example base URL would be https://metadata.tinys.pl/v2. The query parameters ?id=<NFT collection id>&amount=<machine amount> will be added to NFT's metadata url to encode the balance and mint address that the NFT represents.

Example metadata URL produced from base URL for 1 NUTS: https://metadata.tinys.pl/v2/collection?id=DEEZyno8D9RCCghEWkTNarZrCW7HvvWE9z64tiqvQKpH&amount=100000000

Making a call to the create_mint instruction will create an NFT collection where the tiny_spl_authority PDA is the only upgrade authority. All the required fields in the tiny_spl_authority account will also be populated, thus representing the parameters of a certain Tiny SPL token!

Minting tokens

The mint_authority will be able to mint tokens to Solana public keys. How it works is simple, by specifying a certain amount of tokens to be minted to a public key, a new cNFT will be minted as part of the NFT collection specified in the tiny_spl_authority account. The minted tokens will be represented by an NFT with metadata that contains the token logo and token amount.