Categories
Ref: medium

Reviving Music NFTs: How Dynamic Pricing and Rewards Can Bridge the Gap Between Fans and Artists | by Abusomwan Santos | Oct, 2024

MUSIC NFT was a unique technology, as a music and web3 enthusiast, it was what we all longed for, but it never really lived up to the hype cause. Was there a huge disconnect between the fans and the artiste or was there lack of mainstream acceptance, or maybe there was just no use case or an argument for MusicNFTs, the lack of tangible utility, failure to sustain engagement, and no provision of rewards that incentivize ownership or listening.

So how can we address this disconnect, lack of use cases and maybe revive this industry, so how can we address the disconnect, onboard noobs and probably go mainstream, well it REWARD. if I buy a musicNFT, what do I do with it , art is art, but music might not carry the same feeling as images so again reward is the answer. In Nigeria, there’s a huge wave of a new farming technique, its simple as tapping your screen and you’ll earn rewards, if people can spend hours tapping their screen to earn rewards surely they will want to listen to music to earn rewards.

Why can’t we sell NFT like we do erc20 tokens, why do we have to set static price instead of a dynamic price based on the NFT activity. ERC20 token prices are usually based on their supply, but instead of a relationship with demand and supply we use interactions, this dynamic pricing model adjusts the price of an NFT based on user interactions, specifically the play count, playlist additions, and unique listeners over time. The model accounts for both growth and decay, ensuring that pricing reflects recent activity without allowing for indefinite price inflation. This could make the price feel more organic and reflective of the NFT’s popularity. Bonding curves and decay mechanisms could be built to ensure prices aren’t over-inflated simply by hype, giving a fair valuation based on ongoing user interest

  • basePrice: The initial price of the NFT, which serves as a baseline before applying dynamic adjustments.
  • recentPlays: An array of play records, each containing a timestamp and play count, representing how many times the NFT was played recently.
  • recentPlaylists: The number of playlists in which the NFT was added recently.
  • recentListeners: The count of unique listeners who engaged with the NFT recently.
  • k (Play Growth Rate): Controls the exponential growth of the price based on decayed play count.
  • alpha (Playlist Weight): Defines the significance of playlist additions in pricing. This coefficient is small to minimize potential gaming.
  • beta (Unique Listener Weight): Influences the price based on unique listener count. A higher value than alpha, reflects the importance of diverse listener engagement.
  • decayRate: Determines the rate at which previous plays lose influence over time, implemented to ensure recent plays have more impact on price.
  1. Decay Rate Calculation

To calculate how recent plays decay over time, we use a half-life approach. The decay rate formula is:

2. Decayed Play Count Calculation

  • To compute the effective play count with decay applied, each play is adjusted based on the time since it occurred:
    decayedPlay=∑i=1nplayCounti×e−decayRate×(currentTime−playTimestampi)text{decayedPlay} = sum_{i=1}^{n} text{playCount}_i times e^{-text{decayRate} times (text{currentTime} — text{playTimestamp}_i)}decayedPlay=i=1∑n​playCounti​×e−decayRate×(currentTime−playTimestampi​)
  • Here, currentTime is the time at which the calculation is made, and each playTimestamp_i is the timestamp of a previous play.
  1. Dynamic Price Calculation
  • The final dynamic price is calculated by combining factors based on the decayed play count, playlist additions, and unique listeners:
"use server";
import { calculateDecayedPlayCount } from "./helper/decayed-count";

export const calculateDynamicPrice = async (
basePrice,
recentPlays,
recentPlaylists,
recentListeners
) => {
console.log(basePrice, recentPlays, recentListeners, "from dynamic price");
const k = 0.005; // Growth rate for decayed play count
const alpha = 0.0002; // Weight of playlist factor
const beta = 0.03; // Weight of unique listeners factor
const decayRate = 0.001; // Decay rate for play influence

// Decayed play count based on recent plays and decay rate
const currentTime = Date.now() / 1000; // Current time in seconds
const decayedPlayCount = calculateDecayedPlayCount(
recentPlays,
decayRate,
currentTime,
recentPlaylists
);

// Logarithmic growth modifiers for playlists and unique listeners
// const playlistFactor = 1 + alpha * Math.sqrt(recentPlaylists);
const listenerFactor = 1 + beta * Math.log(1 + recentListeners);

// Calculate final price with all factors
const dynamicPrice =
basePrice *
Math.exp(k * decayedPlayCount) *
playlistFactor,
listenerFactor;

return parseFloat(dynamicPrice.toFixed(4)); // Return price rounded to 4 decimal places
};

Each component contributes to the price as follows:

  • Play Factor (e^{k times text{decayedPlayCount}}): Drives exponential growth, allowing price to rise with higher play counts.
export const calculateDecayedPlayCount = (
plays: [],
decayRate: GLfloat,
currentTime: Number
) => {
return plays.reduce((total, play) => {
const timeSincePlay = currentTime - unixTimestamp(play.timestamp);
const decayedPlay = play.count * Math.exp(-decayRate * timeSincePlay);
return total + decayedPlay;
}, 0);
};
  • Playlist Factor (1 + alpha times ln(1 + text{recentPlaylists})): Moderates the effect of playlist count using logarithmic growth to reduce impact from excessive playlist additions.
 const decayedPlaylistCount = playlistRecords.reduce((total, record) => {
const timeAdded = new Date(record.updatedAt).getTime() / 1000;
const timeSinceAdded = currentTime - timeAdded;
const nftCount = record.listednft.length;
const decayedCount = nftCount * Math.exp(-decayRate * timeSinceAdded);

return total + decayedCount;
}, 0);

  • Listener Factor (1 + beta times ln(1 + text{recentListeners})): Adds value based on listener diversity, rewarding content that engages unique users.
export const calculateDecayedUniqueListeners = async (nftId: string) => {
// Fetch unique listeners for the past 7 days
const recentListenerRecords = await db.uniqueListener.findMany({
});
console.log(recentListenerRecords, "recent listeners");

const currentTime = Date.now() / 1000;
const decayRate = calculateDecayRate();

// Calculate decayed unique listener count
const decayedListenerCount = recentListenerRecords.reduce((total, record) => {
const recordTime = new Date(record.date).getTime() / 1000;
const timeSinceRecord = currentTime - recordTime;
const decayedCount =
record.listenerCount * Math.exp(-decayRate * timeSinceRecord);
return total + decayedCount;
}, 0);

return decayedListenerCount;
};

Source link

About Author

Leave a Reply

Your email address will not be published. Required fields are marked *