Artinals Protocol
  • Introduction
    • What is Artinals?
    • Overview of the Modules
    • Key Concepts and Terminology
  • Getting Started
    • Prerequisites
    • Cloning the Repository
    • Building and Testing the Modules
  • ART20
    • Overview and Capabilities
    • Data Structures
      • NFT
      • CollectionCap
      • UserBalance
      • TokenIdCounter
      • Dual IDs
    • Events
      • NFTMintedEvent
      • CollectionCreatedEvent
      • MetadataUpdateEvent
      • BurnEvent
      • TransferEvent
      • Additional Events
    • Functions and Entry Points
      • Initializing the Module
      • Creating Collections
      • Minting ART20 NFTs
      • Updating Metadata
      • Transfer and Burn Operations
      • Batch Operations
      • Deny List Mechanics and Authority
      • Custom Transfers
    • Value Sources (API, Oracle)
    • Best Practices & Examples
  • SALE Module
    • Purpose and Functionality
    • Interdependence
    • Price Index Module
    • Liquidity Module
    • Data Structures
      • NFTSale
      • NFTListing
  • Events
    • SaleCreated
    • NFTPurchased
    • PriceUpdateEvent
    • CurrencyWithdrawn
    • DenyList & Related Events
    • PoolCreatedEvent
    • OrderCanceled
    • OrderExecuted
  • Functions and Entry Points
    • Creating a Sale
    • Adding NFTs to a Sale
    • Purchasing NFTs from a Sale
    • Withdrawing Proceeds
    • Managing Sale State
    • Core Trading Functionality
  • Integrating with ART20
  • Examples & Best Practices
  • MARKET Module
    • Introduction
    • Testnet (Beta)
    • Smart Contract Overview
    • Data Structures
      • Trade Ledger (TradeLedger)
      • Trade Offer (TradeOffer)
      • Buy Offer (BuyOffer)
      • Ledger Registry (LedgerRegistry)
    • Event Structures
      • Offer Created (OfferCreated)
      • Offer Accepted (OfferAccepted)
      • Buy Offer Created (BuyOfferCreated)
      • Buy Offer Accepted (BuyOfferAccepted)
      • Batch Transactions
    • Event Emissions
    • Functions and Entry Points
      • Trade Ledger Management
      • Register Ledger
      • Get Trade Ledger
      • Create Sell Offer
      • Accept Sell Offer
      • Cancel Sell Offer
      • Create Buy Offer
      • Accept Buy Offer
      • Cancel Buy Offer
      • Batch Accept Sell Offers
      • Batch Accept Buy Offers
  • Security Mechanisms
  • TRADE Module
    • Introduction
    • Purpose and Ecosystem Role
    • Data Structures
      • TradingPool
      • LiquidityPosition
      • PriceOracle
      • CollectionPool
    • Events
      • PoolCreated
      • LiquidityAdded
      • LiquidityRemoved
      • TradeExecuted
      • PoolStatusChanged
      • PoolFeesUpdated
    • Functions and Entry Points
      • Creating and Managing Liquidity Pools
      • Adding/Removing Liquidity
      • Swapping NFTs and Tokens
      • Fee Mechanics and Distribution
      • Emergency Operations and Recovery
  • Working with Price Oracles
  • Metrics and Statistics (24h Volumes, TWAP, Price Impact)
  • Integration with SALE and ART20
  • Integration and Workflows
    • Typical User Journeys
      • Creating a Collection and Minting Tokens (ART20)
      • Listing and Selling NFTs (SALE)
      • Providing Liquidity and Trading NFTs (TRADE)
    • Example Scripts and Transactions
    • Interactions Between Modules
  • Security, Permissions, and Deny Lists
    • Introduction
    • Role of Deny List in ART20
    • Creator vs. Owner Permissions
    • Fee Distribution and Authority
    • Best Practices for Secure Deployment
  • Testing and Troubleshooting
    • Running Unit Tests
    • Common Issues and Solutions
    • Debugging and Emitting Debug Events
  • Advanced Topics
    • Value Sources (API Endpoints and Oracle Addresses)
    • Batch Update Operations
    • Customizing Parameters (Fees, Supply, Price Ranges)
    • Extensibility and Future Integrations
  • Appendices
    • Move Language and Sui Concepts
    • Glossary of Terms
    • Code Style and Conventions
  • Building on Top of the Artinals Contract
    • Overview
    • Package ID
    • Import Modules
    • Commom Integration Patterns
    • Best Practices
    • Common Errors and Solutions
Powered by GitBook
On this page

Examples & Best Practices

Example Workflows

This section provides example workflows demonstrating how to integrate the ART20 and SALE modules with the new trade features to create comprehensive NFT management and trading experiences.

1. Create and Sell a New Collection with a Trading Pool:

  • Create Collection (ART20):

    • Use mint_art20 to set up a new collection with a name, description, and initial supply of NFTs.

  • Initialize Deny List (Optional):

    • If needed, use initialize_deny_list and add_to_deny_list from the ART20 module to restrict certain addresses.

  • Create a Trading Pool (SALE):

    • Use create_trade_pool to establish a trading pool for the new collection, specifying the currency for trading.

  • List Initial NFTs (SALE):

    • Use create_sell_order to list a portion of the initial NFTs in the pool at a desired starting price. This creates the first sell orders in the order book.

  • Handle Trades (SALE):

    • As buyers place buy orders using create_buy_order, the match_orders function automatically matches compatible orders and executes trades.

  • Manage Orders (SALE):

    • Users can cancel their orders using cancel_order if needed.

  • Withdraw Proceeds (SALE):

    • Sellers can withdraw their earnings from the pool using withdraw_currency, with the option to split proceeds among multiple recipients.

2. Add More NFTs to an Active Trading Pool:

  • Additional Minting (ART20):

    • If the initial supply in the pool is low, call mint_additional_art20 to create more NFTs (ensuring max_supply is not exceeded).

  • Add to Existing Pool (SALE):

    • Use create_sell_order to add the newly minted NFTs to the existing pool at the desired price. This increases the available supply for trading.

3. Dynamically Adjust Prices and Orders:

  • Monitor Market (Off-chain):

    • Use off-chain tools or applications to monitor market activity, track price changes, and analyze liquidity metrics.

  • Adjust Orders (SALE):

    • Based on market observations, users can cancel existing orders using cancel_order and create new orders with adjusted prices using create_sell_order or create_buy_order.

  • Analyze Liquidity (SALE):

    • Utilize get_liquidity_metrics and get_liquidity_depth to analyze the current liquidity conditions in the pool and make informed trading decisions.

Best Practices:

  • Set Competitive Prices: Analyze market trends and competitor pricing to set competitive prices for your NFTs.

  • Provide Sufficient Liquidity: Ensure adequate liquidity in the pool by listing a reasonable number of NFTs at various price points.

  • Monitor and Adjust Orders: Actively monitor market conditions and adjust your orders accordingly to maximize trading opportunities.

  • Communicate with Users: Keep users informed about any changes to the trading pool, such as new listings or price adjustments.

  • Encourage Participation: Promote the trading pool and incentivize users to participate by offering competitive prices and favorable trading conditions.

By combining the core features of the ART20 and SALE modules with these trade functionalities and best practices, you can create a dynamic and engaging NFT marketplace that fosters user participation, price discovery, and a thriving ecosystem for your digital collectibles.

PreviousIntegrating with ART20NextIntroduction

Last updated 4 months ago