æternity Documentation Hub
AeternityGitHub
  • æternity Hub
  • Welcome to æternity documentation
  • Getting Started
    • What is æternity?
    • How to Use Aeternity
  • æternity core concepts
    • Introduction
    • æternity Protocol
      • æternity Coin
      • Fast Æternity Transaction Engine (FATE VM)
      • æternity Nodes
        • Node architecture
        • Node types
        • Node Roles
      • Transactions
        • Types of transactions
        • Transaction Lifecycle
        • Transaction Fees
        • Meta-transactions and Generalized Accounts
        • State Channel Transactions
      • Networks
      • Consensus Mechanisms
        • Next Generation Nakamoto Consensus (Bitcoin-NG)
        • Cuckoo Cycle Proof of Work
        • Hyperchains and Delegated Proof of Stake
        • Governance and Weighted Coin Voting
      • State Channels
      • Oracles
      • Aeternity Naming System (AENS)
    • Hyperchains
      • Hyperchains Whitepaper
    • Aeternity Governance
    • Aeternity Foundation
  • aeternity user tools and services
    • Introduction
    • Run an æternity node
    • Hyperchains web app
    • Hyperchains Bridge app
    • Mine aeternity coin
    • Superhero DEX
    • Superhero Wallet
    • ærc Bridge
    • Make an NFT
    • aepps: decentralized applications on æternity
    • æScan: æternity blockchain explorer
  • æternity Developer tools
    • Quick Start Guide
      • Development Environment Setup
      • Essential Tools Overview
      • Æternity Stack
      • First Steps in Development
    • Protocol
      • Core Protocol Components
        • æternity Consensus Protocol
        • Generalized Accounts
        • Smart Contracts
          • FATE VM
          • Smart contract languages
            • æternity Sophia Language
              • In-Depth Overview
              • Sophia Compiler
              • Sophia Visual Studio
              • Sophia http
              • æREPL
            • Solidity
          • Contract Transactions
        • State Channels
        • Oracles
      • Network Layer
        • Nodes
        • Sync
        • Gossip
        • Stratum
      • Utility Features
        • æternity Naming System (AENS)
        • Seralization Formats
    • æternity Sophia Language
      • In-Depth Overview
      • Sophia Compiler
      • Sophia Visual Studio
      • Sophia http
      • æREPL
    • Development Infrastructure
      • CLIs
      • SDKs and APIs
        • Javascript/Typescript SDK
        • Java SDK
        • Outdated SDKs
        • Node API reference
      • Middleware
      • Testing and Deployment
        • æproject
        • Testnets and Faucet
    • Token Standards
    • Aepps: Building apps on Aeternity
      • Boiler Plates
        • Angular Boiler Plate
        • React JS BoilerPlate
        • Vue BoilerPlate
    • Data and analytics
      • æScan
    • ÆRC Bridge
  • Hyperchains
    • Hyperchains Development Guide
    • Hyperchains Bridge
Powered by GitBook
On this page
  • Token Standards on æternity
  • Fungible Token Standard (AEX-9)
  • Non-Fungible Token Standard (AEX-141)
  • Implementation Examples
  • DeFi Applications
  • NFT Collection Examples
  • Additional Implementation Examples
  • Getting Started

Was this helpful?

Export as PDF
  1. æternity Developer tools

Token Standards

PreviousTestnets and FaucetNextAepps: Building apps on Aeternity

Last updated 25 days ago

Was this helpful?

Token Standards on æternity

The æternity blockchain provides robust support for both fungible and non-fungible tokens through well-defined token standards. These standards ensure interoperability and consistency across different implementations while leveraging the security and efficiency of æternity's native FATE virtual machine. Similar to how ERC-20 and ERC-721 revolutionized token creation on Ethereum, AEX-9 and AEX-141 serve as the foundational standards for building fungible and non-fungible tokens on æternity.

These standards have enabled the development of various DeFi applications and NFT projects within the æternity ecosystem. From decentralized exchanges and tipping systems to complex NFT collections, developers can utilize these battle-tested standards and reference implementations to build secure and scalable token-based applications. The standards are specifically designed to take advantage of æternity's unique features, including state channels for scalability and the Sophia smart contract language for enhanced security.

Fungible Token Standard (AEX-9)

The standard, inspired by Ethereum's ERC-20, provides a robust interface for implementing fungible tokens. These tokens are ideal for creating cryptocurrencies, governance tokens, or any other asset where each unit is interchangeable with another. The standard includes essential functions for token transfers, allowances, and balance tracking.

Non-Fungible Token Standard (AEX-141)

The standard, modeled after ERC-721, enables the creation of unique, non-fungible tokens. This standard is perfect for digital collectibles, gaming assets, or any application requiring distinct, non-interchangeable tokens. The implementation includes comprehensive metadata handling and transfer mechanics specifically optimized for the æternity blockchain.

Implementation Examples

DeFi Applications

The æternity ecosystem features several production-ready DeFi implementations that showcase the versatility of the AEX-9 standard:

Reference Implementation

The serves as the official reference implementation of the AEX-9 standard. This implementation provides developers with a solid foundation for creating their own fungible tokens, complete with best practices and security considerations.

Token Sale and DEX

Social and Cross-Chain Solutions

  • Tipping System: The Superhero Social platform utilizes two key components:

NFT Collection Examples

    • Collection creation and management

    • NFT minting processes

    • Transfer functionality

    • Metadata handling

    • Integration with front-end applications

Additional Implementation Examples

    • Multiple implementation patterns

    • Various use cases for different NFT types

    • Best practices for AEX-141 implementation

    • Extended functionality examples

    • Integration patterns with other æternity features

Getting Started

To begin working with these token standards, developers can:

  1. Review the standard specifications (AEX-9 or AEX-141)

  2. Explore the reference implementations

  3. Clone and modify the example repositories

  4. Test implementations using the æternity SDK

  5. Deploy to testnet for thorough testing before mainnet deployment

// Example AEX-9 Token Interface
contract interface FungibleToken =
  record meta_info = {
    name : string,
    symbol : string,
    decimals : int }
    
  datatype event = 
    Transfer(address, address, int)
    | Allowance(address, address, int)
    
  entrypoint meta_info : () => meta_info
  entrypoint total_supply : () => int
  entrypoint balance : address => option(int)
  entrypoint transfer : (address, int) => unit

For detailed implementation guides, code examples, and best practices, please refer to the specific documentation sections for each standard and example project. You can also refer to the documentation for AEXs in general:

Token Sale Example: The demonstrates a straightforward implementation of a token sale contract, ideal for projects looking to launch their own tokens.

Superhero DEX: The implements an Automated Market Maker (AMM) protocol, powering the Superhero DEX. This sophisticated implementation shows how to create complex DeFi applications using AEX-9 tokens.

: Handles the core tipping functionality

: Manages the oracle-based claim system for tips

Cross-Chain Trading: The implements Hashed TimeLock Contracts (HTLC), enabling secure cross-chain token swaps through the JellySwap protocol.

: A production-ready example implementation that demonstrates:

: A comprehensive repository containing:

AEX-9
AEX-141
aeternity-fungible-token
aeternity-token-sale-example
dex-contracts-v2
tipping-contract
tipping-oracle-service
jelly-ae-htlc
aex141-nft-collection-example
aex141-examples
Cover

AEXs Documentation

Cover

AEX-9

Cover

AEX-141 Non-Fungible Token

Cover

AEX 11 Fungible Token