<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Skøgard on Medium]]></title>
        <description><![CDATA[Stories by Skøgard on Medium]]></description>
        <link>https://medium.com/@skogard?source=rss-5dba66c5e053------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EOVMi1ylpEw0EWryeKvG-g.png</url>
            <title>Stories by Skøgard on Medium</title>
            <link>https://medium.com/@skogard?source=rss-5dba66c5e053------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 08:52:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@skogard/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to instantly deploy, build, and manage your own NFT drop without relying on a 3rd party.]]></title>
            <link>https://skogard.medium.com/how-to-instantly-deploy-build-and-manage-your-own-nft-drop-without-relying-on-a-3rd-party-16aca3130684?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/16aca3130684</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Mon, 13 Jun 2022 17:30:42 GMT</pubDate>
            <atom:updated>2022-06-13T17:30:42.134Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3N-FIVvOunSMXV0hrVcXw.gif" /></figure><p>Doing NFT collections completely on your own takes a lot of effort, and costs a lot of money, and it is very hard to “do it right”. You need to hire a solidity developer, deal with IPFS, and the deployment cost itself is very high (thousands of dollars).</p><p>What if I told you there is a way to do this without breaking a bank (about $30 ~ $50 to deploy a contract) and most importantly, WITHOUT relying on any 3rd party SaaS company?</p><p>Enter Factoria:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FB2c1FkMbcZ4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DB2c1FkMbcZ4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FB2c1FkMbcZ4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3f45c0865c666cd2740c14d5c47cdbe/href">https://medium.com/media/e3f45c0865c666cd2740c14d5c47cdbe/href</a></iframe><p>While almost everything — from the contract to the minting site generator to the JavaScript library to interact with the contract and IPFS — was open sourced, there was ONE thing that was not open sourced: The core web app.</p><p>Today, this changes.</p><p><strong>As of today, the entire Factoria stack is 100% open sourced.</strong></p><blockquote>What’s interesting about this “full stack” is that there is no server. The entire stack exists as a static web app with no server component, which is what makes it powerful for anyone who wants to build their independent NFT collection empire without getting locked into a cloud based service provider.</blockquote><p>Introducing Openfactoria.</p><p><a href="https://open.factoria.app/">openfactoria</a></p><h3>OpenFactoria: The Full Stack Open Sourced NFT Vending Machine Factory, with Zero 3rd party</h3><p>The entire Open Factoria web app was rewritten from scratch to fix a lot of the bugs from the old web app, as well as to make many things much more efficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3N-FIVvOunSMXV0hrVcXw.gif" /></figure><p>The original factoria web app used vanilla Javascript to implement everything, but as the codebase grew, it became hard to manage. This was one of the reasons why the open source has been delayed until now, because even if it was open sourced, nobody would understand what’s going on in the code.</p><p>The Open Factoria system uses <a href="https://svelte.dev/">Svelte</a> to simplify the codebase, and thanks to the reactivity, everything is snappy.</p><p>Let’s take a look at some of the highlights.</p><h3>NFT.STORAGE Integration for IPFS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SWHNjmknbom7WPDqM2NyxQ.png" /></figure><p>Openfactoria has adopted <a href="https://nft.storage/">nft.storage</a>. nft.storage is a pinning service built by ProtocolLabs (the creator of IPFS), and is great for NFTs because:</p><ol><li><strong>Free:</strong> It’s 100% free without limits (for storing NFTs)</li><li><strong>Reliable performance:</strong> When nft.storage first launched, the performance was a bit choppy, but they have fixed most of the problems and improved performance. It’s very reliable.</li></ol><p>Of course, you can use other IPFS pinning services like Pinata (The legacy Factoria app uses Pinata), and simply paste the folder CID to the factoria web app, but by default Openfactoria uses nft.storage.</p><h3>Powerful Invite Management with NO 3rd party dependency</h3><p>Openfactoria has a decentralized invite system built in, fully powered by IPFS and onchain merkle proof validation logic.</p><p>You can even name the lists, and edit the minting conditions over time easily.</p><p>You can even directly mint from the dashboard, and since this dashboard is completely public and transparent, anyone can visit this page and mint straight from the dashboard (Think “minting from etherscan”, but for NFTs)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oWaRwAfIjBCW9V0wTPp9rw.png" /></figure><p><strong>And all of this, WITHOUT relying on a backend server!</strong></p><p>Normally NFT invite lists are stored and managed offchain, and most NFT invite management services store the invites on their server (or if you roll your own infrastructure, you store them on your server). Because the whole philosophy of Openfactoria is openness and transparency, we can’t settle for this.</p><p>Openfactoria, since its main goal is to completely decentralize and not rely on any server, stores the invites on IPFS. By not relying on an invite system provided by a SaaS company or opaquely stored on your server, you can build, deploy, and manage your NFT collection entirely without getting locked into someone’s service. And because everything is IPFS, all the invites are 100% transparently tracked over time.</p><h3>Instant Serverless Minting Page</h3><p>You can choose from two options for launching your drop:</p><ol><li>Use the built-in Openfactoria minting page</li><li>Use the instant minting page generator (Skinnerbox) to build your own minting page and publish to any serverless hosting service like vercel, netlify, github pages, etc.</li></ol><h4>1. The Built-in minting page</h4><p>The built-in minting page is very minimal and gets the job done. Also, it links to the verified contract on Etherscan so your minters can trust your NFT drop is legit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BoJr01MtF2m9waAdXozM-A.gif" /></figure><h4>2. Generate your own custom minting page</h4><p>You can also customize and generate your own minting page website and deploy to any hosting provider with one click, using the <a href="https://skinnerbox.factoria.app/">Skinnerbox factory</a>.</p><p>See how easy it is to instantly customize, generate, download, and deploy your minting page to your own hosting provider:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e68sxCH023CVnV6w7KYSyQ.gif" /></figure><p>Tip: Deploying your own minting page is recommended because the generated minting page caches all the IPFS assets when generating, which makes the minting page load lightningly fast (If you use the default minting page, there may be a slight delay in loading as it fetches various content from IPFS)</p><h3>Manage Everything in One Place</h3><p>The Openfactoria dashboard is a single page app where you can take care of everything about your NFT collection in one place:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHxd-dCSOxYro2GMZlNxuA.png" /></figure><ol><li><strong>Collection information:</strong> configure the collection name, symbol, total supply, baseURI, placeholder, or completely freeze the collection forever by making it “permanent”.</li><li><strong>Gift: </strong>Gift tokens to people</li><li><strong>Invites:</strong> Super flexible invite system. Airdrop, Presale list, Public launch, you name it, you can build as many invite lists as you want and manage them all in one place. (With Openfactoria, it even introduces a new feature that lets you “edit” minting conditions for existing lists,</li><li><strong>Royalty: </strong>Set the EIP-2981 royalty standard on your collection. (note: you need to set it here, as well as on Opensea, since Opensea doesn’t yet support EIP-2981, although <a href="https://twitter.com/skogard/status/1530303881883922433?s=20&amp;t=L8hFwFLdtnG3M8t6D5w6MQ">they do plan to support it soon</a>).</li><li><strong>Revenue: </strong>Withdraw minting revenue, set the revenue beneficiary to another account, manage revenue splits.</li><li><strong>Transfer Ownership:</strong> Transfer your collection to another account if you need to.</li></ol><h3>100% Open Source</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8-GNzyW9Btv4b-XV1MtpQ.png" /></figure><p>As the name says, Openfactoria is “Open”. It is licensed with MIT license. You can find the GitHub repository here:</p><p><a href="https://github.com/factoria-org/openfactoria">GitHub - factoria-org/openfactoria: totally open source and decentralized NFT vending machine factory</a></p><p>This means:</p><ol><li><strong>Fork and customize:</strong> You can fork Openfactoria and customize it for your own purpose and use it for yourself.</li><li><strong>Build Openfactoria into your own app: </strong>If you’re building various minting tools, you can fork and integrate Openfactoria into your workflow without having to write contract, manage IPFS uploads, and everything. The Factoria contract has taken care of all the complicated part such as gas optimization and decentralized invite list management. You can just take it and use it. (But read <a href="https://docs.factoria.app/#/">the factoria docs</a> first, to understand how everything works!)</li><li><strong>Build together!:</strong> Feel free to contribute to the core <a href="https://github.com/factoria-org/openfactoria">Openfactoria repository</a> by sending pull requests on GitHub.</li></ol><h3>Conclusion</h3><p>Let’s summarize:</p><ol><li>Openfactoria lets you build and launch your NFT collection independently, without relying on a SaaS provider.</li><li>Openfactoria is “Open”, completely open source. You can fork Openfactoria and customize it, integrate into your own NFT minting tools, or do whatever you want with it.</li><li>Openfactoria has no server. Everything works in the browser serverlessly. This makes everything super simple to port. You don’t need to spin up a digitalocean server or anything to roll your own Openfactoria, you simply need to fork Openfactoria on GitHub!</li></ol><p><strong>Remember that Openfactoria is currently in beta</strong> so make sure to test everything on Testnet before launching your collections on Mainnet (and if you find some quirks, please report to me and they will be fixed!) Eventually the main factoria website will be replaced with openfactoria as well, after the beta period is over.</p><p>Here are some of the resources to get you started:</p><ol><li>Openfactoria web app: <a href="https://open.factoria.app/">https://open.factoria.app</a></li><li>Openfactoria GitHub: <a href="https://github.com/factoria-org/openfactoria">https://github.com/factoria-org/openfactoria</a></li><li>Twitter: <a href="https://twitter.com/skogard">https://twitter.com/skogard</a></li><li>Discord: <a href="https://discord.gg/BZtp5F6QQM">https://discord.gg/BZtp5F6QQM</a></li><li>Documentation: <a href="https://docs.factoria.app/#/">https://docs.factoria.app/#/</a> (This was written for the legacy Factoria app but most of the explanation still relevant since the protocol is exactly the same, and Openfactoria is simply a new interface on top of the protocol)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16aca3130684" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Factoria F0 V2]]></title>
            <link>https://skogard.medium.com/factoria-f0-v2-83dd76744fee?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/83dd76744fee</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Tue, 08 Feb 2022 17:45:59 GMT</pubDate>
            <atom:updated>2022-02-08T17:45:59.362Z</atom:updated>
            <content:encoded><![CDATA[<h4>A new version of the Factoria F0 NFT contract</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryrkN4L1DvSuZssHSoactw.png" /></figure><p>Today I’m releasing F0-V2, a new version of the Factoria F0 NFT contract. You can find them here: <a href="https://factoria.app/factory">https://factoria.app/</a></p><p>First of all, F0-v2 is NOT a major update, it just makes some internal updates to the invite engine that used to be confusing, as well as adding some abuse protection towards the invite system. It does NOT change the exposed API so all the websites and libraries will work exactly the same with no change (such as <a href="https://github.com/factoria-org/skinnerbox">skinnerbox</a> and <a href="https://f0js.factoria.app/#/">f0.js</a>). The only changes made are completely internal.</p><p>Highlights:</p><ol><li><strong>Sandboxed Invite Quota:</strong> With v2, a mint quota for a single invite does NOT affect your mint quota for another invite for the same collection. For example, imagine Alice mints 2 tokens from a presale invite (mint limit 2). Then the same collection launches public and does a public sale with a public invite (mint limit 1). With V1 Alice can’t participate in the public sale because the logic compares the “mint limit 1” against all the tokens she owns (which is 2), which was confusing. You would think that Alice should be able to mint all 2 for the public sale regardless of whether she participated in the presale or not. V2 changes this and now every invite has its own quota, so if Alice gets 100 invites, she can mint from all 100 invites and her quota doesn’t carry over from one invite to another.</li><li><strong>Abuse protection:</strong> V2 now keeps track of all the minting history. Taking advantage of this, it adds some more protection towards people trying to abuse the invite system. For example, some may try to mint and immediately send the minted tokens to another wallet and mint again. V2 strictly blocks this scenario by storing the entire minting history instead of using a user’s current balance to determine the quota.</li></ol><p>Note that V2 uses slightly more gas than V1 because now it stores the minting history on chain. More specifically, the first mint for each minter costs more than it used to because it has to set up the data structure for storing the minting history, but for those who bulk mint (more than one), the cost goes down from the second token and the difference gets narrowed down to around $1 per token, so I think it’s worth it and recommend using V2 going forward.</p><p>If you have any questions, please ask questions in our discord:</p><p><a href="https://discord.gg/BZtp5F6QQM">Join the SKOGARD PRODUCTIONS Discord Server!</a></p><p>you can also find me on Twitter:</p><p><a href="https://twitter.com/skogard">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83dd76744fee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ultimate Guide to Automatically Splitting NFT Revenue and Royalties from Any NFT marketplace]]></title>
            <link>https://skogard.medium.com/the-ultimate-guide-to-automatically-splitting-nft-revenue-and-royalties-from-any-nft-marketplace-a0c300fdd703?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0c300fdd703</guid>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[nft-collectibles]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Thu, 13 Jan 2022 16:16:09 GMT</pubDate>
            <atom:updated>2022-01-13T16:16:09.526Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Ultimate Guide to Automatically Splitting NFT Revenue and Royalties from Any NFT Marketplace</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oXyP78y0yR7bv9FxH3cc5A.png" /></figure><blockquote>Spoiler: Many NFT marketplaces such as Opensea don’t provide a way to split revenue and royalty among NFT collection collaborators, and for a good reason. But there is a way, and this article will explain how.</blockquote><p>The NFT industry is evolving very fast.</p><p>It’s no longer just about a lone artist selling their art as a one off sale, it’s more of a multiplayer experience. It’s not just about the creator but also the collectors and the experience they create together.</p><p>As “collaboration” becomes an important part of the NFT ecosystem, we naturally start to think a lot about how to share value among collaborators. More specifically, how do people share revenue from NFTs?</p><p>In this article, I will explain how people deal with splitting revenue among NFT collaborators today, and why it’s clunky, and then share a solution that solves all the problems once and for all.</p><p>Table of contents:</p><ol><li>Two stages of NFT revenue</li><li>Splitting minting revenue</li><li>Splitting royalty revenue</li><li>Why royalty needs to be split automatically</li><li>The ultimate solution to royalty splitting</li><li>How to split royalty on Opensea</li><li>Multiple splits for a single NFT collection</li><li>Conclusion</li></ol><h3>1. Two stages of NFT revenue</h3><p>There are two stages of NFT revenue.</p><h4>Stage 1: Mint revenue</h4><p>The first is the initial minting phase. People mint NFTs directly from the contract by paying the minting fee, and all the revenue is stored in the contract. Then once the initial minting is over, whoever is the admin of the contract can later call a “withdraw()” function to withdraw the revenue. From this point, they can maybe split among whoever worked on the NFT project together to launch it.</p><h4>Stage 2: Royalty revenue</h4><p>The next stage is what happens AFTER minting. The creators may want to set royalty for their NFTs, so a certain percentage of ALL future sales for ALL the NFT items in the collection will be shared with the creators. This allows for interesting business models such as allowing people to <strong>mint for free initially</strong>, but <strong>generating all the revenue from royalties</strong> going forward.</p><h3>2. Splitting minting revenue</h3><p>Let’s imagine a scenario:</p><p><strong>Here’s a team made up of an artist, a developer, a marketer, and project manager. These 4 people want to split revenue 25% each. How do they do it?</strong></p><p>Maybe the project manager could withdraw funds to his wallet, and then send 25% each to the artist, developer, marketer, and himself.</p><p>Even though it’s not ideal, this kind of works for the “initial minting revenue”, since the team members are working closely together to launch this project, we can assume the members trust each other at this stage. But what about royalty revenue?</p><h3>3. Splitting royalty revenue</h3><p>Let’s look at how royalties work on Opensea:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZPU3mVKbFqM2qea_hqwBtw.png" /></figure><p>Opensea lets you set:</p><ul><li>a “percentage fee” (up to 10%)</li><li><strong>a SINGLE payout address</strong></li></ul><p>Yes, it is impossible to automatically split royalties for the collections you list on Opensea. Only ONE person can claim royalties. See here to learn more:</p><p><a href="https://support.opensea.io/hc/en-us/articles/1500009575482-How-do-royalties-work-on-OpenSea-">How do royalties work on OpenSea?</a></p><p>This is not just Opensea. The NFT royalty standard that most NFT marketplaces are starting to adopt ALSO only supports 1 recipient only:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYsShwv9IvxQ1CeP3cIv6g.png" /></figure><p>As you can see, the schema is the same as what Opensea supports:</p><ul><li>royalty amount</li><li>a single receiver address</li></ul><p>You can learn more here:</p><p><a href="https://eips.ethereum.org/EIPS/eip-2981">EIP-2981: NFT Royalty Standard</a></p><p>OK, so what now? We have two questions:</p><ol><li>Why do we even NEED to automatically split royalties? Can’t we just do it manually?</li><li>Is there a way to split royalties automatically?</li></ol><h3>4. Why royalty needs to be split automatically</h3><p>Let’s revisit the 4 person team example above.</p><blockquote>Maybe the project manager could withdraw funds to his wallet, and then send 25% each to the artist, developer, marketer, and himself.</blockquote><p>So,,, what if the project manager guy receives the royalty revenue and keeps splitting them to the others going forward?</p><p>In this scenario, the project manager guy needs to keep doing the same “withdraw and split” process every time, forever. And all the members have to keep trusting that the project manager will keep sending them money. Remember, this is royalty we are talking about, which means this is a revenue stream that will exist forever in the future even after you die. What happens if the project manager gets in a car accident? What if he disappears? This is not at all ideal. We can do better.</p><p><strong>We need a perpetual royalty splitter machine.</strong></p><h3>5. The ultimate solution to royalty splitting</h3><p>What if there is a way to create a magical address that “impersonates” as a single person, but manages all the money splitting logic for all the members?</p><p>And what if it was super cheap to set up these addresses?</p><p>This is what Moneypipe does.</p><p>The gist is, it’s a single address (indistinguishable from any normal wallet address) that represents a group, and all incoming funds are automatically split to the members. You can learn more here:</p><p><a href="https://skogard.medium.com/moneypipe-8ae3ac00e4ad">Moneypipe</a></p><p>It’s 100% free to use (just pay the gas fee, which is around $40 ~ $60 depending on when) and you just have to set it up once, connect it to various places, and forget about it. And it will “just work” forever.</p><h3>6. How to split royalty on Opensea</h3><p>I will explain how to do this on Opensea but the same principle applies for most other NFT marketplaces.</p><p>For the Opensea example, the workflow is as follows:</p><h4>1. Create a moneypipe</h4><p>Create a group address on <a href="https://buffer.moneypipe.xyz/about">Moneypipe buffer</a>. Just go to <a href="https://buffer.moneypipe.xyz/">https://buffer.moneypipe.xyz</a> and add the collaborator addresses, and set each collaborator’s share visually.</p><p>When you broadcast the transaction, it will give you an address. This is the address that represents the group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*juQhKX6_Nsgb7CKyjxfuLw.gif" /></figure><h4>2. Add the moneypipe address to Opensea</h4><p>Go to Opensea collection manager, and copy and paste the group address into the Opensea royalty setter field, and set how much the group will receive (up to 10% of the sales revenue). Then Opensea will keep sending royalty from all future sales to the address:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JE92EUY5_Ql8ZRefzfVXzQ.png" /></figure><p>You can learn more here:</p><p><a href="https://support.opensea.io/hc/en-us/articles/1500009575482-How-do-royalties-work-on-OpenSea-">How do royalties work on OpenSea?</a></p><h4>3. Members claim their share of the royalty</h4><p>Each member can now visit the buffer page and withdraw their share of the entire royalty revenue whenever they want, forever.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4e2Q_7naMBP6ngxfaYkmg.gif" /></figure><p>No central point of failure, no one to trust, problem solved.</p><h3>7. Multiple splits for a single NFT collection</h3><p>Excited yet? You can even go one step further.</p><p>Most NFT contracts have a method called withdraw() that lets the admin withdraw funds to their address. Normally the admin will do what we discussed above: <strong>one person withdraws the money, splits them and sends them to the rest of the collaborators, MANUALLY.</strong></p><p>Instead of sending manually one by one, we can reuse the moneypipe we created above. The admin can simply send the withdrawn amount to the moneypipe group address, and now the collaborators will have a single place to withdraw BOTH the minting revenue AND the royalty revenue.</p><p><strong>What if you want different ratios between minting revenue and royalty revenue? </strong>Simple! Just set up two Moneypipes. One for minting revenue splitting, and the other for royalty splitting. Each member will be able to claim through each.</p><h3>8. Conclusion</h3><p>Moneypipe is 100% FREE-to-use public utility, and there is no centralized dependency. It’s open source so you can check out the code on Github before using:</p><p><a href="https://github.com/moneypipe-org">moneypipe-org</a></p><p>Also, I believe something like this needs to be as easy to integrate as possible, so wrote a whole Javascript library to automatically create and manage Moneypipes. Check it out here:</p><p><a href="https://dev.moneypipe.xyz/#/">moneypipe</a></p><p>If you have any questions or interested in collaboration, please join our discord:</p><p><a href="https://discord.gg/BZtp5F6QQM">Join the SKOGARD PRODUCTIONS Discord Server!</a></p><p>And follow me on Twitter if you want to stay updated:</p><p><a href="https://twitter.com/skogard">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0c300fdd703" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moneypipe]]></title>
            <link>https://skogard.medium.com/moneypipe-8ae3ac00e4ad?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ae3ac00e4ad</guid>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralized-finance]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Wed, 05 Jan 2022 15:46:18 GMT</pubDate>
            <atom:updated>2022-01-05T15:46:18.568Z</atom:updated>
            <content:encoded><![CDATA[<h4>minimal building blocks for playing with money on ethereum</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2EXA-kT4h11bMxePxRNzpw.png" /></figure><p>What if you could create a magical address for a group, and all the money sent to this address gets automatically split to the members, forever?</p><p>I am NOT talking about some app you need to sign up to.</p><p>I am NOT talking about some complex smart contract only developers can use.</p><p><strong>I’m talking about a dead simple address, period.</strong> Just send money, and it’s automagically split to the members. This is moneypipe.</p><p><a href="https://moneypipe.xyz/">moneypipe</a></p><h3>Example</h3><p>Here’s an example: <a href="https://buffer.moneypipe.xyz/ethereum/group#address=0xD6A72cc77FbFb2007BE916505A3C88320eD600C3">https://buffer.moneypipe.xyz/ethereum/group#address=0xD6A72cc77FbFb2007BE916505A3C88320eD600C3</a></p><p>Basically I created a group of addresses from all the people who responded to my Tweet below, and started by sending 0.1ETH to the group (If you are one of the members, you should be able to claim a small fractional amount, but I encourage you to share Moneypipe with many people so they can test out the pipe by sending some money to it. The more people try the demo, the more you will be able to claim since all money is evenly split among the members)</p><h3>skøgard on Twitter: &quot;Working on something super cool. Drop your ETH address below. / Twitter&quot;</h3><p>Working on something super cool. Drop your ETH address below.</p><h3>Unix pipes for money</h3><p>In Unix/Linux, you can compose multiple commands using what’s called a “Unix pipeline”. Starting with a set of simple commands and allowing composability gives us a lot of flexibility.</p><p>Same with Moneypipe. Moneypipe is made up of two minimalist modules for splitting money:</p><ol><li><strong>Stream</strong></li><li><strong>Buffer</strong></li></ol><p>The “stream” and “buffer” reference is easy to understand if you compare it to Node.js. In node.js, <a href="https://nodejs.org/api/buffer.html"><strong>buffer</strong></a> is for storing data, and <a href="https://nodejs.org/api/stream.html"><strong>stream</strong></a> is for allowing data to “flow” in realtime.</p><h4>1. Stream</h4><p>Here’s what a <strong>stream money flow</strong> looks like (Create a stream, and send it money, and all incoming funds are synchronously sent to the members’ addresses in the same transaction):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5h0QCsfOK33BnAyn6TOpVQ.png" /></figure><h4>2. Buffer</h4><p>On the other hand, here’s what a <strong>buffer money flow</strong> looks like (Create a buffer, and send it money, and all incoming funds are stored inside the address, and each member can asynchronously withdraw their shares whenever they want):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oXyP78y0yR7bv9FxH3cc5A.png" /></figure><h3>How to use</h3><p>Creating a buffer or stream is easy. Just enter a list of addresses, and tweak the ratio to which each address is entitled:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*juQhKX6_Nsgb7CKyjxfuLw.gif" /></figure><p><strong>If you’re creating a stream, </strong>that’s pretty much it! Just send money to the created address and you’ll see that they are automatically split to the members in realtime!</p><p><strong>If you’re creating a buffer, </strong>that’s all you need to do as well. But the difference in this case is that the receivers don’t automatically receive funds, they need to “claim” their funds by withdrawing. Withdrawing is very easy as well. If you are one of the members in a group, just go to the group landing page and you’ll see a “withdraw” button. Just click it to withdraw money:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4e2Q_7naMBP6ngxfaYkmg.gif" /></figure><h3>Why didn’t this exist before?</h3><p>If you’ve read this far, you might be asking “this sounds like a no-brainer idea, who wouldn’t want a dead simple way to autonomously split money? why didn’t this exist before?”</p><p>The answer is, there have been several attempts, but all of them were less than satisfactory. Most of them suffered from one or more of the following problems:</p><ol><li><strong>Not minimal enough.</strong> Usually the people who built them wanted to include some additional features and the protocols end up being bloated.</li><li><strong>Not easy to integrate. </strong>Often, whoever’s behind the protocol was focused on building a “moat” or “network effect” for their business, and made it difficult or unnatural to use them outside of their app or platform.</li><li><strong>Not optimized. </strong>Lastly, all existing implementations were NOT focused on efficiency because they were built when the gas price wasn’t a big issue.</li></ol><p>Moneypipe was designed from scratch to solve all of these problems.</p><h3>What makes Moneypipe special?</h3><h4>1. Minimal + Gas Efficient</h4><p>The code is as minimal as it can get, with the most efficient gas usage.</p><ul><li><a href="https://github.com/moneypipe-org/buffer/blob/main/contracts/Buffer.sol">Buffer is just 46 lines of code</a></li><li><a href="https://github.com/moneypipe-org/stream/blob/main/contracts/Stream.sol">Stream is just 33 lines of code</a></li></ul><p>The small size saves costs when deploying these modules to the blockchain.</p><p>Furthermore, the code has been optimized to be as gas efficient as possible, which is important for saving money.</p><h4>2. Not just an app. A building block.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OIaABBhfMb525Ma-j8NeqQ.png" /></figure><p>As mentioned above, most of the past attempts tried to build a whole business out of this feature. They were building an app, not an “invisible” protocol that can be built into any other apps or protocols.</p><p>Moneypipe was designed to be integrated. I mean, it’s just an address. It can’t get any simpler than that. You simply need to create a stream or a buffer and stick its address into another contract or another app, fully trusting that it will work in 100% deterministic manner forever.</p><p>Users can use the moneypipe.xyz website to use the protocol, but I bet most of the usage will come from people simply embedding the created address into other apps and forget about it, and everything will “just work”.</p><h4>3. For developers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mNdsztmVV0N_9jLDRAUZTQ.png" /></figure><p>The composability aspect is such an important aspect that I have written and open sourced a whole JavaScript library to programmatically create and manage moneypipes.</p><p>Even the moneypipe.xyz website itself is built with this library, which means anyone can build their own interface. See here:</p><p><a href="https://dev.moneypipe.xyz/">moneypipe</a></p><h4>4. Immutable</h4><p>One important aspect that makes all of this possible is that Moneypipe modules are immutable. When you create a buffer or a stream, the rules are set in stone forever and no one — not even the original deployer — can change it.</p><p>For example, if Alice, Bob, and Carol created a Moneypipe together that splits money 1:1:1, and they wanted to switch to 2:1:1, this is impossible.</p><p>However, the right way to approach this is you can simply create a new pipe and use that one instead.</p><p>Because all pipes are immutable, you don’t have to worry about the logic changing in the future, and safely hardcode the addresses into any app, and even other smart contracts.</p><h4>5. Decentralized public utility with NO owner</h4><p>One of the top priorities was to build it so that there is no owner.</p><p>The entire protocol has no 3rd party reliance and there is no cloud somewhere that locks you in (This is the exact same philosophy I took with <a href="https://factoria.app/">Factoria</a>, a decentralized minimalist NFT collection management system). And there is ZERO fee. It’s 100% free to use.</p><p>Even the merkle tree used to power the buffer is stored on IPFS, and the IPFS hash is stored on the contract, so there is no centralized server aspect. Moneypipe is a public utility, and it’s all yours.</p><h3>Example use cases</h3><p>There are many potential use cases for this:</p><ol><li><strong>NFT revenue split: </strong>Everyone who contributed to building an NFT collection can automatically share revenue from their NFT sales, simply by withdrawing money to the group address, and the group address automatically takes care of the splitting.</li><li><strong>NFT royalty split: </strong>It’s not just about the primary sales. You can even apply the same principle to NFT royalties for all future sales. For example, you can create a group address, set it as “royalty recipient” address on NFT marketplaces like Opensea or Rarible, and all the royalty payments can be auto-split among the group members.</li><li><strong>A minimal plugin for DAOs:</strong> DAOs (Decentralized Autonomous Organization) are smart contracts that help a group of members make decisions together. You can imagine creating a group address using Moneypipe, and simply including them anywhere necessary. You can even programmatically do this using Solidity or Web3 (and if you want a whole library that makes this as easy as possible, check out <a href="https://dev.moneypipe.xyz/#/">moneypipe.js</a>)</li><li><strong>Autonomous charity:</strong> You can create a Moneypipe buffer that pays out DIRECTLY to all the recipients, and people could send the address money. You can even build this into another contract to automate this.</li></ol><h3>Conclusion</h3><p>Moneypipe is just an address.</p><p>You create a group made up of members, and give it an address. Then from that point on, the address indistinguishable from any other regular wallet address and you can use it like a regular wallet.</p><p>The only difference is, the money will be automatically split to the members based on the pre-programmed ratio. Very simple.</p><p>This is a super simple building block for Ethereum that anyone can use. If you like the idea, please share it with friends and people who might be interested.</p><p>All I want from this is to see it help many people with a dead simple way to split money in their projects, such as NFT collections, DAOs, and any other kind of blockchain project that needs a feature to control money flow.</p><ul><li>Moneypipe Homepage: <a href="https://moneypipe.xyz/">https://moneypipe.xyz</a></li><li>Follow me on Twitter: <a href="https://twitter.com/skogard">https://twitter.com/skogard</a></li><li>Join Discord and ask questions: <a href="https://discord.gg/BZtp5F6QQM">https://discord.gg/BZtp5F6QQM</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ae3ac00e4ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to mint NFT without the Internet]]></title>
            <link>https://skogard.medium.com/how-to-mint-nft-without-the-internet-d61fc7ed80c3?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/d61fc7ed80c3</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 21:26:53 GMT</pubDate>
            <atom:updated>2021-09-13T21:26:53.300Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to generate tokens without using an API when using the Rarible protocol</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7AKMnjDv17sd3gaWGpsig.png" /></figure><p>How are you generating the tokenIds for your NFTs? If you are using the <a href="https://rarible.org/">Rarible protocol</a>, you are probably making a generateNftTokenId API request call to Rarible’s server every time you want to mint an NFT.</p><p>Today I’m going to share how you can get rid of this step, and replace it with a more efficient, scalable, and and a completely offline approach to doing this.</p><p><strong>Not requiring a network connection for minting opens up doors to a lot of cool things. You can:</strong></p><ol><li>save network traffic (save one round trip to Rarible’s server)</li><li>mint tokens privately</li><li>mint completely offline</li></ol><p>Being able to mint offline means you can store and route your NFTs in a completely peer to peer manner with other NFT applications, resulting in an overlay <strong>distributed</strong> network of NFTs.</p><h3>Demo</h3><p>Let’s get right into it. Try the embedded demo below.</p><p>It does not use any network API and doesn’t even require any network connection, so you can even try it while you’re offline.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fskogard%2Fembed%2Fpreview%2FjOwwrXO%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DjOwwrXO&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Fskogard%2Fpen%2FjOwwrXO&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/35d0060d0610a7b3f3f2daeb016ef8eb/href">https://medium.com/media/35d0060d0610a7b3f3f2daeb016ef8eb/href</a></iframe><h3>Code</h3><p>So how does it work? Here’s the full JavaScript code for the decentralized tokenId generation algorithm. It can be used both in the browser and in node.js:</p><pre>const make = (creator) =&gt; {<br>  // 13 digit unix timestamp<br>  const timestamp = Date.now()<br>  // 11 digit random number<br>  const rand = (Math.random() * 10**18).toString().slice(0,11)<br>  // append creator + timestamp + random and convert to uint<br>  return BigInt(creator + timestamp + rand).toString(10)<br>}</pre><p>All you need to do is call:</p><pre>const tokenId = make(&quot;0x069dC295FFe6e58a63C89f5C0B56a5c70b9AA4e7&quot;)</pre><p>And that’s all! No API endpoint, no Internet connection needed. All token IDs are algorithmically generated.</p><p>Because it does not require an API endpoint, this way you can mint millions and billions of tokens without ever being connected to the Internet at all! It’s as decentralized as generating <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier#:~:text=A%20universally%20unique%20identifier%20(UUID,%2C%20for%20practical%20purposes%2C%20unique.">UUIDs</a>.</p><blockquote>This tokenId generation algorithm is <a href="https://github.com/rarepress/rarepress/blob/main/token.js#L286-L292">a part of Rarepress</a>, which not only decentralizes the tokenId generation step, but also decentralizes the entire workflow involving NFT minting and storage, which lets you mint millions and billions of NFTs offline without relying on an API. Check it out: <a href="https://rarepress.org/">https://rarepress.org</a></blockquote><p>Now, let’s walk through how this tokenId algorithm works.</p><h3>Rarible Protocol is already decentralized</h3><p>What most developers don’t realize yet is, the Rarible protocol is already decentralized and has everything you need to do things in a completely decentralized way.</p><p>Let’s take a look at the smart contract code: <a href="https://github.com/rarible/protocol-contracts/blob/master/tokens/contracts/erc-721/ERC721Lazy.sol#L49">https://github.com/rarible/protocol-contracts/blob/master/tokens/contracts/erc-721/ERC721Lazy.sol#L49</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y8GKR9f9kqJ1NTOiXrMMVg.png" /></figure><p>In line 49, it takes the tokenid, and right shifts by 96 to compute the “minter” variable. Then in line 52, it compares the included creator address (data.creators[0].account) with the address computed from the tokenId (minter), and only moves forward if the two match.</p><p>From this we can conclude that the tokenId is derived from the minter’s address. It also means that we already have everything needed to reverse engineer and generate tokenIds without relying on any API endpoint!</p><h3>Algorithm</h3><p>The most important part is the line 49:</p><pre>address minter = address(data.tokenId &gt;&gt; 96)</pre><p>This basically means “take the tokenId and shift it 96 bits (24 hex digits) to the right”, and that address must match the first address in the creators array.</p><p>Long story short, we can reverse engineer this to generate a tokenId from an address. The algorithm is:</p><ol><li>Take an address</li><li>Append random 24 hex digits to its right</li><li>Convert it to uint (which is what solidity is expecting)</li></ol><p>And that’s all! Here’s the full code:</p><pre>const make = (creator) =&gt; {<br>  // 13 digit unix timestamp<br>  const timestamp = Date.now()<br>  // 11 digit random number<br>  const rand = (Math.random() * 10**18).toString().slice(0,11)<br>  // append creator + timestamp + random and convert to uint<br>  return BigInt(creator + timestamp + rand).toString(10)<br>}</pre><ol><li>First, we first generate the current unix timestamp (13 digits)</li><li>Second, we generate a random number of 11 digits</li><li>We then combine them together by appending the creator (ethereum address hex), the timestamp, the random number</li><li>Then we convert it to uint string</li></ol><p>Ok, so we get that we need 24 digits to the right side of the address, but why are we using the timestamps and and the random number?</p><p>We use the unix timestamp to ensure that every call to the make() function returns a tokenId that increases in value (since time only goes forward and not backward). But unix timestamp is only 13 digits, so we need a random filler to make a 24 digit hex. That’s why we generate a 11 digit random number.</p><p>This algorithm will ensure that the tokenId of every token generated this way will keep going up in a single threaded situation (which is at the moment most of the use cases).</p><blockquote>In a multithreaded situation where you need to mint millions of billions of tokens in parallel, the tokens minted within the same millisecond will have the same unix timestamp prefix, but likely won’t have a collision because of the random number.</blockquote><h3>Conclusion</h3><p>It is important to build NFT applications to be as decentralized as possible. The whole point of the <a href="https://rarible.org/">NFT marketplace as a smart contract</a>, is that it gets rid of a single point of failure.</p><p>The offline tokenId generation algorithm is just one aspect, but you can imagine how this paradigm applies to everything else, such as having your own NFT database and file system from which you can serve your own users, etc.</p><p>If you are interested in building NFT applications and NFT collections this way, check out Rarepress, an open source NFT Operating System that makes use of Rarible NFT marketplace protocol to help you build fully decentralized NFT infrastructure effortlessly:</p><p><a href="https://rarepress.org/">Rarepress</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d61fc7ed80c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to connect rarepress with existing Ethereum wallets]]></title>
            <link>https://skogard.medium.com/how-to-connect-rarepress-with-existing-ethereum-wallets-452c4f17c9f5?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/452c4f17c9f5</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Wed, 08 Sep 2021 21:54:35 GMT</pubDate>
            <atom:updated>2021-09-08T21:54:35.442Z</atom:updated>
            <content:encoded><![CDATA[<h4>OK I’ve minted NFTs, how do I control them in the browser?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*51Isp7cDmH4Ot9fxTdGyjw.png" /></figure><p>I recently wrote an article on how to <a href="https://medium.com/rarible-dao/how-to-mint-a-10-000-item-generative-art-nft-collection-with-21-lines-of-javascript-dfa603cc56d5">“mint NFTs with just 21 lines of JavaScript”</a>. So you’ve followed the tutorial and have minted all the NFTs. Now what? How do you control them in the browser?</p><p>You can do this by <strong>importing or exporting the rarepress built-in wallet</strong>. Here’s the full documentation:</p><p><a href="https://examples.rarepress.org/#/?id=importing-and-exporting-wallet">Rarepress Examples</a></p><p>In this article I will briefly summarize the documentation and show how this can be done, but you feel free to read the full documentation too.</p><h3>1. Importing to Rarepress</h3><p>Let’s say you want to import your Metamask seed to rarepress. Here’s what you need to do:</p><ol><li>Get your seed phrase from Metamask</li><li>Import the seed into Rarepress</li></ol><p>To import to rarepress, go to your terminal and run:</p><pre>npx mushie import</pre><p>and enter the seed.</p><h3>2. Exporting from Rarepress</h3><p>What if you want to export the seed phrase or the specific private key you used to mint your NFTs, and add the account to your web wallet like Metamask? Here’s what you need to do:</p><ol><li>Export from rarepress</li><li>Import to Metamask</li></ol><p>For this you simply run:</p><pre>npx mushie export</pre><p>It will give you the option to either export the entire seed phrase, or just a single private key. To export a private key you will need to additionally enter the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki">BIP44 derivation path</a> of the private key.</p><p>To export the seed, select <strong>“export the seed”</strong> option when running the command above. Metamask doesn’t let you keep multiple seed in the wallet, so if you export the seed, you will probably need to set up a whole new wallet and import the seed.</p><p>But if all you need is a single private key, you can easily export a single private key from rarepress, and import it into Metamask. Just select <strong>“export a single private key”</strong> option when running the command above. Once exported, you can just go to your Metamask and click the top right menu button, and then click “Import Account”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*V3pWHVtoWAwElCFi5a9H-g.png" /></figure><h3>Learn more</h3><p>Go read the full documentation at:</p><p><a href="https://examples.rarepress.org/#/?id=importing-and-exporting-wallet">Rarepress Examples</a></p><p>And if you have any questions, feel free to join Discord:</p><p><a href="https://discord.gg/BZtp5F6QQM">Join the SKOGARD PRODUCTIONS Discord Server!</a></p><p>To stay updated on rarepress, follow me on Twitter:</p><p><a href="https://twitter.com/skogard">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=452c4f17c9f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to roll your own NFT marketplace AND start minting, all in 5 minutes.]]></title>
            <link>https://skogard.medium.com/how-to-roll-your-own-nft-marketplace-and-start-minting-all-in-5-minutes-1a07e1da78b0?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a07e1da78b0</guid>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[etherum]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Tue, 07 Sep 2021 21:50:41 GMT</pubDate>
            <atom:updated>2021-09-07T22:23:17.473Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KEF99Xdd4Lit5beqmXU-Ww.png" /></figure><p>Today I’m going to show you how to roll your own Rarible and start minting to it. More specifically, I will share how you can:</p><ol><li>deploy your own Rarible NFT marketplace contract to Ethereum</li><li>and programmatically mint NFTs to it.</li></ol><p>All in 5 minutes. Let’s go.</p><h3>1. Deploy Your Own NFT Marketplace Contract</h3><p>We are going to use <a href="https://rariverse.org,/">https://rariverse.org,</a> a web app that lets you deploy your own Rarible contract through the <a href="https://docs.rarible.org/asset/token-factories">Rarible token factory contract</a>.</p><p><strong>Let’s test on rinkeby network</strong>. Switch your network to <strong>rinkeby</strong> on your Metamask, and you’ll see the page auto-update. Now add the name and symbol for your NFT collection, and press “create”. It should pop up Metamask where you can send the deployment transaction. That’s all! Here’s the entire process in a gif:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*Qhe8tWBGoPSVsAWi_oBvCg.gif" /></figure><p>The contract has been deployed at <a href="https://rinkeby.etherscan.io/address/0x6A988D6F7E28C67e41BD94720792Ce6FBdeEFf8c">https://rinkeby.etherscan.io/address/0x6A988D6F7E28C67e41BD94720792Ce6FBdeEFf8c</a> in this example.</p><blockquote><strong>Note: </strong>Sometimes it takes some time for the Rarible.com backend to index the newly created contract, so if it doesn’t show up on the website immediately, wait a couple of hours and try again. As long as the contract was successfully deployed, Rarible.com should be able to pick it up on their UI.</blockquote><h3>2. Mint to Your Collection</h3><p>Now let’s try minting to your contract you just deployed. To mint to your collection we need to first get the contract address. Go back to the rariverse tab and copy the contract address:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*qXxqOLGtH9oYBisPeB1Zeg.gif" /></figure><p>Now let’s mint to this contract!</p><p>By default Rarepress publishes tokens to the global Rarible collection. But when you want to publish to your own contract, all you need to do is specify the contract attribute while creating your token.</p><p>You can do this both in the browser or in node.js, but for the sake of simplicity let’s just do it on node.js</p><p>First create a project folder and initialize the project:</p><pre>mkdir custom-collection<br>cd custom-collection<br>npm init</pre><p>Then install rarepress:</p><pre>npm install rarepress</pre><p>Now let’s write some code. Create a file named index.js:</p><pre>const Rarepress = require(&#39;rarepress&#39;);<br>(async () =&gt; {<br>  // 1. initialize<br>  const rarepress = new Rarepress()<br>  await rarepress.init({ network: &quot;rinkeby&quot; })</pre><pre>  // 2. import a web image to fs<br>  let cid = await rarepress.fs.add(&quot;<a href="https://static.wikia.nocookie.net/stephenking/images/8/8f/Itclown.jpg/revision/latest/scale-to-width-down/1000?cb=20210511191757">https://static.wikia.nocookie.net/stephenking/images/8/8f/Itclown.jpg/revision/latest/scale-to-width-down/1000?cb=20210511191757</a>&quot;)</pre><pre>  // 3. create a token and save to local rarepress, referencing the image<br>  let signedToken = await rarepress.token.create({<br>    <strong>contract: &quot;0x6A988D6F7E28C67e41BD94720792Ce6FBdeEFf8c&quot;,<br></strong>    metadata: {<br>      name: &quot;Friendly Clown&quot;,<br>      description: &quot;A friendly clown is giving you a red balloon&quot;,<br>      image: &quot;/ipfs/&quot; + cid<br>    },<br>  })<br>  console.log(&quot;signedToken&quot;, signedToken)</pre><pre>  // 3. publish files to IPFS<br>  await rarepress.fs.push(cid)<br>  await rarepress.fs.push(signedToken.uri)</pre><pre>  // 4. publish token to Rarible marketplace<br>  let sent = await rarepress.token.send(signedToken)<br>  console.log(&quot;sent&quot;, sent)</pre><pre>  process.exit()</pre><pre>})();</pre><p>and run it with node index</p><p>Make sure to replace the <strong>contract: 0x6a988D6F7E28C67e41BD94720792Ce6FBdeEFf8c </strong>part with YOUR contract address you copied from the previous step.</p><p>If you do not include the “contract” attribute, it will mint your token to Rarible’s shared collection at <a href="https://etherscan.io/address/0xF6793dA657495ffeFF9Ee6350824910Abc21356C">https://etherscan.io/address/0xF6793dA657495ffeFF9Ee6350824910Abc21356C</a> But because we’ve added the custom contract attribute, it will mint to our new contract.</p><p>It will publish everything to IPFS and also to the marketplace, and then give you the final result. Just copy the id part and open the browser at https://rinkeby.rarible.com/token/&lt;id here&gt;. (The example used below is here: <a href="https://rinkeby.rarible.com/token/0x6a988d6f7e28c67e41bd94720792ce6fbdeeff8c:14107779161967076660334329970500133928755960271447644359217263815656367741207?tab=details">https://rinkeby.rarible.com/token/0x6a988d6f7e28c67e41bd94720792ce6fbdeeff8c:14107779161967076660334329970500133928755960271447644359217263815656367741207</a>)</p><p>Here’s the full walkthrough in a GIF:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2lkG845ATwuEJ8wkeT9EhQ.gif" /></figure><h3>Conclusion</h3><p>Deploying your own Rarible collection contract and minting to it is this easy.</p><p>To learn more about the Rarible NFT marketplace protocol, visit:</p><p><a href="https://rarible.org/">Rarible Protocol</a></p><p>And to learn more about Rarepress, the NFT Operating System that makes it super easy to interact with the Rarible protocol (as you saw above), visit:</p><p><a href="https://rarepress.org/">Rarepress</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a07e1da78b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to mint a 10,000 item generative art NFT collection with 21 lines of JavaScript.]]></title>
            <link>https://skogard.medium.com/how-to-mint-a-10-000-item-generative-art-nft-collection-with-21-lines-of-javascript-dfa603cc56d5?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfa603cc56d5</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralization]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Thu, 02 Sep 2021 18:02:41 GMT</pubDate>
            <atom:updated>2021-09-02T19:56:50.489Z</atom:updated>
            <content:encoded><![CDATA[<h4>You too, can mint your own NFT collection, right now.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PytUTO6zVvChzJ8AsDRESA.png" /></figure><p>Today I will show you <strong>how to make an entire generative art NFT collection with nothing but 21 lines of JavaScript.</strong></p><p>Here’s the minted collection, made up of 1000 items:</p><p><a href="https://rarible.com/user/0x3c584eb4f7ec6044e4419fc2ee7029547aeb7c01?tab=created">Rarible: NFT Marketplace</a></p><p>And the following code is all you need to mint the above collection, literally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tnvw53ybTdroSo4Y5YcNUA.png" /></figure><p>Best of all, this method does not depend on any 3rd party API, and instead utilizes a completely open source project (called <a href="https://rarepress.org/">Rarepress</a>), which you can easily embed into all kinds of applications.</p><p>This means once you learn how to do this, you can apply it to any NFT project you want!</p><h3>Table of Contents</h3><ol><li>Introduction</li><li>Getting started</li><li>Let’s write some code!</li><li>Code walkthrough</li><li>Managing multiple NFT collections without clutter</li><li>Minting NFTs with privacy</li><li>Conclusion</li></ol><h3>1. Introduction</h3><p>We will use an algorithmic avatar generation library called <a href="https://avatars.dicebear.com/">Dicebear</a> (But you can imagine how you can simply switch out this engine to your own algorithmic image generator engine to mint your own art). The dicebear project automatically generates an avatar from a seed text you pass. Here’s an example code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*73nNh36ZGw-ogzMjMexE-Q.png" /></figure><p>The createAvatar() method generates an avatar SVG based on the seed attribute (which can be any text, but in this case &quot;hello&quot;). The automatically generated avatars look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kS2uHDGdLW3ic7Gb4fHYgQ.png" /></figure><p>In this tutorial we will:</p><ol><li>Algorithmically generate 1000 of these SVG avatars.</li><li>Tokenize each SVG image as NFTs.</li><li>Publish the NFTs to an NFT marketplace (https://rarible.com)</li></ol><p>The resulting collection will look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OzXQ4eNpw2bRJh6aFUYR2Q.png" /></figure><p>You can also check it out yourself here: <a href="https://rarible.com/user/0x3c584eb4f7ec6044e4419fc2ee7029547aeb7c01?tab=created">https://rarible.com/user/0x3c584eb4f7ec6044e4419fc2ee7029547aeb7c01?tab=created</a></p><blockquote>Note:</blockquote><blockquote>Please don’t try to buy these items. These items are not meant for sale, and I am simply using the public domain open source images to demonstrate how you can mint your OWN generative art NFT project.</blockquote><h3>2. Getting Started</h3><p>Let’s first initialize the project. Create a new folder and initialize npm:</p><pre>mkdir avatarcollection</pre><pre>cd avatarcollection</pre><pre>npm init</pre><p>For this project we need to install:</p><ul><li>Dicebear Avatar Generator Library: <a href="https://avatars.dicebear.com/styles/open-peeps">https://avatars.dicebear.com/styles/open-peeps</a></li><li>Rarepress</li></ul><p>Let’s install all the dependencies:</p><pre>npm install rarepress @dicebear/avatars @dicebear/open-peeps</pre><p>Now we are all ready. Let’s go!</p><h3>3. Let’s write some code!</h3><p>Above NFT collection was minted 100% with nothing but the following 21 lines of JavaScript:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tnvw53ybTdroSo4Y5YcNUA.png" /></figure><p>You can also clone the code and follow along at:</p><p><a href="https://github.com/rarepress/generative-nft">GitHub - rarepress/generative-nft: Build your own generative art NFT collection with 21 lines of JavaScript</a></p><p>Let’s save the file as index.js, and run it using node index:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vyyVGvASznk7emE_mnvoEg.gif" /></figure><p>I’ve included the console.log() line so it prints the marketplace URL after each token is published, so you should be able to visit the marketplace and check them out after running the program.</p><p>You can also click the “creator” link from any of the token listing, and it should send you to the entire 10,000 item NFT collection page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0e8Ph0OeE4QQ5qslRTVaVw.gif" /></figure><h3>4. Code Walkthrough</h3><p>Ok so we’ve just seen how just 21 lines of JavaScript code can mint an entire generative art NFT collection.</p><p>Now let’s walk through each line of the code to discuss what’s happening.</p><h4>Step 1. Require Modules</h4><p>We first need to require the @dicebear/avatars and @dicebear/open-peeps module to algorithmically generate avatars based on some value.</p><p>Also we need to require rarepress .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2AjOUNvXRuGeZxx53ftDyQ.png" /></figure><h4>Step 2. Initialize Rarepress</h4><p>Next we need to initialize Rarepress.</p><p>In this case I am initializing with the &quot;mainnet&quot;, but if you want to mint on testnet you can pass rinkeby or ropsten.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iepnhz3izirRyog0Hi72sA.png" /></figure><h4>Step 3. Loop 1000 times</h4><p>We are going to generate 1000 NFTs, so we start a 1000 for-loop. (Feel free to lower it to a smaller number like 10 or 100)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NA-92SqMw_YvQaByW5xupw.png" /></figure><h4>Step 4. Generate Avatar</h4><p>First we need to generate an avatar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S1b9EluxUdM5Ubv7gwx0XQ.png" /></figure><p>We pass in the seed value of i.toString(), which means the seed value will be &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, …, &quot;999&quot; throughout the loop. And for each value, a unique avatar SVG file will be generated.</p><h4>Step 5. Add the generated avatar SVG file to Rarepress File System</h4><p>Now that we have the SVG file in the svg variable, we add the file to Rarepress NFT file system using rarepress.fs.add().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DP1ZFgSLPrsSUoWdhp8rgw.png" /></figure><h4>Step 6. Tokenize the Image</h4><p>Now we need to tokenize the image. For this we call rarepress.token.create() and pass in the <a href="https://docs.opensea.io/docs/metadata-standards">NFT Metadata</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l4IaYY0qC8DcKe1LHh0yQw.png" /></figure><p>Note that we are passing in &quot;/ipfs/&quot; + cid for the “image” attribute since that’s the SVG image we want to tokenize.</p><h4>Step 7. Publish the files to IPFS</h4><blockquote>At this point, it’s important to note that everything is still completely private and hasn’t left your machine yet. This is the what makes Rarepress powerful.</blockquote><blockquote>Because Rarepress is a full stack NFT operating system complete with its own file system and database system, it lets you mint tokens completely offline and publish later.</blockquote><p>Now it’s time to publish.</p><p>Before publishing the token, we need to publish the SVG image and the metadata files to the public IPFS network first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3VtQ8DoIYEqWLjaIBH2_g.png" /></figure><ol><li>rarepress.fs.push(cid): publishes the SVG file to IPFS (just need to pass the cid of the SVG file)</li><li>rarepress.fs.push(token.uri): publishes the generated token’s token metadata file to IPFS (just pass the token.uri, which looks something like /ipfs/:cid.</li></ol><h4>Step 8. Publish the NFT</h4><p>Now we are ready to publish the NFT to a marketplace by calling rarepress.token.send(token), and that’s it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQB4-6HjvfrOcIP9ZmT5-Q.png" /></figure><h3>5. Managing multiple NFT collections without clutter</h3><p>One of the problems with NFT marketplaces like Opensea and Rarible is that they organize NFT items per user account.</p><p>The problem with this is, all your NFTs are mixed up into a single feed.</p><p>People have tried to solve this problem by deploying a whole separate contract for each new collection, but this model is not really scalable since we can’t expect everyone to deploy their own contract just for this feature. Fortunately you don’t have to do that anymore.</p><p>With Rarepress, you can take a single seed and generate infinite number of derived addresses, and mint each new NFT collection from a new address. You never reuse the address:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pssFWXn98E5nCLRaqg1uAg.png" /></figure><p>This is powered by a crypto wallet standard called <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki">BIP44</a> (which is derived from another standard called <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki">BIP32</a>), which is what all crypto wallets (including Ethereum wallets) are based on. If you have ever used a “seed phrase”, you have used BIP44. The great thing about BIP44 is that you can generate infinite number of addresses from a single seed.</p><p>In case of MetaMask and other Ethereum wallets, they use a “derivation path” of m’/44&#39;/60&#39;/0&#39;/0/0 as default. But you can simply tweak the end digit as much as you want in order to generate a new key for each new collection.</p><p>Rarepress lets you do this by allowing you to pass a key attribute when initializing. This creates a new wallet for the rarepress session. For example here we are using a private key derived from the path m&#39;/44&#39;/60&#39;/0&#39;/0/21000000 :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PcUPt-AWWGYT3p56L-bz5g.png" /></figure><p>Basically, for every new NFT collection, you can isolate the collections by using the keys derived from:</p><ul><li>m&#39;/44&#39;/60&#39;/0&#39;/0/0</li><li>m&#39;/44&#39;/60&#39;/0&#39;/0/1</li><li>m&#39;/44&#39;/60&#39;/0&#39;/0/2</li><li>m&#39;/44&#39;/60&#39;/0&#39;/0/3</li><li>m&#39;/44&#39;/60&#39;/0&#39;/0/4</li><li>m&#39;/44&#39;/60&#39;/0&#39;/0/5</li><li>and so on…</li></ul><p>If you manage your NFT projects this way, every time you create a new NFT project you can simply increment the last digit of the key path, and never reuse the private keys. This way, every NFT project you publish will have its own standalone landing page, and you no longer have the problem of multiple NFT collections being merged into one.</p><p>For example, this collection has 1000 items I have just minted:</p><p><a href="https://rarible.com/user/0x3c584eb4f7ec6044e4419fc2ee7029547aeb7c01">Rarible: NFT Marketplace</a></p><p>But I will never reuse the same address, and for the next collection I mint, I will use a different path, so none of my collections will overlap.</p><h3>6. Minting NFTs with Privacy</h3><p>Being able to mint with different address every time also has implications for privacy. Satoshi Nakamoto, the inventor of Bitcoin has discussed this in the Bitcoin Whitepaper:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nw460_gWt_JqGSAm4VTBA.png" /></figure><blockquote>“As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner.”</blockquote><p>If you want to preserve privacy for your awesome NFT project, you can simply use a different key path.</p><h3>7. Conclusion</h3><p>I have shown you how you can mint an NFT collection in a matter of minutes, and during the process, have introduced you to Rarepress, an NFT Operating System.</p><p>But what has been discussed in this article is just the tip of the iceberg of what Rarepress can do. If you want to learn more, check out the homepage here:</p><p><a href="https://rarepress.org/">Rarepress</a></p><p>Or for some examples and tutorials on what else you can do, check out the following documentation:</p><p><a href="https://examples.rarepress.org/#/">https://examples.rarepress.org</a></p><p>Finally, one of the most important aspect of Rarepress is that it can enable a completely decentralized offchain network of NFTs. Basically, you are not limited to listing your NFTs in one marketplace website, you can publish it everywhere in a complete peer-to-peer manner.</p><p>If you are interested in how this works, check out the following documentation:</p><p><a href="https://rarenet.rarepress.org/#/?id=why-rarenet">Rarenet</a></p><p>If you are interested in the project, feel free to:</p><ul><li>Join Discord: <a href="https://discord.gg/BZtp5F6QQM">https://discord.gg/BZtp5F6QQM</a></li><li>Follow me on Twitter <a href="https://twitter.com/skogard">https://twitter.com/skogard</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfa603cc56d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rarepress.node]]></title>
            <link>https://skogard.medium.com/rarepress-node-aac7b08a7be0?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/aac7b08a7be0</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 14:43:01 GMT</pubDate>
            <atom:updated>2021-07-28T14:43:01.054Z</atom:updated>
            <content:encoded><![CDATA[<h4>Rarepress outside of the browser</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJvC09m8D5gCMrQTn0Q18w.png" /></figure><p>Today I’m releasing an important part of the <a href="https://rarepress.org/">Rarepress</a> stack called rarepress.node. It’s basically Rarepress, but outside of the browser:</p><p><a href="https://github.com/skogard/rarepress.node">GitHub - skogard/rarepress.node: rarepress for node.js</a></p><h3>What is Rarepress?</h3><p>But first, a quick recap on what Rarepress itself is:</p><p><a href="https://rarepress.org/">Rarepress</a> is an NFT minting framework that has significantly lowered the barrier to minting NFTs in the browser, to practically zero.</p><ol><li><strong>Zero learning curve:</strong> All you need is 2 lines of JavaScript to mint an NFT.</li><li><strong>Zero cost:</strong> No need to even own Ethereum. Just get started minting NFTs immediately for FREE.</li><li><strong>Zero maintenance:</strong> No need to maintain complex infrastructure such as IPFS. Everything is just a simple JavaScript function call away.</li></ol><p>Until today Rarepress has been a frontend-only framework, which means you could only use Rarepress in a frontend web app.</p><p>This is all great, but not flexible enough for a lot of use cases. We must go deeper.</p><h3>Problems</h3><p>Here are some of the problems with rarepress.js:</p><ol><li><strong>Browser only: </strong>All minting, trading, and programming of NFTs take place in the browser. What if you want to mint local files on your computer? What if you want to mint files on a server? What if you want to tokenize a raw stream of data?</li><li><strong>Manual:</strong> Because browser wallets only let you manually sign one message at a time, it’s not possible to mint and trade thousands of NFTs automatically.</li><li><strong>Single identity: </strong>You can only use a single wallet address to mint NFTs when using browser based wallets. What if you could mint NFTs from as many addresses as you want, each used for its own purpose?</li></ol><h3>Introducing Rarepress for Node.js!</h3><p>We already have a way to mint in the browser with rarepress.js, what we now need is a way to mint NFTs <strong>outside of the browser. </strong>It would be also great if it had the same API so you can use the same code everywhere.</p><p>And today, that’s exactly what I am releasing: <strong>Introducing Rarepress.node!</strong></p><p>Node.js runs on linux servers, laptops, raspberry pis, and even in <a href="https://code.janeasystems.com/nodejs-mobile">mobile devices</a>, which means the possibilities are limitless.</p><p>Rarepress.node has exactly the same and easy to use syntax from Rarepress.js, because…it inherits from Rarepress.js! Here’s an example code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJvC09m8D5gCMrQTn0Q18w.png" /></figure><p>Did you notice?</p><p>It’s EXACTLY the same code as the original rarepress.js for the browser! (Except that you have to require the rarepress.node module at the beginning).</p><p>This means you can take your existing rarepress apps from the browser and port it to rarepress.node powered apps instantly.</p><p>Of course there are many differences in how rarepress.node works compared to rarepress.js. Let’s walk through them.</p><h3>Features</h3><p>Here are some highlights:</p><ol><li><strong>Built-in Wallet:</strong> Rarepress.node includes a built-in HD wallet (Hierarchical Deterministic wallet). You can programmatically instantiate as many wallets as you want from a single seed and mint NFTs using all those addresses.</li><li><strong>100% Automated:</strong> You can now programmatically loop through 10,000 algorithmically generated images and tokenize them all into NFTs, automatically. No manual wallet approval for every mint. Imagine having to approve all 10,000 signature requests on your MetaMask. With Rarepress.node you can just run your code and it will mint a whole 10,000 item collection without you approving anything.</li><li><strong>Multi-identity:</strong> You can now mint from as many addresses as you want. You can even generate them deterministically and keep track of all the addresses you own.</li><li><strong>Same syntax as rarepress.js:</strong> Best of all, you don’t have to learn anything new! Rarepress.node builds on top of the original Rarepress.js (<a href="https://github.com/skogard/rarepress.js">See GitHub here</a>) so it inherits 100% of the features from the original, and you can use it exactly like how you would use it in the browser.</li></ol><h3>Walkthrough</h3><p>To explain the true power of rarepress.node, let’s walk through a simple code that automatically loops 100 times and creates a collection of NFTs, WITHOUT making you approve every time (in the browser you have to approve every time).</p><p>Here’s the code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4kTIRSU_du5n-PZnR61EBQ.png" /></figure><p>Let’s walk through the code line by line to understand how all this works:</p><h4>Step 1. Require rarepress.node</h4><p>Since this is a node.js environment you need to require the package first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ZTdiyLXCu4g30tuKr2p8w.png" /></figure><h4>Step 2. Initialize Rarepress</h4><p>In the browser version of <a href="https://github.com/skogard/rarepress.js">rarepress.js</a> you can only instantiate a single global rarepress obejct because there can be only one wallet (for example MetaMask).</p><p>With rarepress.node, instead of a single wallet, we can use multiple wallet addresses derived from a single seed.</p><p>To specify the key derivation path, simply set the key attribute with a desired <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki">BIP44 derivation path</a> (in addition to the usual host attribute to specify the rarepress host)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVAauOo2Dq6ITIaNd4lb4Q.png" /></figure><p>In this case we only used one wallet, but you can imagine creating multiple instances of Rarepress and initializing with different wallets for each.</p><h4>Step 3. Automated Signature</h4><p>One of the biggest benefits of rarepress.node is that it lets you do everything programmatically and automatically.</p><p>Instead of having to approve every sign request (in the browser, you have to sign the MetaMask popup every time when you need to do anything), you can write a piece of JS code that loops through and automatically mints 100s and 1000s of NFTs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4hiI7vYF_53D6irERcQrw.png" /></figure><p>This automated wallet signature is possible because rarepress.node ships with a wallet built-in.</p><p>By default a wallet is generated when you first run a rarepress.node application, which stores your encrypted seed at your home directory under ~/.mushie.</p><h4>Step 4. Same syntax for interacting with Rarepress</h4><p>The only difference between rarepress.js and rarepress.node is the initialization part:</p><ol><li>you can create multiple instances of rarepress</li><li>you can instantiate each rarepress with different key derivation paths</li></ol><p>But once initialized, the rest of the syntax is 100% identical to the browser version of rarepress.js:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wr7MJolK0rNR5reTwj9Kgg.png" /></figure><h3>Conclusion</h3><p>It’s very simple to use. To install, just do:</p><pre>npm install rarepress.node</pre><p>And then you can start minting your NFTs!</p><p>You can learn more about Rarepress.node on the GitHub repo:</p><p><a href="https://github.com/skogard/rarepress.node">GitHub - skogard/rarepress.node: rarepress for node.js</a></p><p>If you have any questions, come to <a href="https://discord.gg/BZtp5F6QQM">discord</a> and ask!</p><p><a href="https://discord.gg/BZtp5F6QQM">Join the SKOGARD PRODUCTIONS Discord Server!</a></p><p>Also you can learn more about the entire Rarepress stack at:</p><p><a href="https://rarepress.org/">Rarepress</a></p><p>Finally, if you want to stay updated on Rarepress, follow me on Twitter at @skogard:</p><p><a href="https://twitter.com/skogard">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aac7b08a7be0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Newbie’s Adventures in NFT Scaling Solutions]]></title>
            <link>https://skogard.medium.com/a-newbies-adventures-in-ethereum-scaling-solutions-10e04a62f3c2?source=rss-5dba66c5e053------2</link>
            <guid isPermaLink="false">https://medium.com/p/10e04a62f3c2</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Skøgard]]></dc:creator>
            <pubDate>Wed, 07 Apr 2021 15:13:59 GMT</pubDate>
            <atom:updated>2021-05-12T14:30:22.337Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*kjSKp6gNOpn06yoeusk_WQ.png" /></figure><h3>Table of Contents</h3><ol><li>Intro</li><li>What exactly do they scale?</li><li>What powers each solution?</li><li>How hackable are they and what’s the worst case?</li><li>How censorship resistant are they?</li><li>How fast is the settlement?</li><li>Are they self sustainable?</li><li>Scaling solutions in the NFT space</li><li>Uniswap V3 and optimistic rollup</li><li>Composability</li><li>Conclusion</li></ol><h3>Intro</h3><p>I am a newbie to Ethereum, and just a few weeks ago I participated in NFTHack to learn and meet other people interested in NFT <a href="https://nfthack.ethglobal.co/">https://nfthack.ethglobal.co/</a></p><p>I built a project called Hashchain (<a href="https://hashchain.app/about">https://hashchain.app/about</a>) as a solution for potential “NFT front running” that may happen in the future as lazy minting becomes prevalent.</p><p>In the process I got acquainted with Polygon (<a href="https://polygon.technology/">https://polygon.technology/</a>), an Ethereum Plasma sidechain that makes it super easy to build scalable smart contract apps. Back then I had no idea what kind of scaling solutions existed, but after the hackathon was over, I got interested in various scaling solutions in Ethereum and decided to do a quick research.</p><p>Personally I think the only thing that’s holding back NFT from completely taking over the world is the scalability issue. And while many NFT projects and companies have come up with various scaling solutions such as <a href="https://opensea.io/blog/announcements/introducing-the-collection-manager/">lazy minting</a>, adoption of Plasma sidechains (<a href="https://matic.opensea.io/">Opensea</a>, <a href="https://twitter.com/0xPolygon/status/1375468631530696705?s=20">Zora</a>, etc.), and soon to be launched ZK Proof based solutions (more on this below), there’s still a long way to go.</p><p>In this article I am going to discuss all the things I’ve learned about various scaling solutions as well as a lot of things I was confused about in the beginning as an Ethereum newbie. Hopefully other newbies find this helpful and I will also learn even more through feedback.</p><p>So please note that this is coming from a complete newbie point of view and I may have gotten certain things wrong, so please don’t hesitate to correct me if I’m wrong on something. And I would appreciate lots of feedback.</p><blockquote><strong>You can find me on Twitter: https://twitter.com/skogard</strong></blockquote><h3>What exactly do they scale?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aFMfX9-ytGbvV8D5N1gV-Q.png" /></figure><p>There are many ways to scale a blockchain. Some solutions scale the computation, some solutions save the blockchain storage. Some solutions save the gas price by saving the computational cost. These are two separate qualities.</p><h4>1. Computation</h4><p>All rollups are computational scaling solutions. Optimistic rollup, Zk rollup, Validium, all of these move computation outside of the Ethereum. This means all of the scaling solutions will reduce gas price.</p><h4>2. Storage</h4><p>Scaling computation is important but also the blockchain size is important. Which solutions save more space?</p><ul><li><strong>Plasma:</strong> Since Plasma only commits the root of each block to the main chain, it saves a lot of space (but this also means the plasma chain needs to take care of its own security)</li><li><strong>Optimistic Rollup:</strong> Optimistic rollup is the least efficient when it comes to storage. Because the whole point of rollups is to execute state transitions offchain while storing the transactions onchain, it still needs to store all the transactions on Ethereum at the end of the day. So if your optimistic rollup chain had a million transactions, you still have to save all these transactions on ETH. As you can see, the storage grows linearly against the number of transactions.</li><li><strong>ZK Rollup:</strong> ZK Rollup also needs to store transactions on the main chain, but it’s much more efficient than optimistic rollup because there is only one witness per block (whereas optimistic rollup needs one signature per transaction)</li><li><strong>Validium:</strong> Validum is basically ZK Rollup minus onchain transaction storage. The only thing it settles on the main chain is the Zero Knowlege proof, and each validium operator is responsible for storing the transactions for their users.</li></ul><h3>What powers each solution?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gkRa4jfGipaH79Xx2WWGgQ.png" /></figure><h4>1. Optimistic Rollup</h4><p>Optimistic rollup is powered by game theory (or economics). It’s basically “We will assume everything goes well, but if you do something wrong, then we will punish you”. This may sound familiar because this is how our existing financial system works.</p><p>Think of a credit card. If someone steals your card and spends your money from the card, there’s no way the credit card company will know until you yourself figure it out and “challenge” to the company that there was a fraud. In case of credit card, depending on which country you live, the government may protect consumers for credit card fraud up to 60 days. Optimistic rollup has around 1 week of challenge period for the same reason.</p><p>But here’s a difference between a credit card fraud and an optimistic rollup fraud: The level of punishment is exactly the same for everybody regardless of how much harm they do to the system, because it’s all preconfigured. If you engage in a credit card fraud, you will be punished much more if you stole a billion dollars compared to a guy who stole a dollar.</p><p>However on optimistic rollup, it looks like a billion dollar heist is treated the same way as a dollar pickpocket. This makes it vulnerable to 51% attack when the profit (steal) outweighs the cost (punishment).</p><p>Let’s look at an excerpt from the Bitcoin Whitepaper:</p><blockquote><em>If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth. — Satoshi Nakamoto</em></blockquote><p>Even in Bitcoin, if the attacker finds it more profitable to NOT play by the rules, the attacker has plenty of incentive to sabotage the system. To be clear, the worst case scenario in optimistic rollup is nowhere as bad as the worst case scenario in Bitcoin because the fraud transactions can be rolled back and the system can incentivize their users to roll back the ledger in case the initial “optimism” proves to be incorrect.</p><h4>2. ZK Rollup</h4><p>ZK Rollup (Zero Knowledge Rollup) is based on zero knowledge proofs, so we could say that it’s powered by “math”. If a ZK rollup block is valid, then there is no room for disputes because it’s provably correct.</p><p>None of what happens offchain can ever settle on the main chain unless the proof is mathematically correct. This means nobody can steal your funds on the Ethereum main chain by attacking a ZK rollup offchain system.</p><h4>3. Validium</h4><p>Validium is basically <strong><em>ZK Rollup without Onchain Transaction Record.</em></strong></p><p>Which means it works the same way as ZK Rollup — it stores the ZK Proof on the Ethereum main chain — except that the actual offchain transactions are NOT stored on the Ethereum main chain. They are only stored by the Validium service operators.</p><p>If I understand correctly, strictly speaking Validium is not a “rollup” since the definition of “rollup” seems to be that the offchain transactions are fully “rolled up” to the main chain so everybody has full access to the offchain transactions in case something goes wrong, in which case they can use the “rolled up” transactions to prove and move their funds. This was the main innovation rollups brought over Plasma.</p><p>So what is Validium powered by? First, the ZK part is still valid, the same way ZK Rollup protects your onchain Ethereum funds from any offchain transactions, Validium never lets any fraudulent transaction get settled on the main Ethereum chain. So we can say it’s part powered by math.</p><p>But because Validium does not store all the transactions on the main chain and the Validium operators are responsible for storing the transactions themselves, we could say it’s also part powered by economics. There’s some trust factor that users expect Validium operators to NOT censor their transactions because only the operators fully store the transactions (More on this below).</p><p>Whoever finds it lucrative to run a validium service will run it and they will be economically incentivized to run it. They could subsidize the cost with the money they make through the transactions that happen on their Validium based network.</p><p>Also, arguably we could say that many Validium services will be powered by “Law”. If I am interpreting this correctly, the Validium operators may be classified as money carriers because they are responsible for their customers funds. Since Validium transactions can be censored and stopped, maybe these validium scaling solutions will be regulated.</p><p>Lastly, it may be possible to implement a consensus network on top of Validium. By default, none of the ZK based solutions seem to need a blockchain. But in case of Validium as we saw, transactions can be censored. You could solve this through a consortium, but also they could create another blockchain that incentivizes good behavior. In fact it looks like this is where Starkware is going through their Starknet.</p><h4>4. Plasma</h4><p>Let’s use Polygon as an example. As of today, Polygon provides a Proof of Stake based Plasma chain.</p><p>Since Plasma doesn’t guarantee correctness of settled transactions, they need their own consensus engine. And Polygon uses Proof of Stake. This means the Polygon network is NOT as secure as the Ethereum main chain, which is the point: It’s a tradeoff between security and scalability.</p><p>So we could say Plasma is powered by the same mechanics that power any blockchain. And it doesn’t really fit into the “rollups” discussion we are having right now because Plasma chains are separate sidechains that need their own strong enough consensus mechanism and their goal is not even to fully take advantage of the Ethereum main chain’s security (which again, is the whole point).</p><h3>How hackable are they and what’s the worst case?</h3><h4>1. Optimistic Rollup</h4><p>If a rollup chain was powered by proof of stake, and you were to lose a million dollars if you try to cheat, but if a block contained a billion dollars worth of transactions, it is worth it to do 51% attack. The attacker “ought to find it more profitable to attack than to play by the rules of the system”.</p><blockquote>An Optimistic Rollup system can be susceptible to a 51% attack as the cost of stealing funds is unrelated to the bounty size. Further, Optimistic Rollups can be vulnerable to more attack vectors due to their game theory based security model. In contrast, a ZK-Rollup system cannot be moved to an invalid state and funds cannot be stolen, irrespective of the bounty size.</blockquote><blockquote>via <a href="https://help.dydx.exchange/en/articles/4797156-what-is-layer-2">https://help.dydx.exchange/en/articles/4797156-what-is-layer-2</a></blockquote><p>Theoretically, anyone can submit a “fraud proof” (a proof that shows that there was a fraud) and roll back the transactions when there was a fraud, and this is why optimistic rollups have a so called “challenge period” before the transactions fully settle on the Ethereum main chain.</p><p>But, even this can be bypassed in the worst case scenario. Someone who has the control over the rollup system may keep grinding until the challenge period is over, and nobody will be able to stop them.</p><h4>2. ZK Rollup</h4><p>ZK Rollup cannot be “hacked” in a sense that you will never lose your funds on your main Ethereum chain through an attack on a ZK rollup, because at the end of the day the ZK proof must be correct in order for the ZKRollup block to settle.</p><p>There is no “we believe you but we’ll punish you if you’re bad”. The system never even allows a bad behavior in the first place.</p><p>One thing to note in terms of “hackability” is that the ZK proofs used are either ZK-SNARK or ZK-STARK. In case of ZK-SNARK, we need to trust that the genesis event (the “trusted setup ceremony”) is not rigged and trust that the founders throw away the keys after the setup, otherwise you will always live in fear that one of them could go evil and take your money. This is why many solutions are trying to use ZK-STARK which does not require a trusted setup, but the only thing I’m concerned about is that these approaches are very new and the general wisdom says that we need to be cautious about using cryptography that hasn’t been proven over time.</p><h4>3. Validium</h4><p>Just like ZK Rollup, Validium cannot be hacked (cannot settle fraudulent transactions on the main Ethereum chain), but because the transaction data is NOT stored on the main chain, if the Validium operator decides to mess with the transaction data it has, the users may not be able to move their funds. The users technically don’t lose their funds on the main chain, but they may be blocked from making transactions. This is not technically “hacking” and is its own category (censorship resistance) and I’ll discuss more on this below.</p><h3>How censorship resistant are they?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_6twdJabkJCEPoIoSZpjA.png" /></figure><p>Can transactions be censored?</p><p>Before we go in, we are talking about “censorship resistance” from the scaling solution’s point of view. Each solution may or may not be able to censor transactions to certain degree, but this doesn’t mean your transactions on Ethereum can be censored.</p><p>Let’s start from a base assumption that Ethereum itself is “censorship resistant”. Because anyone can submit transactions to the network and because miners will mine them as long as the fee checks out, transactions on Ethereum are censorship resistant.</p><p>But let’s imagine a scenario where Ethereum solely scales through L2 solutions like rollup. In this case I assume Ethereum will only be used as the final settlement layer, and 99% of the actual transactions will happen on L2. In this case we must assume that Ethereum’s security model and censorship resistance is determined not by Ethereum itself but by the L2 solutions it scales with.</p><p>For example, we can no longer assume that the things we take for granted, such as every smart contract function call taking place atomically without censorship or some uncertainty, holds true.</p><p>When it comes to censorship resistance, this is especially important. It is important that L2 solutions are censorship resistant. Otherwise we can’t really say Ethereum is censorship resistant. So let’s assess how “censorship resistant” each solution is.</p><p>Long story short, the censorship resistance aspect seems to depend on whether each solution keeps the full transaction history on the main chain or not. Just to clarify let me explain (Note that “on chain” below means “on Ethereum”):</p><ol><li><strong>Ethereum:</strong> Transactions are executed AND stored on chain.</li><li><strong>Plasma:</strong> Transactions are NOT executed on chain, and NOT stored on chain. Only the root of the plasma chain block is stored on chain.</li><li><strong>ZK Rollup &amp; Optimistic Rollup:</strong> Transactions are NOT executed on chain, but stored on chain.</li><li><strong>Validium:</strong> Transactions are NOT executed on chain, and NOT stored on chain. Only the proof is stored on chain.</li></ol><p>From above, the ones that store transactions on chain (ZK Rollup and Optimistic Rollup) are the ones that are absolutely censorship resistant. This is because, even if the offchain solution tries to censor their users, the users recreate the state by replaying the offchain transactions stored on chain.</p><p>On the other hand, a solution like Validium or Plasma are not completely censorship resistant by default. In case of Plasma chains, the censorship resistance quality relies on how censorship resistant each Plasma sidechain is, which means they need to bootstrap their own censorship resistance. In case of Validium, by default Validium doesn’t need to be a blockchain so chances are, it could be run by a single or a small number of actors, so this problem is more highlighted. Here’s an example merkle tree of a Validium block:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*2BTJrDXXa9es7-V6HJT4IQ.png" /></figure><p>If the d3 node is changed by the Validium operator, the owner of d1 suddenly cannot provide the merkle proof since the merkle path includes the “m” node which depends on d3. This means the owner of d1 won’t be able to prove their account ownership.</p><p>But again, this all comes down to economics. If the Validium operators find it more profitable to play by the rules, they will not cheat since there’s not much to gain from censoring their user funds. For example, if a cryptocurrency exchange runs a Validium system as their offchain scaling solution, they don’t have the incentive to censor their users. But I assume anyone running a Validium service in this configuration will be likely regulated by the government (since they can censor), and often the governments will ask them to censor criminal transactions (child trafficking, etc.) and they will comply. And there’s nothing wrong with this on its own, it’s just how they decide to do their business.</p><p>Of course, it is possible to build on top of Validium and build its own consensus mechanism for making it more censorship resistance, and that will also have to bootstrap its own censorship resistance model. This seems to be the long term roadmap of Starkware.</p><h3>How Fast is the Settlement?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6uc0RSJm2aFdXbqBcuG3Q.jpeg" /></figure><p>How long does it take to settle on the main chain (Ethereum)?</p><p>Why do settlement delay even exist? It’s simple. If it’s completely secure (mathematically secure), they can just settle immediately. if it’s not completely secure (relies on game theory and economics), they may need some longer settlement time. Here’s roughly what I’ve found so far:</p><ul><li>Zk Rollup: 5 minutes</li><li>Optimistic Rollup, Plasma: Around 1 week</li><li>Bank of America: Up to 3 days</li></ul><p>Of course, there are ways to do faster settlement on optimistic rollup by letting people create a liquidity market on top of it. But if I understand correctly, while this is simple enough for fungible assets, it’s not as simple for NFTs. Also, it would be great if Optimistic rollup solutions can find a non “market based” solution for faster settlement, because it’s a slippery slope to start relying on “the market” for everything since market can be manipulated whereas math cannot.</p><h3>Are they self sustainable?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tBdQJA6Ef2XE_jDnXJ9z3g.jpeg" /></figure><p>How do they make money? A system needs to be sustainable to work in the long term. And since we are talking about a solution that will scale blokchains, for a scaling solution to actually work, it needs to be sustainable. So how does each approach make money?</p><h4>1. Does it need a blockchain?</h4><p>The first thing I looked at is whether each solution needs a blockchain:</p><ul><li>Plasma: Yes. The whole concept is based on Plasma sidechains. Each has its own consensus model.</li><li>Optimistic rollup: There can be. Proof of Stake</li><li>ZK Rollup: Not needed</li><li>Validium: Not needed by default, but may need for censorship resistance (validium operators can censor transactions).</li></ul><h4>2. What’s the “business model”?</h4><p>If I understand correctly, Validium is run by the stakeholders who want to scale transactions for their own users. It’s basically a toolkit, not a new network (not a new blockchain). So for example, Starkware the company does not have any token nor has done any ICO. They claim to plan on making money through licensing.</p><p>That said, some of their long term roadmap looks interesting as their goal seems to go further than just providing a tool. They seem to be trying to address the censorship resistance problem by creating their own “Starknet” (See step 3, “Universe”), so that sounds cool. Eventually they will probably create their own economy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9uLXnSo9a50A0z1zkCvvQ.png" /></figure><p>On the other hand, unlike ZK based rollups which start out as tookits but don’t need to take the form of a blockchain or need their own consensus depending on the use case, I think Optimistic rollups MUST be decentralized because blind optimism can bring inefficiencies. For example, if people figure out a way to game the system by constantly attacking despite the fact that they can be punished, there will be many rollbacks and the system may become unusable until the problem is fixed.</p><p>This can be mitigated by building their own decentralized system (decentralized sequencer), which is what Optimism is doing. So we can assume that they will create their own economy and incentive mechanism to make the system self sustainable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-m92Gpp87nfwegWytVfdow.png" /></figure><h3>Scaling solutions in the NFT space</h3><h4>1. Plasma (Polygon)</h4><p>As far as I am aware, many NFT services are implementing Polygon (Previously Matic) for scaling. As discussed, Polygon is a Plasma chain powered by Proof of Stake.</p><p>As far as I know there are It’s been adopted by:</p><ul><li>Opensea: <a href="https://matic.opensea.io/">https://matic.opensea.io/</a></li><li>Zora: Zoragon, from the NFTHack hackathon <a href="https://hack.ethglobal.co/showcase/zoragon-recOKjaloymKaRHGO">https://hack.ethglobal.co/showcase/zoragon-recOKjaloymKaRHGO</a></li></ul><p>So why did they choose Plasma? Probably because it’s easy to implement (Polygon is completely EVM compatible) and so easy to use. From my experience at the NFTHack hackathon, you can simply switch out the RPC provider URL and immediately connect to Polygon instead of Ethereum, and all smart contracts automatically work and you don’t need any rewrites.</p><p>But the potential problem is, if you store your NFT on Plasma, you can’t withdraw to the main Ethereum chain for a week. And it looks like it’s not easy to implement a liquidity market for NFTs therefore the 1 week challenge period will stay. I’m guessing people who buy NFTs on Polygon will just keep them there until it becomes super expensive.</p><h4>2. Optimistic rollup</h4><p>The 1 week challenge period is the same issue for optimistic rollup. This means the NFT you store on Polygon cannot be “withdrawn” to the Ethereum main chain for a week.</p><p>While there are solutions to solve this problem by creating a liquidity market for expedited transfers, I don’t think this is (yet) possible for NFTs because the liquidity problem with NFTs is a completely different issue from fungible tokens.</p><h4>3. ZK Rollup &amp; Validium (ImmutableX)</h4><p>While researching I’ve also come across a project called ImmutableX (<a href="https://www.immutable.com/">https://www.immutable.com/</a>) is getting ready to launch a dedicated ZK based scaling solution that lets you choose between ZK Rollup and Validium, so this is another interesting approach. They are powered by all the ZK tech from Starkware (<a href="https://starkware.co/">https://starkware.co/</a>). If you want full censorship resistance, you can use ZK rollup. If you want higher processing power, you may use Validium. They give you the choice through what they call “Volition”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*T6AElMzBHMJNaW5PwqVNrg.jpeg" /></figure><p>So what exactly are they? Is it a blockchain? a service? a framework? Here’s what they say on the website:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mATGqb8Z8M0YplqhW0WKHg.png" /></figure><p>If you ask me, this looks like the ideal setup to me!</p><p>They don’t seem to have a token of their own and it looks like they are going to provide software as a service. My understanding is they are shooting for becoming <strong>the </strong><a href="https://infura.io/"><strong>Infura</strong></a><strong> (or </strong><a href="https://www.alchemyapi.io/"><strong>Alchemy</strong></a><strong>) of the NFT space.</strong> And by that I mean they seem to be building an infrastructure company where you pay to use their service like AWS. And that’s exactly what I want :)</p><p>I signed up for an invite and am looking forward to checking it out when they launch. If they actually deliver what they promise, I think a lot of people will want to use their service, since your ZKRollup transactions settle near immediately on the Ethereum main chain without any challenge period or any uncertainty.</p><h4>4. Validium: StarkNet by Starkware</h4><p>Next, let’s look at <a href="https://starkware.co/">Starkware</a> (which powers the engine that powers ImmutableX), who came up with Validium. They don’t have anything of their own specific to the NFT space but has an interesting roadmap:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9uLXnSo9a50A0z1zkCvvQ.png" /></figure><p>The first phase focuses on “single app rollup”, which can be run by one entity (like a company or an organization).</p><p>The second phase is where multiple apps can share a rollup to solve their liquidity and composability problem. One thing to note is that it’s still a single operator running each rollup. You can imagine one company (or a trust based consortium) running multiple applications using a shared rollup for scalability.</p><p>The third phase is where it gets interesting. They plan to decentralize the operators, so that it is no longer a single operator who runs these rollups. One immediate question that arises is, “Does this mean Starknet Universe will then compete with Ethereum?”. My guess is StarkNet, because it settles to Ethereum at the end of the day, will evolve to become an “Ephemeral Ethereum”, where you can do all things you can do on Ethereum but without the StarkNet having to worry too much about security. It only needs to worry about the security until each ZK block settles on Ethereum. Which means it won’t compete with Ethereum, but act as a sort of a “Mempool for Ethereum”, a completely separate project with its own strengths. (Again I could be totally wrong so please let me know if I’m off the mark)</p><h4>5. zkSync: Matter Labs</h4><p>Lastly, there’s <a href="https://zksync.io/">zkSync</a> from <a href="https://matter-labs.io/">Matter Labs</a>. zkSync is a combination of ZK Rollups and a new approach called <a href="https://medium.com/matter-labs/zkporter-composable-scalability-in-l2-beyond-zkrollup-2a30c4d69a75">zkPorter</a>.</p><p>ZK Rollups we already know, so what is zkPorter? Here’s what they say:</p><blockquote>zkPorter tackles data availability with a hybrid approach that combines the ideas of zkRollup and sharding. It can support <strong>arbitrarily many shards</strong>, each with its own data availability policy, defined by the shard’s smart contract. The choice of the shard is controlled at individual account level.</blockquote><blockquote>zkPorter separates the concerns of state validity and data availability. State validity — that the transition from one state to the next is always valid — is uniformly enforced by means of zero-knowledge proofs, which offer exponential scalability while inheriting the security guarantees of the underlying L1. In contrast, data availability is delegated to individual shards, which are free to experiment with different solutions. In necessariis unitas, in dubiis libertas!</blockquote><p>If I interpret it correctly, zkPorter is like “Cosmos on Ethereum”. Basically,</p><ol><li>zkPorter is internally powered by ZK Rollups and Validium schemes.</li><li>There are multiple virtual “shards” on Ethereum that take the form of smart contracts</li><li>Each shard has a different security policy in terms of data availability</li><li>The most secure shard uses ZK Rollup, which ensures full data availability</li><li>Other shards can use the Validium approach, but each with its own Proof of Stake model. The higher the stake, the more secure it is. The operators get slashed if they fail on data availability.</li><li>Users (Developers) can build their own security model by mix and matching and customizing their own staking model for each shard (Ethereum smart contract)</li></ol><p>Basically, zkPorter lets you make your own decisions on whether to save costs on transactions but with lower data availability requirements, or to provide absolute data availability but with high costs.</p><p>For zkSync 2.0 they plan to make it much easier to choose between ZK Rollup and zkPorter. I think it is this zkPorter adoption that will help with NFT adoption because ZK Rollup alone is still capped by having to store all transactions on chain (They only solve the computational scalability problem, not strorage problem, as mentioned above).</p><p>Compared to vanilla Validium systems, I think what zkPorter is trying to do is provide a self contained guarantee system so that the users of a rollup no longer need to blindly trust that the Validium operator will act in their interest and never withhold data. By moving from trust to proof of stake, users can look at the zkPorter stake and see how much security they have for their assets. I think this would be important for NFTs because most people will prefer to use a rollup with a billion dollar stake guarantee (instead of no guarantee) when they’re moving around their $69 million NFTs.</p><p>zkSync 2.0 is another interesting approach for rollups, but hasn’t launched yet. They plan to launch in May and I look forward to learning more.</p><h4>6. Lazy Minting (Opensea, Rarible, etc.)</h4><p>Finally, the one exciting thing to come out of NFT space is something called “Lazy minting”. Because minting a token takes gas, and gas is expensive, the lazy minting approach delays the actual minting until someone decides to purchase an NFT.</p><p>Basically before lazy minting, an NFT creator had to mint a new token and pay for gas fee for every token they minted. Since gas is expensive, this meant you couldn’t for example mint a thousand NFTs without making tons of initial investment, and that hurts creativity.</p><p>NFT marketplaces like <a href="https://opensea.io/">Opensea</a> and <a href="https://rarible.com/">Rarible</a> implement lazy minting, which is supported by implementing a variation of an ERC721 contract (The original NFT contract) that includes a method called “mintAndTransfer”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJoYusztrYda9g56KokZTQ.png" /></figure><p>This means you can just submit NFT creation requests to Opensea or Rarible and they will list them for you on their sites, and when someone comes and tries to buy your NFT, THAT’s when your NFT will be minted AND transferred to the buyer. This is much more affordable for the NFT creator.</p><p>One problem with this approach is that someone could theoretically “front run your NFT” by taking your IPFS hash that’s yet to be ever minted on the blockchain, and then submitting it as yours. And this was actually the problem I tried to solve for my NFTHack project. Here’s a quick video on how this problem can happen:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxmRXhyF_n5U&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxmRXhyF_n5U&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FxmRXhyF_n5U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c25e56c3e9ea342c1159a2b969ff3dfd/href">https://medium.com/media/c25e56c3e9ea342c1159a2b969ff3dfd/href</a></iframe><p>If you’re interested in this problem you can learn more at: <a href="https://hashchain.app/">https://hashchain.app</a></p><h3>Uniswap V3 and Optimistic Rollup</h3><p>I bring up Uniswap because Uniswap is currently at the center of DeFi, and many NFT projects are thinking of integrating NFTs with DeFi to make much more crazy apps, so it’s a relevant topic.</p><p>Uniswap V3 is planning to adopt optimistic rollup. I wonder how this will be implemented. I am guessing there will be a liquidity market for fast withdrawals and that should work well.</p><p>But eventually as ZK rollup becomes popular, I also think people will want an option of ZK rollup implementations as well because there’s more immediate liquidity without having to go through an overlay liquidity market for moving between the main chain and the rollup chain. Also, from Uniswap’s point of view, using ZK approaches gets rid of a lot of trust related issues and headaches.</p><p>That said, maybe Uniswap will make more money by providing the liquidity provider service so they may be incentivized to build the best Optimistic rollup based scaling solution ever.</p><p>Also as of today Optimistic rollup makes it easy to port existing Ethereum contracts so it makes sense that they are choosing Optimistic rollup for their scaling solution. Also there may be other things in the works coming from the optimistic rollup side that solves a lot of the problems in an elegant manner, so looking forward to how it goes. It’s exciting to see multiple solutions evolving in parallel.</p><h3>Composability</h3><p>One exciting thing we see from the DeFi movement is composability. Basically you can stack multiple mechanisms on top of one another to build complex application, like playing with Lego.</p><p>It looks like people are predicting that the future of rollups will be like a metropolitan city, that there will be multiple “districts”, such as financial district (DeFi), art district (NFT), etc. and people will mostly hang out (in terms of liquidity) in financial district for doing financial stuff, and hang out in art district (NFT).</p><p>This is especially true for optimistic rollups because of the 1 week challenge period before withdrawal. People will want to just stay in say, Uniswap district, for doing all financial stuff, and Uniswap district will gain more and more network effect and become “the financial district”. This means the market dynamics may incentivize some players to implement optimistic rollup over something like zk rollup because they want to keep more users in their district.</p><p>That said, if we really go further with our city analogy, there is no city district where you visit and can’t leave for a week. A metropolitan city is great because you can work as a financial trader in the Financial district, and visit a gallery opening in the Lower East Side later in the night.</p><p>The reason I mention this is because I am wondering how the NFT + DeFi will turn out. While I can see how a DeFi specific district will arise, people will want to also compose DeFi with NFT, and any other new blockchain based protocols that come out in the future. In this context, I am not sure how the city district analogy works out. In my view, the most ideal picture is if there is a way to compose multiple “districts”.</p><p>But what if all NFTs use ZK based rollups and DeFi use optimistic rollups? Will people need to come up with a communication method between ZK and Optimistic? Will there be a market that acts as a portal between a ZK based rollup and an optimistic rollup? Cashing out to Layer 1 doesn’t seem to be an option when it comes to composability because one of the main points of composability is to be efficient.</p><p>From what I see, this seems to be the holy grail for everyone working on the scaling solutions. They are trying to address this problem in one way or another. For example StarkNet’s approach is to build rollups that multiple apps can share, and allowing the global network of these rollups to be operated in a decentralized manner. On the other hand, zkSync — through zkPorter — has a policy where any transaction that modifies accounts in at least two different shards must be executed in zkRollup mode.</p><p>But I fear all this effort may still take us to a fragmented future where there are multiple parallel approaches unable to talk to one another. But I won’t know until I learn further about them and try them out!</p><p>So many questions. If anyone can answer these, please enlighten me :)</p><h3>Conclusion</h3><p>Personally my favorite approaches are the ones based on ZK Proofs (ZK rollup and Validium) because they can settle almost immediately (around 5 minutes they say on average) and there’s no room for fraud thanks to its absolute “math based” security model. There’s a tradeoff between ZK Rollup and Validium as discussed above (ZK Rollup uses much more onchain space than Validium because it has to store all transactions on chain while Validium only stores the proof and that’s it, which is why ZK Rollup is censorship resistant, but on the other hand Validium is more performant and very efficient)</p><p>Optimistic rollups, for NFTs, don’t currently have a viable solution for the 1 week waiting period before withdrawing, so I think people will want to adopt ZK based rollups for NFTs, at least in the short term. That said, as I discussed above, Uniswap is adopting optimistic rollup for their V3, and Uniswap V3 is now a <a href="https://uniswap.org/blog/uniswap-v3/#non-fungible-liquidity">non fungible system</a> instead of fungible, so maybe there’s a room for someone to solve the liquidity problem (having to wait a week before being able to exit the optimistic rollup) taking advantage of Uniswap itself.</p><p>Also, I can see how the Plasma based approaches like Polygon may evolve in its own direction and provide useful services, not to mention that NFT marketplaces are starting to already adopt them.</p><p>That said, there really is no conclusion yet, since I’ve just started learning all this and I am not yet experienced enough to draw any conclusions. And that’s the whole point why I wrote this article, hoping that I would learn more through further discussion and feedback.</p><p>So please feel free to correct me or provide feedback. You can find me on Twitter:</p><p><a href="https://twitter.com/skogard">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10e04a62f3c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>