Building RRC-404 with Scrypto:
First, if you want to see my thoughts on ERC-404, check out my post from yesterday here:
https://t.co/Jnk9cyoy1T
Building this standard with Scrypto allowed me to think about the problem of nonfungible liquidity from a different angle. Scrypto provides very easy to use native resources that are not smart contracts like the ERC-20 and ERC-721 tokens. These native resources have basic and reliable behaviors that resemble physical money you would have in your wallet. With these basic behaviors, it is easy to mimic the desired actions of ERC-404 and maybe even make a few simple improvements along the way.
Instead of risking randomly losing an NFT if you transfer part or all a fungible, why not design it in a way where the user only has 1 NFT OR 1 fungible at any given time? If the user only owns either 1 NFT or 1 fungible instead of both at the same time, you stop having issues where invisible mapping can burn an NFT you may want to keep.
If the goal is to provide liquidity, it is quite easy in Scrypto to link a fungible resource with a nonfungible resource by writing logic capping their supply to a single number.
Instead of tokens themselves being smart contracts, users on Radix can interact with a dedicated smart contract to convert between fungible and nonfungible state when they want. This way, there are two very distinct resource states where you are not concerned about accidentally making a mistake. If you have an RRC-404 fungible, you can freely send it, swap it, add it as liquidity without consequence to any NFTs. Likewise, with RRC-404 nonfungibles, you can send them, swap them, list them on a marketplace without any consequence to your fungibles.
This RRC-404 blueprint is not random, and doesn't pick the next NFT rarity based on the id's hash value like ERC-404. Instead I thought it would be interesting to write logic that aimed to maintain a constant percentage for each rarity (for example 42% Green, 30% Blue, 16% Red, 8% Orange, 4% Purple). You could technically monitor the circulating supply of each NFT to have an idea of which NFT would be minted next in this scenario, but you would not be able to control anyone else from minting/burning other NFTs and changing these ratios.
This model also makes fractional ownership of NFTs quite easy. If you want to convert fungibles to an NFT, it just requires a whole fungible token. If you call the freeze method with 1.5 water tokens, you will just receive 1 Ice NFT and .5 water tokens in change. Converting Ice NFTs back into Water fungible tokens always results in a whole number of fungibles.
Here is the RRC-404 code: https://t.co/qZ0fVLLoOv
🔮 PREDICTION #13: BELGIAN GRAND PRIX 🏆
Who will be the #1 at the Formula 1 Belgian Grand Prix 2022? 🏎
1️⃣ Join https://t.co/Ug8fm0cpWi
2️⃣ Register with https://t.co/LeYBTLgHtn
3️⃣ Place your prediction
4️⃣ Join the TWITTER BONUS 🔥
$XRD $EXRD $DPH #delphibets#BelgianGP#F1
ONE WEEK until our 2nd monthly Staking Rewards Draw. Time flies when you're having fun.
All ROIDZ hodlers at 31 May, 23:59 UTC have a chance to WIN over 1000xrd.
#Radix#NFTGiveaways#inittowinit#DeFi#Crypto $XRD $DGC > #Eth#Sol
Meow meow 🙀
The cats out of the bag and into the #Radix Swag store for the next 4 weeks!
All profits from @Ociswap merch donated to @Seashepherd.
Who will make it into the store next? New competition to decide coming thoon...
Get it now: https://t.co/O7NpgoovgB
$XRD $OCI
The #RadixReport is back!
Today we are serving juicy updates from the Brave campaign, details of Radix Ambassadors doing fantastic things, & a hard-hitting update from Matt and Russ.
Tuck in 👇
https://t.co/8p8UpyyZIs
$XRD 🚀
Does the future of #DeFi still belong to #Ethereum?
@Cointelegraph breaks down the L1 landscape, highlighting which ecosystems are vying for the top blockchain spot. 🏆
https://t.co/sdDvfglygX…
$XRD 🚀📈
Radical Strikers website is live now! please read about the project and reserve an NFT: https://t.co/656aPKiR2c
follow this account for development updates and the occasional announcement!
#RadicalStrikers#RadixDLT $xrd $exrd
Some more shots from the awesome #CryptoWorldCon in #Miami. Big thanks to all the participants for representing #Radix 🚀🚀🚀
More events to come: https://t.co/QKUS1vfGi2