<?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 Apex777.eth on Medium]]></title>
        <description><![CDATA[Stories by Apex777.eth on Medium]]></description>
        <link>https://medium.com/@apexethdev?source=rss-ab2654e80a42------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hP7HbY037dGwcaokyiwavA@2x.jpeg</url>
            <title>Stories by Apex777.eth on Medium</title>
            <link>https://medium.com/@apexethdev?source=rss-ab2654e80a42------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 02:09:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@apexethdev/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[$RAWR — What even is an ERC404?]]></title>
            <link>https://medium.com/@apexethdev/rawr-what-even-is-an-erc404-cb7da5db9a01?source=rss-ab2654e80a42------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb7da5db9a01</guid>
            <dc:creator><![CDATA[Apex777.eth]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 21:31:49 GMT</pubDate>
            <atom:updated>2024-02-17T21:48:15.822Z</atom:updated>
            <content:encoded><![CDATA[<h3>$RAWR — What even is an ERC404?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NQJKoM-9hyaZVt8F" /></figure><p><strong><em>TLDR:<br></em></strong>$RAWR — ERC404 Token launched on Base<br>Total Supply: 5400 Cards (100 Decks of cards — 54 card deck)<br>CA: 0x469FdA1FB46Fcb4BeFc0D8B994B516bD28c87003<br>Dex: <a href="https://dexscreener.com/base/0x3447accd4b8e735329d1065244aad2ed630f0122">Dexscreener</a><br>Uniswap: <a href="https://app.uniswap.org/swap?outputCurrency=0x469FdA1FB46Fcb4BeFc0D8B994B516bD28c87003&amp;chain=base">Buy $RAWR</a><br>Discord: <a href="https://discord.gg/bq695uCm3F">https://discord.gg/bq695uCm3F</a><br>TG: <a href="https://t.me/DinoPoker404">https://t.me/DinoPoker404</a></p><h3>Background</h3><p>Before I begin, let me introduce myself to those who don’t know who I am - I’m <a href="https://twitter.com/apex_ether"><strong>Apex</strong></a> the developer behind the <a href="https://opensea.io/collection/based-onchain-dinos"><strong>Based OnChain Dinos</strong></a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*HgdX4tkLv4j8E08dOI8-yw.png" /></figure><p>Based onChain Dinos launched on Base in January 2024. These cute pixelated dinos have grabbed the attention and hearts of the whole Base community over the last 6 weeks. The collection is not just adorable, but also completely stored onchain.</p><p>This means the metadata and images are completed stored directly on the Base blockchain, no external dependencies, no HTTP, no IPFS - your NFT stores all of this.</p><p>The Dinos have seen massive success in this short time since their launch, here is a quick summary:</p><ul><li>50 ETH of secondary volume on Opensea</li><li>12th largest Base NFT collection by volume</li><li>500+ holders</li><li>Floor price ~20x mint</li></ul><p>I was also honoured with a builders grant from Base for the development work on the OnChain Dinos</p><p>You can find more details about the <strong>Based OnChain Dinos</strong> <a href="https://medium.com/@apexethdev/onchain-dinos-take-over-base-11e209dea8b4">here</a>.</p><h3>Dino Poker</h3><p>I’ve always said Based OnChain Dinos are my playground here on Base and that I would build on top of them with fun features and utilities. With the quick rise of the ERC404 tokens over the last few weeks I wanted to play around with this “new” token standard.</p><p><strong>What is an ERC404?<br></strong>ERC404 is a token standard that combines the features of fungible and non-fungible tokens. Essentially it allows for a traditional NFT (ERC721 token) to be split into many parts.</p><p>This standard allows for the creation of liquidity pools like on Uniswap for instant trading capabilities. This also allows for a ‘rerolling’ mechanic, in which users can repeatedly cycle their tokens by swapping back and forth to trade their tokens for another random NFT.</p><p>This burning and reminting feature instantly reminded me of playing cards (particularly poker), where you would “burn” some cards back to the dealer and get replacements, likewise in ERC404 where you burn your NFT in the LP pool, to get a new random NFT. Similar, right?!</p><h3><strong>Presenting Dino Poker ($RAWR)</strong></h3><p>Leaning on the great art from the Dinos, I’ve created a fully onchain Poker card collection, powered by ERC404 to allow collectors to trade / swap / sell their tokens instantly for another card in the LP pool.</p><p><strong>Available Cards<br></strong>100 decks of<strong> </strong>54 standard playing card deck (including 2 jokers) giving us a total of 5,400 cards / NFTs in circulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NQJKoM-9hyaZVt8F" /></figure><p><strong>4 Colour Deck</strong><br>Hearts = Red<br>Diamonds = Blue<br>Spades = Black<br>Clubs = Green</p><p><strong>Deck Number</strong><br>As mentioned, we have 100 decks of cards, these are differentiated by the colour of the Dinos eyes and belly.</p><p><strong>Dino Traits<br></strong>Face cards have some additional Dino traits to make them extra special!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*gFPvJ6iQz9cZqudOcWHRkg.gif" /></figure><p><strong>Dino Poker ($RAWR) Launch Details<br></strong>Total Supply: 5,400<br>Initial LP: 1.75 ETH / 4,320 NFTs<br>DEX: Uniswap</p><p>Launched on 13th of February, the token saw $1 million dollars of volume in the first 24 hours. Unfortunately the launch was bot heavy, but the distribution and price has recovered from this.</p><p><strong>LP Details<br></strong>4 ETH of LP has been burnt forever, the remaining LP has been timelocked via smart contract. LP fees can be collected.</p><h3>Roadmap / Future Development</h3><p>After the success of this fun poker addition to the Dinos, I will be building a Poker Game dApp over the coming weeks. More details about this will be posted in an upcoming medium article, but you can expect at least daily games that will have prizes in LP fees for matching certain cards. Exciting days ahead!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb7da5db9a01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OnChain Dinos — A Deep Dive]]></title>
            <link>https://medium.com/@apexethdev/onchain-dinos-take-over-base-11e209dea8b4?source=rss-ab2654e80a42------2</link>
            <guid isPermaLink="false">https://medium.com/p/11e209dea8b4</guid>
            <dc:creator><![CDATA[Apex777.eth]]></dc:creator>
            <pubDate>Wed, 10 Jan 2024 23:19:33 GMT</pubDate>
            <atom:updated>2024-01-15T12:16:14.416Z</atom:updated>
            <content:encoded><![CDATA[<p>You are probably wondering where all these cute little Dinos all over your base timeline have come from, in this article I’ll go over our launch and a deeper dive into how the Dinos are stored onchain.</p><p>Hi, I’m <a href="https://twitter.com/apex_ether"><strong>Apex</strong></a> the developer behind the <a href="https://opensea.io/collection/based-onchain-dinos"><strong>Based OnChain Dinos</strong></a><strong> 👋</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*94m3_6PJRyzDO3bJihTBFQ.png" /></figure><h3>Collection Overview</h3><blockquote>Based OnChain Dinos is a collection of 2,000 NFTs, each randomly generated and distinctly determined at the time of minting. These Dinos are stored entirely onchain, including images and metadata.</blockquote><p><strong>Name:</strong> Based OnChain Dinos<br><strong>Chain:</strong> Base<br><strong>Supply:</strong> 2,000<br><strong>Price:</strong> 0.0025 ETH</p><p><strong>Links:</strong><br>Opensea: <a href="https://opensea.io/collection/based-onchain-dinos">https://opensea.io/collection/based-onchain-dinos</a><br>Contract: 0xD4c5292b9689238f0A51C8505B1d1D6714Ce95a0<br>Discord: <a href="https://discord.gg/J47bWRPuYs">https://discord.gg/J47bWRPuYs</a><br>Twitter: <a href="https://twitter.com/OnChainDinos">https://twitter.com/OnChainDinos</a></p><p><em>Thank you to Tiny Dinos for the amazing cc0 art!</em></p><h3>How Did the Mint Go?</h3><p><strong>Based Onchain Dinos</strong> launched on the 8th of January on the Base network and sold out in less than 6 hours.</p><p>2,000 Dinos found new homes, with 81 of these going to free mint whitelist holders. At the time of writing there is 449 unique holders.</p><h3>Apex777.eth 📡 on Twitter: &quot;Mint details are live for @OnChainDinoshttps://t.co/s1c2bVh3KXTLDR:Mint Date: Monday 8th Jan -12pm UTCSupply: 2,000Free WL Mints: 500Max mint per tx: 20Max Mint per Wallet: 100Price: 0.0025 ETH#OnChainRawr ⛓️🦖 pic.twitter.com/z0FDqKa4V8 / Twitter&quot;</h3><p>Mint details are live for @OnChainDinoshttps://t.co/s1c2bVh3KXTLDR:Mint Date: Monday 8th Jan -12pm UTCSupply: 2,000Free WL Mints: 500Max mint per tx: 20Max Mint per Wallet: 100Price: 0.0025 ETH#OnChainRawr ⛓️🦖 pic.twitter.com/z0FDqKa4V8</p><p>We got featured on in <strong>ONCHAIN DAILY </strong>on the official Base Twitter account</p><h3>Base 🛡️ on Twitter: &quot;🔵 𝗢𝗡𝗖𝗛𝗔𝗜𝗡 𝗗𝗔𝗜𝗟𝗬 🔵@OnChainDinos is a collection of pixelated dinos now minting on BaseHatched from the CC0 Tiny Dinos project and brought fully onchainhttps://t.co/dlZ1SGCKCg pic.twitter.com/ApgTZkMVFr / Twitter&quot;</h3><p>🔵 𝗢𝗡𝗖𝗛𝗔𝗜𝗡 𝗗𝗔𝗜𝗟𝗬 🔵@OnChainDinos is a collection of pixelated dinos now minting on BaseHatched from the CC0 Tiny Dinos project and brought fully onchainhttps://t.co/dlZ1SGCKCg pic.twitter.com/ApgTZkMVFr</p><h3>Secondary Sales</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cHpxh0wAaqd_r6urlvH8wA.png" /></figure><p>Once sold out, volume quickly moved to the secondary market via <a href="https://opensea.io/collection/based-onchain-dinos">Opensea</a> over the last 7 days Based OnChain Dinos has see over 21 ETH of volume trending on the Base chain daily and trending on the front page of Opensea under “all Chains”</p><p><strong>Opensea:</strong><a href="https://opensea.io/collection/based-onchain-dinos"><br>https://opensea.io/collection/based-onchain-dinos</a></p><h3>OnChain Mechanics</h3><p>Now onto the fun stuff, as mentioned in our <a href="https://medium.com/@apexethdev/introducing-based-onchain-dinos-e0f709b89f44">previous article</a> all 2,000 NFT’s have been stored on the blockchain completely, they do not rely on any external HTTP / IPFS dependencies to get your Dinos image or metadata values.</p><p>I went through this briefly in a Spaces on how the Onchain images and metadata works, have a listen here but it’s hard to show how code works over a voice call. Hopefully I can provide some more details here.</p><h3>Based Fellas 🛡️ on Twitter: &quot;https://t.co/vC0JNB0UNz / Twitter&quot;</h3><p>https://t.co/vC0JNB0UNz</p><blockquote>OnChain stores NFT metadata directly on the blockchain, ensuring security and immutability. OffChain relies on external platforms, offering flexibility but sacrificing decentralization.</blockquote><p>Off Chain metadata usually relies on a HTTP or IPFS hosting the actual json files and images for a collection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*3Bsm6yUJ989P0_jp5_4mQg.png" /><figcaption>OffChain Tiny Dinos Example</figcaption></figure><p>In Onchain metadata we build the metadata for each Dino using solidity code, keeping all of the NFT’s details completely on the blockchain.</p><p>This also applies to each Dinos image. We store every trait a Dino can have in byte arrays that represent an svg image of that trait and build the dino in code. We’ll dive deeper into this in the next part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ajjrfSZoXLWNrFFJxYjJw.png" /><figcaption>Image Onchain example</figcaption></figure><p><strong>PNG to SVG to OnChain</strong></p><p>Before we touch any solidity code, we needed to get every Dino trait converted to SVG. We need SVG, as this is an standard that uses code to create and show an image. We took 71 different Dino pngs and converted them to SVG.</p><p>Luckily, the Tiny Dinos have made all trait assets of Dinos available for anyone to download and mess with, this is the beauty of cc0 art. Here is what that looks like, we have 8 folders each filled with different elements of a Dino.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*XhAIW_GzLJJoMNRc4lnWsw.png" /><figcaption>Body</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*WPqmEVZOeDHEihPs0r1lsQ.png" /><figcaption>Head</figcaption></figure><p>Using some nodejs scripts along with some manual tweaks we get an svg file made entirely of “rect” elements that recreate the trait of a dino. Here is an example of the yellow gradient body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*gPtEmQAVv_CCBp7A.png" /><figcaption>SVG of a Dino Body</figcaption></figure><p>Let’s look at one<strong> rect element</strong> a little closer:</p><pre><br>&lt;rect x=”6&quot; y=”5&quot; width=”1&quot; height=”1&quot; fill=”rgb(215,210,170)” /&gt;</pre><p>What we have here is an <strong>“x”</strong> and <strong>“y”</strong> coordinate, this tells use where the square goes in the 16x16 view box along with <strong>“height”</strong> and <strong>“width”</strong>, this tells use how big that square should be. Finally we say what color this square should be using <strong>“rgb”</strong>.</p><p>so now we have a pattern we can follow. We can condense this down to the following for the entire yellow gradient body asset.</p><pre>6,5,215,210,170,7,5,215,210,170,8,5,215,210,170,9,5,215,210,170,6,6,218,209,145,7,6,218,209,145,8,6,218,209,145,9,6,218,209,145,10,6,218,209,145,6,7,218,207,126,7,7,218,207,126,8,7,218,207,126,9,7,218,207,126,10,7,217,207,126,6,8,222,209,111,7,8,222,209,111,8,8,221,209,112,4,9,223,209,90,6,9,224,208,90,7,9,224,208,90,8,9,224,209,90,9,9,223,209,90,5,10,222,204,71,6,10,222,204,71,7,10,222,204,71,8,10,221,204,72,6,11,225,205,44,8,11,225,205,44</pre><p>Unfortunately, storing strings on solidity of this size is not an option even with the cheap fees of Base. So we need to convert this String to hex bytes that we can store easier.</p><p>Here is the same string, stored as a hex:</p><pre>0x0605d7d2aa0705d7d2aa0805d7d2aa0905d7d2aa0606dad1910706dad1910806dad1910906dad1910a06dad1910607dacf7e0707dacf7e0807dacf7e0907dacf7e0a07d9cf7e0608ded16f0708ded16f0808ddd1700409dfd15a0609e0d05a0709e0d05a0809e0d15a0909dfd15a050adecc47060adecc47070adecc47080addcc48060be1cd2c080be1cd2c</pre><p>We repeat this for every trait, in every category and we store these elements as a byte arrays in our Dino smart contract. Here is the feet structure below, we’ll use this as it’s just 4 elements. Normal, Hoverboard, Rocket boots and skateboard.</p><pre>//// SVG data of attribute<br>        bytes[] internal feet_data = [<br>                bytes(hex&#39;&#39;),<br>                bytes(hex&#39;0009dddddd000adddddd010adddddd000bdddddd020bdddddd000cdddddd010cdddddd020cdddddd030cdddddd010ddddddd030ddddddd050dc566bf060dc566bf070dc566bf080dc566c0&#39;),<br>                bytes(hex&#39;0108dededd0109dededd0209dedede020adededd030adedede010bdededd030bdededd040bdedede020cdededd040cdededd050cdedede060c181817070cdedede080c181817&#39;),<br>                bytes(hex&#39;040b7b4c390a0b7b4c39050c7a4b38060c7a4a38070c7a4a38080c7a4b38090c7a4b38060db9b0ac080db9b0ac&#39;)<br>        ];<br><br>/// Name of Attribute<br> string[] internal feet_traits = [<br>        &#39;normal&#39;, <br>        &#39;hoverboard&#39;, <br>        &#39;rocket boots&#39;, <br>        &#39;skateboard&#39;<br> ];<br><br>/// Probability array<br> uint[] internal  feet_probability = [76, 84, 92, 100];</pre><p>If we pass in an array element number to feet_data and feet_traits we would get back the hexcode for the svg and the name of the trait.</p><p>Use can use our public method <a href="https://basescan.org/address/0xd4c5292b9689238f0a51c8505b1d1d6714ce95a0#readContract#F3">here</a> to pass a token ID and get back your svg code for a dino.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*iAOWsdMsqdNxlV0Iq4a7gQ.png" /><figcaption>svg build method in smart contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_-KVg22a0TsbgCOJG-mcQ.png" /><figcaption>SVG Call</figcaption></figure><p>pasting this code into <a href="https://www.svgviewer.dev/">https://www.svgviewer.dev/</a> will show your dino in all their glory, try it out <a href="https://www.svgviewer.dev/s/VmLm4tXq">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tU1ay9EJ_AbmHpWiH_3lZg.png" /><figcaption>Dino SVG</figcaption></figure><p><strong>Saving Traits against a TokenID<br></strong>Ok, but how do we know what tokenID gets what Dino traits? Well lets dig into that here in this section.</p><p>Each Dinos traits is stored in the following structure in our smart contract:</p><pre>/// Dino Trait Struct<br>    struct TraitStruct {<br>        uint body;<br>        uint chest;<br>        uint eye;<br>        uint face;<br>        uint feet;<br>        uint head;<br>        uint spike;<br>    }</pre><p>the number against each element represents what place in the trait data array the trait is stored, so for example my Dino, TokenID number 1 has the following properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*hAIp0kkTlxoBTjfKR38a2w.png" /><figcaption>TokenID 1</figcaption></figure><p>My Dino, has 11 against body, this means they have a rainbow body, as this is the 11th element in the array. This applies for the rest of the objects in this structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*LTCPjLn22JmChpoOT80tiw.png" /><figcaption>Body Arrays</figcaption></figure><p><strong>Randomly Assigning traits during minting<br></strong>So, we now have all the assets onChain, we have the ability to store these assets against each NFT tokenID. The next step is to determine who gets what traits and how rare each trait is.</p><p>You may have noticed this array in a previous code snippet:</p><pre>/// Probability feet array<br> uint[] internal  feet_probability = [76, 84, 92, 100];</pre><p>This is what we call a cumulative weighting system. It allows use to make certain traits rarer than others, or less or more likely to come out when a Dino is minted. Let’s look at the feet example above in more details.</p><p>We have 4 traits:</p><ul><li>Normal</li><li>Hoverboard</li><li>Rocket Boots</li><li>Skateboard</li></ul><p>We don’t want 25% of every token to have rocket boots, we’d prefer to have this be a rarer and more unique trait. To do this we assign a value for each trait in “feet_probability” with the values above, this is the probability of a token getting that trait:</p><ul><li>“normal” has a 76% chance (1–76).</li><li>“hoverboard” has an 8% chance (77–83).</li><li>“rocket boots” has an 8% chance (84–91).</li><li>“skateboard” has a 8% chance (92–100).</li></ul><p>Our solidity code will get a random number between 1 and 100 and the trait whose cumulative probability range includes this number is selected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*RXYi_rWw54D5CDlJ_XJuRA.png" /><figcaption>Pick trait by Probability</figcaption></figure><p>For example, if the random number is 81, the selected feet trait would be &quot;hoverboard&quot; because 81 falls in the range 76-83. This system allows for the random but controlled selection of traits.</p><p>This system is applied to all trait categories is what gave us some pretty cool and rare Dinos. If you jump into our Discord you’ll see a full list of what probabilities each trait had.</p><p><strong>Pseudo-randomness OnChain</strong></p><p>To get all 8 different Dino trait categories randomly, we need 8 uniquely different random numbers to pass into each trait array. This number must be between 1 and 100 to help pick a trait using the weighted trait system in our smart contract.</p><pre>// Initial seed<br>_randomSeeds[0] = uint256(keccak256(abi.encodePacked(_lastBlockHash, _tokenId))) % 101;<br><br>// Generate subsequent seeds<br>for (uint i = 1; i &lt; 7; i++) {<br>    _randomSeeds[i] = uint256(keccak256(abi.encodePacked(_randomSeeds[i - 1], _tokenId))) % 101;<br>}</pre><p>This is done in the code above using the keccak256 solidity function, it basically turns whatever variables you pass in, into a number. A very large number.</p><p>The contract generates one random seed using the hash of the last minters blockhash and the token’s ID.</p><p>We then use this seed, to generate 7 more seeds.</p><p>All 8 seeds are then applied against “modulo 101” to get use a number between 1 and 100.</p><p><strong>OnChain Summary</strong></p><p>We have kind of gone backwards here in explaining how the process works, but lets summarize here quickly:</p><ul><li>During minting, we get 8 random numbers between 1–100</li><li>Each of these random numbers is used to pick a trait from our 8 different trait categories.</li><li>This trait info is saved in a mapping against the tokenID for this specific Dino.</li><li>Using the trait mapping we can build each Dinos metadata, including images. This method keeps all dependencies internal on the Base blockchain and immutable.</li></ul><h3>Summary</h3><p>If you enjoyed this deep dive into Solidity and onchain NFT’s please share the article, if you have any questions drop into our Discord or DM me on Twitter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11e209dea8b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Based OnChain Dinos]]></title>
            <link>https://medium.com/@apexethdev/introducing-based-onchain-dinos-e0f709b89f44?source=rss-ab2654e80a42------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0f709b89f44</guid>
            <dc:creator><![CDATA[Apex777.eth]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 10:27:21 GMT</pubDate>
            <atom:updated>2024-01-12T13:15:37.864Z</atom:updated>
            <content:encoded><![CDATA[<h3>Based OnChain Dinos</h3><p>This article gives details on the “<strong>Based OnChain Dinos</strong>” collection, which mints on Base January 8th 2023.</p><p>Firstly to introduce myself — Hi I’m <a href="https://twitter.com/apex_ether">Apex</a>, an Ethereum Dev building on Base, the L2 network incubated by Coinbase 👋</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uYzWxTEXbqsOUNeujo125g.gif" /></figure><p><strong>TLDR:</strong></p><p><strong>Name:</strong> Based OnChain Dinos<br><strong>Chain:</strong> Base<br><strong>Mint Date:</strong> 08.01.2023–12pm UTC<br><strong>Supply:</strong> 2,000<br><strong>Free WL Mints:</strong> 500<br><strong>Max mint per tx:</strong> 20<br><strong>Price:</strong> 0.0025 ETH</p><p><strong>Links:</strong><br>Opensea: <a href="https://opensea.io/collection/based-onchain-dinos">https://opensea.io/collection/based-onchain-dinos</a><br>Contract: 0xD4c5292b9689238f0A51C8505B1d1D6714Ce95a0<br>Discord: <a href="https://discord.gg/J47bWRPuYs">https://discord.gg/J47bWRPuYs</a><br>Twitter: <a href="https://twitter.com/OnChainDinos">https://twitter.com/OnChainDinos</a></p><h3>What are the Based OnChain Dinos?</h3><p><strong>Based OnChain Dinos</strong> is a derivative collection of <strong>Tiny Dinos</strong> on Ethereum.</p><p><strong>Tiny Dinos</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*aDHFBTxuadB84M7Ah1B1bg@2x.jpeg" /></figure><p>Tiny Dinos is a 10,000 NFT omnichain collection that minted out in 2022.</p><p>The amazing art of the Tiny Dinos collection is CC0, which means the art is free to be used by anyone and in anyway a user sees fit.</p><p><strong>Based OnChain Dinos</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*tdIkMtiB3RqQbhkH__jVDQ@2x.jpeg" /></figure><p>As mentioned, <strong>Based OnChain Dinos</strong> is a derivative collection with some art changes to complement the Base network.</p><p>However the biggest feature of <strong>Based OnChain Dinos</strong> is that the images and metadata, unlike the original collection, is not stored in an IPFS server but stored completely OnChain, on the Base Blockchain.</p><h3>OnChain Metadata Details</h3><p>As the Tiny Dino trait files are cc0 they have been made available to download in PNG format.</p><p>I have converted all 71 selected PNG files to SVG. SVG files are preferred as these are code underneath. Specifically, we want to recreate the Dino assets with only “rect” svg elements. This gives us a pattern we can follow in our smart contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R54zMbzxdbG_krfqsQQOLg.png" /><figcaption>SVG Example</figcaption></figure><p>These SVG react elements are stored in a predictable pattern in our smart contract in byte arrays. As outlined below, each array element corresponds to the make up of the matching trait name in the string array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*2M28FZv_aLGe52c-cMK5eQ.png" /><figcaption>Byte Array Example</figcaption></figure><p>Using clever solidity logic, we can build our desired Dino using these SVG elements we have stored OnChain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*6cAmzEb7_AEsZNv6kCc78g.png" /><figcaption>Solidity Logic to create SVG image of an OnChain Dino</figcaption></figure><p>This SVG is then passed to Opensea in the correct metadata format JSON stored as a base64 string</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*LGTLw0G-6UQ2f7ifzamrvw.png" /><figcaption>Base64 string</figcaption></figure><h3>Weighted Trait Determination</h3><blockquote>we have 71 traits to choose from unlocking a staggering 5.9 million different Dino combinations</blockquote><p>Each Dinos traits are determined at the exact time of minting. Using pseudorandomness generated OnChain from the previous minters blockhash we pick 8 different attributes for each Dino and stored this against the Dino’s token ID. Once set, these attributes are immutable on the Blockchain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*gc4Fx7x9uNMyPurAGwzUAQ.png" /><figcaption>Each number represents a position in the trait array</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*IaudMa3GDPfVzh8pXzuN0g.png" /><figcaption>Trait selection logic</figcaption></figure><p>I have developed a custom weighting system for trait selection that will make some traits rarer than others. For example, we have a 10% probability of getting a yellow body but just a 2% chance of getting a rainbow body. Ensuring some exclusive traits remain rarer than others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zV5q-M9afL9b15lL" /><figcaption>Body Trait examples</figcaption></figure><p>Even with nearly 6 million traits to choose from, duplicate traits are still a possibility. This is because of the “<a href="https://www.youtube.com/watch?v=Y_shcEgdhI8">Birthday Paradox</a>” — which states that:</p><blockquote>In a room of 23 people, there’s a 50% chance of 2 sharing a birthday</blockquote><p>Because of this, an extremely small number of duplicates is possible, With a supply of 2,000 we have 22% chance of getting at least one. This number becomes slightly higher when we favour certain triats. If your interested you can learn more about the Birthday Paradox <a href="https://www.youtube.com/watch?v=Y_shcEgdhI8">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*CWwO7En0aCEtWsTRC1CvFQ.png" /><figcaption>Dino Eggs</figcaption></figure><p>To ensure each Dino is unique, we have added a new stat trait named “Dino Eggs” that will assign a random of eggs to each Dino between 1–1000.</p><p>What&#39;s the deal with the dino eggs, I hear you ask? All will be revealed in time...</p><p>👀🤫</p><h3>Supply Details</h3><p>Finally onto the most important part of the mint. Supply information and price. I took a long time to figure out a supply number considering all of the above.</p><p><strong>Supply Breakdown</strong><br><strong>Total Supply:</strong> 2,000<br><strong>WL Free Mint:</strong> Up to 500<br><strong>Price:</strong> 0.0025 ETH</p><p>There is a fine balance between giving existing holders benefits and devaluing the paid price for an NFT, a balance I think is achieved in with the above figures.</p><h3>Who is on Whitelist?</h3><p><strong>Punks</strong><br>All holders of my previous project (<strong>Based OnChain Punks</strong>) who have made at least 1 transaction on Base have been included.</p><p><strong>Tiny Dinos (Eth)<br></strong>All holders of a Tiny Dino (Eth) have been whitelisted.</p><p>Obviously there is a large over-allocation here but this has been accounted for, as most of these holders do not currently operate on Base or have not been active for over a year.</p><h3>Final Thoughts</h3><p>Keeping supply limted but with a generous allocation of free mints to existing holders, I believe there is a strong possibility of minting out quickly, passing volume and sales onto the secondary market.</p><p>Thank you for reading and I look forward to seeing all the brilliant Dinos created on January 8th!</p><p>If you enjoyed this article please share it on Twitter with the hashtag <strong>#OnChainRawr ⛓️🦖</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0f709b89f44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>