This project is a "factory" contract to fractionalize NFTs into Super Tokens directly.
The user must own the NFT and have approved the factory to transfer the NFT on their behalf.
On fractionalize, the factory creates, upgrades, and initializes a native super token, then locks the NFT in the super token contract. From there, the fractions may be streamed and distributed as any other super token.
This serves as an important primitive for future projects in the fractionalized NFT space including scalable, recurring airdrop distributions, real time continuous auctions for the reconstitution problem, and real time rewards/incentives.
We used @superfluid-finance/ethereum-contracts for the ISuperToken and ISuperTokenFactory, and @openzeppelin/contracts for the IERC721 interface and the Proxy contract. In the same transaction, the Super Fractionalizer creates a super token with the create2 opcode, sends the resulting address to the super token factory for upgrade, initializes the super token with some useful metadata and an initial supply, and locks the NFT in the super token contract. The client is a react app that searches for an NFT given an address, token id, and network, then prompts an approval, then fractionalization. The SDK interfaces with both contracts with typescript and typechain, for any external projects that may need type declarations.