Understanding the Cubic Bonding Curve in Phrase.Trade Protocol

Phrase.Trade is revolutionizing the NFT landscape by introducing phrases as NFTs, creating a unique and creative marketplace. But what sets this protocol apart is its innovative pricing model — the cubic bonding curve. This curve determines how the price of an NFT evolves as more are minted, providing a dynamic, fair, and sustainable pricing system.

Let’s explore how the cubic bonding curve works in Phrase.Trade and why it’s essential for creators and collectors.

The Cubic Bonding Curve: What Is It?

A bonding curve defines the relationship between the supply of an asset and its price. In a cubic bonding curve, the price increases as the supply grows, but at an accelerating rate. This is crucial for Phrase.Trade, where the price of NFTs isn’t fixed but instead changes as more NFTs are minted.

In this protocol, each NFT is fractionalized into shares, with 18 decimal places for precision. The first share (1 * 10^18) is automatically transferred to the creator, making them the owner. As more shares are minted, the price per share increases according to the cubic bonding curve.

The Cubic Formula in Phrase.Trade

/**
     * @dev Returns the price of a share. Qubic function.
     * @param supply The total supply of shares
     * @param qty The quantity of shares to buy
     * @return price The price of the share
     */
    function getPrice(
        uint256 supply,
        uint256 qty
    ) public pure returns (uint256) {
        //        |‾‾ 0                                                                          ...if supply = 0
        // sum1 = |
        //        | (supply - E18) * (supply) * (2 * (supply - E18) + E18)
        //        | ---------------------------------------------------------                    ...if supply > 0
        //        |__                     (6 * E18)
        uint256 sum1 = supply == 0
            ? 0
            : ((supply - E18) * (supply) * (2 * (supply - E18) + E18)) /
                (6 * E18);

        //        |‾‾ 0                                                                          ...if supply = 0
        // sum2 = |
        //        | (supply - E18 + qty) * (supply + qty) * (2 * (supply - E18 + qty) + E18)
        //        | ---------------------------------------------------------------------------  ...if supply > 0
        //        |__                                  (6 * E18)
        uint256 sum2 = supply == 0 && qty == E18
            ? 0
            : ((supply - E18 + qty) *
                (supply + qty) *
                (2 * (supply - E18 + qty) + E18)) / (6 * E18);

        //              |‾‾ 0                                                                       ...if supply = 0
        // summation =  |
        //              | (sum2 - sum1)
        //              | -------------
        //              |__     E18                                                                ...if supply > 0
        uint256 summation = (sum2 - sum1) / E18;
        return summation / 16000;
    }

The pricing mechanism in Phrase.Trade is defined by a cubic formula that calculates the cost of a new NFT share based on the current supply. Below is the simplified formula used in the protocol:

Sum 1 (before purchase):

If the supply is zero, the sum is zero. Otherwise, the price is calculated as follows:

$$\text{sum1} = \frac{(supply - E18) \times supply \times (2 \times (supply - E18) + E18)}{6 \times E18}$$

Sum 2 (after purchase):

If the supply and quantity (qty) are both zero, the sum is zero. Otherwise, the price after the purchase is calculated as:

$$\text{sum2} = \frac{(supply - E18 + qty) \times (supply + qty) \times (2 \times (supply - E18 + qty) + E18)}{6 \times E18}$$

Final Price Calculation:

The price for the NFT share is determined by subtracting the sum before the purchase from the sum after the purchase and dividing by a constant factor:

$$\text{price} = \frac{(\text{sum2} - \text{sum1})}{E18} \div 16000$$

Breaking Down the Formula

  1. Sum 1 calculates the price based on the current supply of NFT shares.

  2. Sum 2 recalculates the price after a new quantity of shares is added.

  3. The difference between Sum 1 and Sum 2 gives the change in price due to the minting of new shares.

  4. Finally, the result is divided by a constant (16000) to normalize the price into a more manageable value.

Why the Cubic Bonding Curve Matters

This cubic bonding curve has significant implications for the Phrase.Trade ecosystem:

  • Incentivized Early Participation: Early adopters benefit from lower prices. As more shares are minted and the supply grows, the price increases, making it more expensive for latecomers. This creates a natural incentive for early participation.

  • Fair Pricing: The price of NFTs isn’t arbitrarily set but reflects the true demand. As more people mint or buy the NFT, the price adjusts, creating a fair market dynamic.

  • Creator Empowerment: The creator retains the first share of the NFT, making them the initial owner. This ownership can be retained or sold on secondary markets like OpenSea, allowing creators to capitalize on the success of their NFTs.

  • Sustainability: The cubic curve ensures that the price rises more sharply as the supply increases, preventing an oversupply of cheap NFTs and maintaining the value of the assets.

Conclusion

The cubic bonding curve is a powerful tool in the Phrase.Trade protocol, providing dynamic pricing that reflects supply and demand. By incentivizing early participation, ensuring fair pricing, and empowering creators, this model sets Phrase.Trade apart from traditional NFT platforms.

Whether you're a creator looking to mint unique phrase-based NFTs or a collector seeking to invest early, understanding the cubic bonding curve will help you navigate this innovative ecosystem. As Phrase.Trade continues to evolve, expect to see this approach reshaping how we think about NFT pricing and ownership.

Get ready to mint, trade, and explore a world where phrases come to life as NFTs — and where their value is defined by both creativity and mathematics.

0
Subscribe to my newsletter

Read articles from Phrase Trade Protocol directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Phrase Trade Protocol
Phrase Trade Protocol

Explore Phrase.Trade Protocol to mint unique, customizable text NFTs. Create, collect, and trade phrases securely on the blockchain. Join the community today!