💱Trading Overview

The Capx platform offers a robust and dynamic marketplace for trading AI agents and their fractions. By enabling the buying, selling, and trading of AI agents, Capx facilitates a vibrant ecosystem where value can be exchanged seamlessly. This section provides an overview of the trading process on Capx, including the mechanisms, benefits, and steps involved in trading AI agents.


Key Features of Trading on Capx

  1. Decentralized Trading:

    • All transactions on Capx are decentralized, leveraging the security and transparency of blockchain technology.

    • Users can trade directly with one another without the need for intermediaries.

  2. Fractional Ownership:

    • AI agents can be fractionalized into ERC-20 tokens, enabling partial ownership and collaborative investment.

    • These fractions can be traded, providing liquidity and allowing more users to invest in AI agents.

  3. Liquidity Pools:

    • Liquidity pools are created with AI agent fractions paired with Capx tokens.

    • These pools ensure that there is always liquidity available for trading AI agent fractions.

  4. Price Discovery:

    • The marketplace facilitates price discovery through bidding, auction mechanisms, and market orders.

    • Buyers and sellers can determine the fair market value of AI agents and their fractions.

  5. Staking and Rewards:

    • Users can stake their Capx tokens in liquidity pools and earn rewards from transaction fees.

    • This incentivizes participation and enhances the overall liquidity of the marketplace.


How Trading Works on Capx

1. Listing AI Agents and Fractions

  • Creating Listings: Users can list their AI agents or fractions on the marketplace. Detailed descriptions and pricing information help attract potential buyers.

  • Setting Prices: Sellers can set fixed prices, reserve prices for auctions, or allow buyers to place bids.

2. Buying AI Agents and Fractions

  • Browsing Listings: Buyers can browse through available AI agents and fractions on the marketplace.

  • Placing Orders: Buyers can place orders to purchase AI agents or fractions at the listed prices or participate in auctions and bidding processes.

3. Trading in Liquidity Pools

  • Providing Liquidity: Users can provide liquidity by adding AI agent fractions and Capx tokens to liquidity pools.

  • Trading: Liquidity pools facilitate trading by ensuring that there is always a counterparty available for transactions.

  • Earning Rewards: Liquidity providers earn transaction fees as rewards, incentivizing them to maintain liquidity in the pools.

4. Redeeming Fractions

  • Full Ownership: Users who accumulate all fractions of an AI agent can redeem them for full ownership.

  • Redeeming Process: The redemption process involves burning the fractional tokens and transferring the full AI agent NFT to the user.


Example Trading Workflow

  1. Listing an AI Agent:

    • Navigate to the "Marketplace" tab and select "List AI Agent."

    • Provide details about the AI agent, including its capabilities, price, and description.

    • Confirm the listing to make it available on the marketplace.

  2. Buying an AI Agent:

    • Browse the marketplace for available AI agents.

    • Select an AI agent, review its details, and place an order to purchase it.

    • Complete the transaction by transferring the required Capx tokens to the seller.

  3. Fractionalizing and Listing Fractions:

    • Use the provided Solidity contracts to fractionalize an AI agent NFT into ERC-20 tokens.

    • List these fractions on the marketplace paired with Capx tokens in a liquidity pool.

  4. Trading Fractions:

    • Participate in liquidity pools by providing AI agent fractions and Capx tokens.

    • Trade fractions with other users, taking advantage of the liquidity provided by the pools.

    • Earn transaction fees as rewards for providing liquidity.

  5. Redeeming Fractions for Full Ownership:

    • Accumulate all fractions of an AI agent.

    • Use the redemption process to burn the fractional tokens and transfer the full AI agent NFT to your account.

Solidity Code Example

Here is a simplified example of how to create and fractionalize an AI agent NFT and list the fractions for trading.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract AgentNFT is ERC721, Ownable {
    uint256 public nextTokenId;

    constructor() ERC721("AgentNFT", "AIA") {}

    function mint(address to) external onlyOwner {
        _safeMint(to, nextTokenId);
        nextTokenId++;
    }
}

contract FractionalToken is ERC20, Ownable {
    IERC721 public agentNFT;
    uint256 public tokenId;
    bool public fractionsCreated;

    constructor(address _agentNFT, uint256 _tokenId) ERC20("AgentFraction", "AIF") {
        agentNFT = IERC721(_agentNFT);
        tokenId = _tokenId;
        fractionsCreated = false;
    }

    function createFractions(uint256 amount) external onlyOwner {
        require(agentNFT.ownerOf(tokenId) == address(this), "Contract does not own the NFT");
        require(!fractionsCreated, "Fractions already created");
        _mint(msg.sender, amount);
        fractionsCreated = true;
    }

    function redeem(uint256 amount) external {
        require(fractionsCreated, "Fractions not created yet");
        _burn(msg.sender, amount);
        if (totalSupply() == 0) {
            agentNFT.transferFrom(address(this), msg.sender, tokenId);
            fractionsCreated = false;
        }
    }
}

Trading AI agents on Capx is a seamless and rewarding experience. By leveraging the power of decentralized trading, fractional ownership, and liquidity pools, Capx provides a robust platform for users to monetize and invest in AI agents. The innovative marketplace ensures liquidity, facilitates price discovery, and offers multiple ways for users to engage with AI technology. Join the Capx marketplace today and start trading AI agents!

Last updated