NFT Collections at Scale

EDCON 2023 · 23 May 2023 · 14:56

Marius Balaj and Vlad Temian, technical leads at The Sandbox, discuss the engineering work behind larger NFT collections. They describe their team’s growth, work on the Doggies collection and the integration of existing collections, explaining why rising demand required changes to their production tools.

Speakers

Topics

From EDCON 2023, hosted by EDCON.

Transcript

nft collection at scale but first have hello everyone it's Bravo as you may say my name is Marius and together with my colleague Vlad we will present you how we scale nft collections but first a bit about us thank you we work as technical leads for sandbox and we also co-founded a software company called qad which was trusted by sandbox to get things to the next level we started almost two years ago we started as a team of four developers and now we are over 25 developers and designers our office is located in Romania in the

city of timisoara which is also the cultural capital of Europe this year and if you visit feel free to reach to us and we can show you some cool places cool so a bit of context we started working on Sandbox on the Snoop Dogg collection called the doggies I wonder who's familiar with sandbox around here oh that's pretty great yeah so we started with this collection which was a real hit and with the increase of the popularity of nft collection we got uh also the demand for nft collection group

also we had to integrate pre-existing nft collections such as Board app or clonics into the the sandbox ecosystem of course our tooling were not capable to handle that level of demand and from one collection every two other month we start with the demand increase to four collection per month and we had to upgrade our tools this presented three major issues so first let's try to Define what an nft collection is in the context of sandbox in the context of sandbox and nft collection is built from three parts one is the web application the second is the Smart contract an erc721

and we have the art integration is the which is the process where we map the token ID to the art in the ecosystem the blood will give you further detail really soon for uh each of the components we managed to identify bottlenecks cool so first of all one first one was the web application and in the context of sandbox the minting the app or the web application is made from two parts one is the landing page and the second is the minting page of course the meeting page is used by the user to Mint but the landing page is used by the marketing

to highlight the utility of the collection also to promote it so this needs to be custom made it should follow the branding the brand and the client looks and feels like they have they need to have the colors the fonts and so on creating more and more collection we begin to identify recording design patterns and mechanics into our application as you may notice on the slides uh most of our collection follow the same structure so it it has the same layout to speed up the development we're creating a small component kit some sort of design system that can provide us mobile ready and accessible components

that can be used to build the minting web applications so after we we integrate this and we managed to speed up the development we were still not happy as we were a part of monolith the sandbox dashboard monolith which is a null duplication with a lot of legacy and of course it has uh his own uh release cycle which is very lengthy so even though now we can create web applications really fast we still need to wait for the release cycle of the monolith so in order to fix that we created the micro front-end architecture

so we extracted all the nft collections into micro front ends that were independent and autonomous so we can deploy every time we want they they are built they are built into static files so you can deploy on ipfs S3 buckets and so on okay now that we can create and deploy a faster application the only thing that we had to do was to duplicate some code stream some Styles change the contract name apply on the song copy and we were done but that's not really fun and those in scale in the real world so that's why we created this tool which we name in create sandbox collection which is a CLI

app that can bootstrap sandbox web application in like seconds cool so now that developers were happy we can create and deploy uh nft application as much as we want the user were not quite there so we placed Grace emphasis on analyzing the user behavior on the minting phase and based on that data we managed to identify some pain points one example was a transaction history so for some context in the early days of sandbox the contracts were deployed on the main net the demand was really high

and people wanted to to just mean and the network got busy as well in this case an user tried to Mint an nft they see a loading screen but because the transaction resolution was really lengthy they didn't know what happened they refreshed the page and they seen them in the mint box again and the button and they try to Mint again that resulted in faulty multiple means to fix that we implement this feature which is a transaction history list where you can see all of your transaction on the contract with real-time status for example you can see if the transaction is failed and if you have a pending transaction and you refresh the page you will see a really nice warning that will

tell you that you have a pending transaction another pain point was error management as we used two tokens when women want to pay the gas and one to pay for the nft sent so if you were on the wrong Network and you didn't have enough funds you received first the wrong network error and after you fixed that error you will see that you don't have enough method to pay the gas for example to fix that we just displayed the errors in line there also I I'm really happy to announce that we will support guestless payments really soon probably around this summer and also we are experimenting with credit card payments to make the

onboarding a web to user into the Realms of metaverse easier cool so now that the problem of web application was fixed we had a problem with the smart contract which was basically the same in order to deploy a new collection we had to duplicate some code change the supply for example the name and we were ready to deploy but for sandbox we audit all the contracts and auditing time takes up to two weeks and that dealing scale we we almost delay some of the releases because of that in order to fix it we created the

generic contract as most of the mechanics of the contracts is the same so we create we extracted all the common functionality into a generic contract and when we create a new collection we just extend that generic contract and we are done we're ready for production but I will let Vlad the tell me more about this thank you uh first I want to mention that everything that we are doing on the smart contract development is free and open source so you can use the the generic graph for contracts to deploy your own collection if you really want also with this some contribution for the openc royalty system in order to become fully compliant with their royalty

system and uh yeah you can just grab the contract deploy for yourself manage the collection and you are good to go this generic raffle approach works for I don't know five six collection per year but if you want to scale it up you need to all the time have a technical people person to deploy The Collection to deploy the smart contract to manage the transaction so on and so forth so for that right now we are at the third generation of account smart contract we are auditing with open zapper in Defender and is based on the factory patterns so you just need the back office job every single non-potentical person can deploy a collection just by

signing some transactions good now that we are a final part uh and the final problem that we identified and sold is the one of our scaling so the art integration in order to have four four collection per month being created and integrated into the sandbox and more than half a mill of avatars Bridge you need a system that can generate the 3D models the 2D representation of that 3D model and the system that can integrate also the metadata to illustrate a little bit of how the why why this is a complex problem let's talk a little bit about the Avatar in

the context of sandbox so in sandbox an avatar is composed of three main components force is the 3D model itself and that has two more sub-components has the gltf and the glb file that can be easily distributed among different applications like I don't know VR app AR app browser-based app the second one is the 3D model that's used in-game and that's a highly optimized format for our game maker and game client tool next we are going to the 2D representation of that 3D model which is used in on openc on Twitter everywhere

you'll want to pfp basically and the last one are are the trades okay back a little bit like last year nobody like really know how to create collection how to manage collections uh they were like little tools and we had this hard dependency on the 3D model itself so we created the spreadsheet basically with a lot of Google app scripts on top of it in which you can you can put your trades you can set the scarcity for certain metadata but the most important part is that you can map

the trade visuals to the 3D nodes themselves the result of this tool you can see here is are all the tokens for the the Playboy collection it also has some exclusion rules but the result of this tool is actually a package that can be imported by your voxel R team and then they can create further the the art all right before after that we had to also solve the 2D preview problem and we created some like a bunch of glucose scripts that were run locally on our laptops in

order to generate the 2D to the representation of course you can see again you can imagine that this approach does not scale so we moved everything into a cloud-based pipeline we had this we called it the cloud pipeline tool it's made up of Step functions AWS the functions and those are gated by some gay API gateways API endpoints it has also a small UI so non-technical people can access and can manage this this by pipeline easily in this example you can see here the Paris Hilton collection being generated

first we received the package from the r team they are producing it in parallel of our development we ingest the package we generate the 3D models in parallel we did we do the same thing for the previous for the 2D representation we pack everything together and then we insert it in our our storage uh it's pretty efficient if you change just one trade or just one model from your art it doesn't regenerate the entire collection it's going to generate just the part that uh that was touched um yeah right now I'm proud to announce that it's managed by our staff we

managed to generate half a million of avatars with this tool in two days so it's it's pretty scalable uh going further we want to make all those tools we pack them together and we want to make them available for our landowners to be able to produce collections but not only Avatar collections but collections of assets of cars of houses and we are working ground right now to re-implement the spreadsheet and Link it together with Vox edit and the pipeline so any landowner will be able to define the collection trades the package and then hit the

button and generate the collection yeah so that's everything if you have questions let us know thank you four questions