DODO Docs
Searchโ€ฆ
๐Ÿงฉ
NFT Fragmentation

Contract Name
Catalog
โ€‹DODONFTProxyโ€‹
contracts/SmartRoute/proxies/
โ€‹NFTCollateralVaultโ€‹
contracts/CollateralVault/
โ€‹Fragmentโ€‹
contracts/GeneralizedFragment/
โ€‹DODONFTRegistryโ€‹
contracts/Factory/Registries/

First the user creates a new Vault contract by calling the createNFTCollateralVault function in the DODONFTProxy contract, the Vault contract is used to store NFT, compatible with ERC721, ERC1155. and can set a global name for the Vault and a baseURI, the baseURI can point to the resource file, as the Vault's introductory information
function createNFTCollateralVault(
string memory name,
string memory baseURI
) external returns (address newVault);

A Vault contract is created to store NFTs, which the user can deposit into ERC721, ERC1155, and there is no limit to the number of NFTs, which can be one or more. The deposited NFTs are owned by the owner of the Vault contract, and the owner has the right to shard the whole unit in Vault.
If the user deposits ERC721 into the Vault, it is necessary to authorize ERC721 to the Vault contract, and the second step calls the depositERC721 function of the NFTCollateralVault, passing in parameters such as the ERC721 contract address and the tokenId array to be deposited.
function depositERC721(
address nftContract,
uint256[] memory tokenIds
) external;
If the user deposits ERC1155 to the Vault, it is necessary to authorize ERC1155 to the Vault contract, the second step calls the depositERC1155 function of NFTCollateralVault, the parameters passed include the address of the ERC1155 contract, as well as the array of tokenId deposited and the corresponding number:
function depoistERC1155(
address nftContract,
uint256[] memory tokenIds,
uint256[] memory amounts
) external;

Fragmentation is a unified fragmentation operation for the NFTs imported in the Vault. The process behind it includes generating ERC20 and creating a public pool of DODO Vending Machine, while adding liquidity to the pool and providing circulation to the secondary market, which is aggregated by DODO DEX to enable interchange of any coin with fragmented ERC20 tokens. Also fragmentation involves the process of transferring the Vault contract owner to the fragmented contract, i.e. after fragmentation, there is no NFT in the Vault for anyone to extract, ensuring that the fragmented ERC20 represents the entire NFT in the Vault.
Fragmentation needs to be triggered by the owner of the Vault, which is achieved by calling the createFragment function in NFTCollateralVault

The fragmented NFTs will be circulated in the secondary market, and the person who owns the fragmented token represents the person who owns a portion of the NFTs behind it. If the investor wants to own the NFT completely, the buyout function can be triggered by calling the buyout function of DODONFTProxy
function buyout(
address fragment,
uint256 quoteMaxAmount,
uint8 flag, // 0 - ERC20, 1 - quoteInETH
uint256 deadLine
) external;
Investors need to provide tokens corresponding to the total valuation at the current unit price of the shard NFT, multiplied by the total amount, in order to make a buyout. The buyout involves the following actions
  • The investor fills the token corresponding to the total valuation of the current shard NFT.
  • Removing the liquidity pool of the current shard tokens and destroying the sharded tokens in the liquidity pool.
  • Allocation of the invested tokens, including payment of the market value of the outstanding portion of the tokens to the original NFT author, with the remaining invested tokens reserved in the Fragment contract for redemption at the buyout price by users holding fragmented NFT tokens in the secondary market.
  • Transferring the Vault owner as the buyer, the buyer can subsequently transfer the NFT in the Vault, and of course, can fragment it again, which will create a new ERC20 and a new liquidity pool

If, after a buyout, the owner of a fragment NFT in circulation in the secondary market can redeem the token at the same value as the unit price at the time of the buyout by calling the redeem function within the Fragment contract and destroying the fragment NFT in their hands in exchange for the equivalent value of the token.
function redeem(address to, bytes calldata data) external;
โ€‹
Copy link
On this page
DODONFT Related Contractsโ€‹
DODONFT Contracts Overview Chart
Main Process
Vault creation
Importing NFTs
Fragmentation
Buyout
Redemption