JSFiddle - React, Tailwind, and code Playground

by Adam Azad

JavaScript

const end = 1000
const interest = 1.01
// start price
let total = 0
let price = 0.0069

for (let nftIndex = 1; nftIndex < end; nftIndex++) {
  total = total + price * interest
  // Increase price by interest
  price = price * interest
}

// Last NFT price
console.log(`Last NFT: ${price.toLocaleString()} ETH`)
// Total ETH raised in the project before the last NFT is minted
const totalMintRewards = total * 0.7
const teamTotalBeforeLastMint = total - totalMintRewards
// Last NFT takes 30% of the team rewards
const teamTotalAfterLastMint = teamTotalBeforeLastMint * 0.7
console.log(`Total raised in sale: ${total.toLocaleString()}`)
// Rewards to people
console.log(`Total rewards for minters: ${totalMintRewards.toLocaleString()}`)
// Team/Treasury rewards before last NFT mint
console.log(
  `Team Revenue before the last mint: ${teamTotalBeforeLastMint.toLocaleString()} ETH`
)
// Team finalized raise
console.log(
  `Final Team Revenue (after giving 30% to the last NFT Minter) ${teamTotalAfterLastMint.toLocaleString()} ETH`
)