Please describe your proposed solution.
The proposed solution is a set of open source smart contracts for marketplaces to support fungible token based purchases of NFTs. Before we dive in deeper to this topic let's have a bit of an education lesson on Cardano based tokens and how they are transacted:
Due to the design of the Cardano blockchain all tokens, fungible and non-fungible, are considered Cardano Native Assets. This means they all follow the same standard of having a policy ID that assets are minted under. This policy ID catalogs the assets minted underneath it and allows for a locking time where assets can no longer be minted. The beauty of this design is if a smart contract can support 1 Cardano Native Asset it can support any other.
Another aspect of Cardano’s design is how it handles transactions with its Extended Unspent Transaction Output Model (eUTxO). A UTxO, as its name suggests, is a collection of assets (ADA and/or tokens) that is owned by a wallet and is waiting to be spent in the form of a transaction. A transaction can utilize multiple UTxOs from a given wallet in order to perform smart contracts and other functions on the Cardano blockchain. An easy way to visualize this is that your wallet is a plate holding a cake with each slice being a UTxO. The slices make it easy to transact with many friends all at once and engage with smart contracts.
Now let's bring Cardano Native Assets and UTxOs together. As a security mechanism the Cardano blockchain does not allow UTxOs to form without having a small amount of ADA in them. This ADA is generally referred to as the min UTxO. This is done to protect the Cardano blockchain from having an ever increasing amount of UTxOs and therefore on-chain data. In order to transact a Cardano Native Asset a user must have ~1.5 to 2 ADA move with the native asset to the new wallet.
Here’s an example of how UTxOs, min ADA amounts, and Cardano Native assets plays out in a Marketplace smart contact:
- Sally wants to sell her Happy NFT for Bob’s FUN tokens
- Sally deposits her Happy NFT into a smart contract. In order to complete the transaction 1.5 ADA must accompany her NFT in the smart contract
- There is now 1 UTxO of a Happy NFT and 1.5 ADA in the smart contract
- Bob now deposits his FUN tokens into the smart contract accompanied by 1.5 ADA
- There are now 2 UTxOs in the smart contract. One with 1 Happy NFT and 1.5 ADA. The other with the FUN tokens and 1.5 ADA
- The contract now completes by sending the FUN tokens and 1.5 ADA to Sally and sends the Happy NFT and other 1.5 ADA to Bob
This example illustrates the increased level of complexity when a marketplaces smart contracts support fungible token trading as opposed to just ADA. This complexity increases with the number of parties needing to receive Native Assets such as in the case of royalties paid out to NFT creators. The purpose of this proposal is to design a set of smart contracts that makes it easy for any NFT marketplace to support fungible token based trading.
Our Background
We are the team behind the PlayerMint project. PlayerMint is a protocol that rewards gameplay performance in existing games like Fortnite with a fungible token called PMX. This token is then spendable across an NFT marketplace. We have been in smart contract development of this protocol since last year with the dev consultancy MLabs. MLabs has contributed to notable Cardano projects such as Liqwid, SundaeSwap, Minswap, and SingularityNet. We are currently gearing up for the launch of our testnet. If you want to get the latest information on our development status (testnet may be live when reading this!) please check out our Public Development Update doc.
As a team we hold a strong belief in the benefit of a shared set of tools that all developers on a particular blockchain can take advantage of. We are already building a set of smart contracts that support fungible token based NFT trading for our own protocol. We believe that sharing them with other marketplaces will only benefit the projects of Cardano that mint Native Assets.
The Solution
The completed development, testing, and available integration of the following set of smart contracts into the NFT marketplaces of Cardano:
- List NFT
- Enables a seller to list a NFT that can be purchased with a set type (ex: PMX or MIN) and amount of fungible tokens
- Change List Price
- Enables a seller with a listed NFT to change the type and amount of fungible tokens required to purchase the NFT
- Unlist NFT
- Enables a seller with a listed NFT to unlist it and have the NFT return back to their wallet with the associated min UTxO
- Purchase NFT
- Enables a buyer to purchase an NFT from a seller with fungible tokens
<u>Phase 1 - Development</u>
The first phase of this solution will be completing development of the above smart contracts. We have completed the initial set and are currently deploying them in a testnet environment. During this deployment, MLabs conducted an internal audit that discovered better mechanisms for UTxO management. If this proposal is successful the 1st step would be deploying funds to optimize the above smart contracts and make them as robust as possible.
<u>Phase 2 - Testing</u>
The second phase of this solution would be deploying the optimized smart contracts into a testnet and mainnet environment with live user interaction. At PlayerMint we are already gearing up for a testnet launch and by the time you are reading this it could be live! Once we have launched the testnet we will analyze how the smart contracts function under stress and usage. Once we are confident in the smart contracts condition we will deploy them to the Cardano mainnet where users will be able to buy and sell NFTs with PMX. Once we are confident in the mainnet deployment of the contracts we will move on to the 3rd and final phase.
<u>Phase 3 - Available Integration</u>
After the smart contracts have seen much usage in a testnet and mainnet environment we will open source them for usage by other developers. After completing the licensing process for open sourcing all the smart contracts we will begin a campaign of working with existing NFT marketplaces to deploy the smart contracts on their platforms. Here is the standard flow we will follow for the campaign:
- Create a pitch deck displaying what the smart contracts are, how they can be implemented, and why they are beneficial
- Create a list of projects to reach out to along with intro messages catered to their project
- Contact projects and setup calls with their dev team
- Have intro calls with projects
- If a project expresses interest then continue conversation with them and work towards integration
Here are the projects we have in mind for deployment:
Why it’s Important
The Cardano ecosystem is strongest when the projects within it support one another. This set of open source smart contracts creates transactability between the two types of blockchain assets (fungible and non-fungible) that developers can utilize in their current and future projects.
Who it Benefits
Because the smart contracts create transactability between fungible and non-fungible tokens any project that has minted either can benefit from them, whether they are the project to implement them or not. In addition to this the standard user who is engaging with these projects by earning tokens and minting NFTs has new found utility.
<u>NFT Developer User Experience</u>
NFT Marketplace
- The Garage Sale marketplace is looking to bring on new users and add to its total trading volume
- Garage Sale discovers the set of open source smart contracts when they are message by PlayerMint
- With the help of PlayerMint, Garage Sale implements the smart contracts into their marketplace
- Garage Sale announces their new feature to the Cardano community
- Holders of fungible and non-fungible tokens are now visiting Garage Sale in order to trade their Cardano Native Asset
- Garage Sale experiences an increase in total volume and users
NFT Creator
- The creator of the Under the Sun NFT collection wants to increase total sales of their project
- The creator spreads the word of a new marketplace, Garage Sale, that enables trading with fungible tokens
- Potential buyers of the Under the Sun NFT head to the Garage Sale to purchase the NFT with tokens they earned through engaging with other dapps
- The creator of the Under the Sun NFT collection has a wider holder base and has received royalties based off of new found trading volume
<u>FT Developer User Experience</u>
- Bob created a fungible token called FUN that can be earned through making people laugh
- Bob’s community is earning FUN tokens and looking for ways to spend them
- Bob’s community discovers an NFT marketplace that has integrated the described smart contracts
- Bob’s community can now use the FUN tokens they earned to buy and sell NFTs
<u>Trader User Experience</u>
- Jenna is in the market for some NFTs and has a stockpile of PMX based off her gaming experience with PlayerMint
- Jenna heads to a fungible token supported marketplace and begins trading with her PMX
- Jenna is now the owner of a Under the Sun NFT and Sam, the seller, has a new fungible token to engage with
Please describe how your proposed solution will address the Challenge that you have submitted it in.
The Developer Ecosystem challenge is focused around enriching the developer experience on Cardano in order to produce high quality applications. The proposed solution meets this challenge by providing developers an easy way to service fungible tokens in NFT marketplaces. Doing so provides mass utility to the projects minting such tokens on Cardano.
The proposed solution is important to developers as it has a way of benefiting every project involving Cardano Native Assets.
What are the main risks that could prevent you from delivering the project successfully and please explain how you will mitigate each risk?
The main risks of the proposed solution involve its upkeep and adoption between NFT developers and collectors.
As we are seeing with the Vasil Hardfork and various CIPs the development environment of Cardano is getting updated over time. In order to keep up with these updates, smart contracts must evolve to take advantage of new features. The set of smart contracts proposed is being built by PlayerMint with development assistance from MLabs. The PlayerMint Marketplace relies on these smart contracts in order to enable trading with PMX. This means there is a natural incentive for PlayerMint to keep the smart contracts up to date and available to the NFT developers of the Cardano community.
In terms of NFT developers the adoption of fungible token integration makes a lot of sense. It increases the overall amount of potential trades that a marketplace can support and therefore its potential revenue. It can also bring new users to the marketplace seeking to utilize tokens they’ve accumulated.
On the side of NFT traders, many of these people already have a wallet full of tokens. If they didn’t obtain them through DEXs they could earn them through holding or staking the NFTs they own. Projects like Clay Nation, Yummi Universe, The Ape Society, Cornicopious, DEADPXLZ, Cardania, AdaQuest, and RatsDAO all service fungible and non-fungible tokens. From PlayerMint’s experience in communicating with some of these projects and their community members they are very interested in having their fungible token supported in marketplaces.