Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 3.46 KB

SPEC_V2.md

File metadata and controls

96 lines (61 loc) · 3.46 KB

frac721

Frac721 is a CosmWasm smart contract designed for fractionalizing NFTs from specific CW721/SG721 collections, allowing users to deposit NFTs, receive tradable TokenFactory tokens representing fractional ownership, and reclaim NFTs from the vault.

Core functionalities

  • Initial Deposit Period

    • The instantiator of the contract can decide on an initial deposit period. All NFT deposits made during this period are locked in until the end of the period, and depositors are awarded a special Genesis tag in the contract.
  • Fee Distribution Tiers

    • Fees are distributed between OhhNFT, the instantiator of the contract, and the NFT depositors. Users in the Genesis depositor tier receive a larger share of the fees generated by the contract.
  • NFT Depositing

    • Users can deposit NFTs from a specified CW721/SG721 collection into a vault managed by the contract.
  • Token Generation

    • Upon depositing an NFT, the contract issues a TokenFactory token to the user. This token represents fractional ownership of the deposited NFT.
  • Claiming NFTs

    • Users can claim any NFT from the vault by paying with one TokenFactory token. When a token is used for claiming, it is burned, removing it from circulation.
  • Fee for Fractionalization

    • Users are charged a fee for fractionalizing their NFT. The type of coin and percentage to charge used for this fee is set in the contract's configuration.
  • Fee for Claiming

    • Users are charged a fee for claiming an NFT. The type of coin used for this fee and percentage to charge is set in the contract's configuration.

Contract methods

Deposit{} (CW721 Send)

The Deposit method extends CW721Receiver and issues a singular token to the message sender in exchange for their NFT.

If the deposit is made during the initial deposit period, the depositor's address is added to the GenesisDepositors map.

Claim{token_id}

The Claim method requires for a singular TokenFactory token to be sent and sends the requested NFT to the message sender. The contract will subsequently burn the token.

Terminology

Vault

Describes the entirety of the NFTs stored in the contract.

Depositing

Describes the action of trading in 1 NFT in exchange for 1 token to be minted.

Claiming

Describes the action of trading in 1 token, to be burned, in exchange for 1 NFT out of the vault.

Genesis Depositor

Describes an address that deposited an NFT during the initial deposit period.

Contract instantiation

The contract is instantiated by calling Instantiate{collection_address, token_address, initial_deposit_end_date}. token_address represents the address of the TokenFactory token.

Storage

Deposited NFTs

Deposited NFTs are stored as follows:

pub struct VaultItem {
   pub token_id: String,
   pub depositor: Addr
}

Genesis depositors

Genesis depositor addresses are stored as follows:

pub struct GenesisDepositor {
  pub address: Addr,
  pub first_deposit_date: String,
  pub first_deposit_token_id: String
}

Next steps

  • Honoring creator royalties
    • Should creator royalties be paid out from fees generated from users fractionalizing and/or claiming NFTs?
  • Instantiation fee
    • What should be the instantiation fee be?
    • How much of it should be allocated to the creator of the collection?
    • How much of it should be used to boostrap the liquidity pool, if at all?
  • Instantiator whitelist
    • Should the instantiation of frac721 be whitelisted?