Git Product home page Git Product logo

creator-tokens's People

Contributors

apbendi avatar garyghayrat avatar jorgeavaldez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

maxmux-xyz

creator-tokens's Issues

Pause / Unpause Functionality

  • The contract should have a pause state that defaults to false
  • The creator or the admin can set the pause state, and should pass true or false when setting (i.e. not a toggle)
  • No other address should be able to call pause
  • When the contract is Paused/Unpaused a ToggledPause should be emitted with the old state, new state, and the address that called the method
  • While paused the buy and sell methods should revert

Change naming from pay/mint to "Buy"

The payAndMint methods should be updated to simply buy. The Minted event should be renamed to Bought. Variables in all tests should be updated to match. Note: _mintAndIncrement should remain named as such since it describes the actual minting operation happening to the token, not the higher level concept of buying.

Emit Events on update actions

When updating the admin, creator, or token URI, we should emit a relevant event with the old and new value. We should add test for these emissions.

Creator Token NFT Contract Requirements

  • Should be a standard ERC-721 Token
  • Upon deployment, should mint first token to creator address specified during deployment
  • Upon deployment, should optionally mint the second token to a referrer address specified during deployment
  • All subsequent buys should be paid for with USDC
  • Price of the second minted token should be 1 USDC
  • User should also be able to pay with ETH via immediate swap (should this be a separate wrapper/router contract?)
  • Buyer should specify a maximum willing to pay per mint
  • Price of all subsequent tokens should be calculated on a bonding curve
  • #27
  • The contract should have a creator fee & an admin fee value that are set on deployment and immutable afterwards
  • The contract should send a fee to the creator on buy
  • The contract should send a fee to showtime on buy
  • All funds from the sale should be escrowed by the contract
  • User should be able to sell the NFT back to the contract, which burns it upon sale
  • The last holder of the NFT—or, if there was a referrer mint during deployment, the last two holders of the NFT—should not be able to sell them back to the contract, because the funds are not availble
  • The price of the sale is determined by the same bonding curve
  • The contract should take a fee to the creator upon sale
  • The contract should take a fee to showtime upon sale
  • #30
  • The funds paid to the seller should come from the smart contract's escrow
  • The creator (same address as specified during deployment) should be able to pause/unpause minting/burning
  • Showtime should be able to pause/unpause minting/burning
  • #7
  • #8
  • #39
  • #16
  • #17
  • #36
  • Nice to have/stretch feature: the ability for the admin to globally pause (question: is it ok if this can't be overriden by the creator?)

Implement Bulk Selling

  • User provides a list of NFT IDs they must own
  • Naively iterate and sell all NFTS
  • User provides a min acceptable total payout

Bonding Curve Contract Requirement

  • Should be a pure function utility that takes parameters and returns price
  • Should be steeper for first 1,000 NFTs and flatten out afterwards, ideally in the $100-$500. range
  • Should re-use a battle tested curve, such as SoundSwap, audit, source

Sell / Burn Functionality

  • User should be able to sell the NFT back to the contract, which burns it upon sale
  • The contract should take a 7% fee to the creator upon sale
  • The contract should take a 3% fee to showtime upon sale
  • The last NFT in circulation should not be burnable/sellable, because the contract will not have any escrow funds and the "price" will be assumed to be zero

Buyer should be able to bulk buy more than 1 NFT

  • The buyer should be able to specify purchasing/minting N tokens at once and get them all in once transaction
  • This can be a naive implementation that simply iterates over the buy method, it does not need to be optimized
  • Should this be implemented as an external, universal router contract, or an additional method on the CreatorToken contract?
  • The bulk buy method should take a _maxPayment argument that specifies the maximum the user is willing to spend on all NFTs and fees combined
  • [ ]We should provide a new helper view method that calculates the cost the token at an ID passed in as a parameter. Integrators can use this method with multicall to calculate the total cost of buying a batch of NFTs in a range
  • We should update the buy method(s) to return the _totalPrice spent on the NFT + fees when a purchase is made—this can be used to ensure the bulk buy total is less than specified
  • There should be a convenience method that uses msg.sender for the _to address (NFT receiver)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.