<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Diamond Heist</title>
        <link>https://paragraph.com/@diamondheist</link>
        <description>Diamond Heist is a play to earn game where llamas and dogs fight over $DIAMOND on Mt. Dianara.</description>
        <lastBuildDate>Mon, 01 Jun 2026 23:48:23 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>Diamond Heist</title>
            <url>https://storage.googleapis.com/papyrus_images/0eb9d82d0acf3b23612fd0822d71dbc2edf47fe7a54af928396006a18da05c33.jpg</url>
            <link>https://paragraph.com/@diamondheist</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[Secure Randomness]]></title>
            <link>https://paragraph.com/@diamondheist/secure-randomness</link>
            <guid>JOSKaEsmhVcUvunhbhVD</guid>
            <pubDate>Mon, 02 May 2022 16:28:36 GMT</pubDate>
            <description><![CDATA[Hey llamigos, We have been informed by a security researcher that our contract was vulnerable to an exploit allowed potential cheaters to mint dogs at an increased rate. We paused the mint and have worked around the clock to provide a solution so we can continue the game. We have now reopened the contract. In short:DiamondHeist Contract has been upgraded to improve randomness and prevent cheatingNo cases have been found where users cheated and all funds are safeWe adapted the mint process fro...]]></description>
            <content:encoded><![CDATA[<p>Hey llamigos,</p><p>We have been informed by a security researcher that our contract was vulnerable to an exploit allowed potential cheaters to mint dogs at an increased rate. We paused the mint and have worked around the clock to provide a solution so we can continue the game. We have now reopened the contract.</p><p><strong>In short:</strong></p><ul><li><p>DiamondHeist Contract has been upgraded to improve randomness and prevent cheating</p></li><li><p>No cases have been found where users cheated and all funds are safe</p></li><li><p>We adapted the mint process from 1 transaction to 2 transactions: mint and reveal.</p></li></ul><h1 id="h-the-report" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The report</h1><p>The security researcher pinged us on Saturday to let us know that we are vulnerable to an exploit that was seen in similar versions of our game, where we use a simple randomness function that is vulnerable to flashbots. An exploiter can create a contract where they predict the block timestamp and the rarity of our collection to mint only dogs.</p><p>From the security expert:</p><blockquote><p>Here&apos;s a replication of what an attacker would do.</p></blockquote><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7bd408204914a67be2a2ab3d2e0a6e0c3bb3acf80fc70f3006e338e8e504d8d6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><blockquote><p>Basically taking in an address, simulating the exact seed your diamondheist contract would produce on a hypothetical mint, and parsing out the result of that hypothetical mint using the seed.</p><p>An attacker would then create a script that would create a flashbots bundle that looks something like this</p><p><code>[</code> <code>Call roll_alpha(address) passing a randomly created address,</code> <code>Send ETH to randomly created address,</code> <code>mint() from randomly created address</code> <code>]</code></p><p>If the first function reverts (meaning you have not minted a rank 8 dog) the entire bundle reverts &amp; no gas is paid</p><p>If the first function goes through (meaning rank 8 dog would be hypothetically minted from given address) the 2nd and 3rd tx&apos;s in the bundle will successfully mint said rank 8 dog.</p><p>This can be attempted thousands of times on thousands of different addresses each block to guarantee a probabilistic hit each attempt.</p><p>There are a few different methods of countering this, all following this same idea: Generate randomness off-chain, rather than on chain &amp; fully assure that randomness is not seen by any potential attackers before arriving on chain.</p><p>I recommend a commit/reveal system like WND had setup. However, when sending seeds from an admin wallet to the contract, flashbots MUST be used to prevent any attackers from frontrunning your randomness.</p><p>If you want to be very UX friendly, but spend a lot of gas. You can send a seed to the contract immediately after every mint, and have that seed assigned to a unique mint commit ID.</p><p>If you want to be less UX friendly, but save on gas. You can have timed interval batches that will collect pending mint commits waiting to be revealed.</p><p>Every inteveral (eg. 30 mins) you will send a seed to the contract along with: a batch identifier, and the length of the batch. This will prevent anyone from frontrunning into the batch after the seed has been generated.</p></blockquote><p>We quickly paused the mint as soon as we were aware of the issue. The next step was to reproduce the attack ourselves. We deployed our contracts on Goerli testnet and we created a flashbots bundle ourselves. After some time we were able to mint 3 dogs in a row! So the exploit was valid.</p><p>We checked the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://diamondheist.game/leaderboard">Leaderboard</a> to see if some users had a disproportionate amount of dog mints. We noted that it seems that this exploit has not been used before.</p><p>We quickly discussed some other ideas and possibilities that were possible, such as minting for the users themselves, but this would cost us all the gas fees which would cost us a few million $ in transaction fees if all our collections mint out and would not be immediately appreciated.</p><p>Sending batches of seeds every 30 minutes was good, but our mint is slow at the moment and we were still vulnerable if a block was uncled and the hackers had some time to mint.</p><p>Another option, was to sign two transactions and submit it to our server, to sandwich attack a seed transaction, but most users are reluctant to sign things and would prefer to execute a transaction directly;</p><h1 id="h-the-solution" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The solution</h1><p>Finally, we decided to use a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://tenderly.co/web3-actions/">Tenderly Web3 Action</a> to submit a seed transaction after every mint, so we don’t have to manage server infrastructure ourselves and this could be done automatically after a mint event has happened.</p><p>This would mean we have to split up our mint transaction into two separate transactions.</p><ol><li><p>User commits to a mint and pays</p></li><li><p>Server picks it up and sends a seed transactions</p></li><li><p>User receives a notice that the seed is ready and sends a reveal transaction</p></li></ol><p>It looks like the Loom below:</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.loom.com/share/b5301d0a822a476cae5f32a4953cbf19">https://www.loom.com/share/b5301d0a822a476cae5f32a4953cbf19</a></p><p>We tested for an entire day on Goerli until we had the entire user experience on point. To make sure the web3 actions work well. That the gas was fully optimized (we rewrote everything a few times) and had unit tests to trim down the gas and code to the best version possible.</p><p>Together with the security expert, we were able to confirm that everything now is fixed and we deployed the new contract as an upgrade. No costly user migration necessary and we can proceed as before!</p><h1 id="h-the-path-ahead" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The path ahead</h1><p>We want to give a big thank you to the researcher for responsibly disclosing the issue to us and working with us to find a solution. We have implemented their suggested solution and have also implemented additional measures to further improve the security of our game.</p><p>We think this case show our incredible talent as a team to fix an exploit of this size and our long-term vision to make this a project that will make a big impact in the space.</p><p>We thank you for your support and trust.</p><p>Jim, Meows and Jordan.</p><h1 id="h-more-reading" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">More reading</h1><p>For those unfamiliar, here are the threads with a deeper exploration of the topic for those games and how they resolved it:</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://muellerberndt.medium.com/building-a-secure-nft-gaming-experience-a-herdsmans-diary-1-91aab11139dc">https://muellerberndt.medium.com/building-a-secure-nft-gaming-experience-a-herdsmans-diary-1-91aab11139dc</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/wndgame/status/1468492094041821185">https://twitter.com/wndgame/status/1468492094041821185</a></p></li></ul><p>In particular, we were familiar with some of the issues involved in those games and we made big improvements to think ahead for a situation like now:</p><ul><li><p>We used merkletrees for whitelist, for WND it cost them 25 ETH in gas: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/wndgame/status/1468492098429022209">https://twitter.com/wndgame/status/1468492098429022209</a></p></li><li><p>We fixed the reentrancy issues beforehand in staking.</p></li><li><p>We made sure our contracts are upgradeable, with users not having to migrate to another collection. Massive lifesaver here!</p></li></ul>]]></content:encoded>
            <author>diamondheist@newsletter.paragraph.com (Diamond Heist)</author>
        </item>
        <item>
            <title><![CDATA[[DD-1] GEN-1 = 2000 DIAMOND - 16.8k supply]]></title>
            <link>https://paragraph.com/@diamondheist/dd-1-gen-1-2000-diamond-16-8k-supply</link>
            <guid>G0ybOvscWEGxCXjgzwzG</guid>
            <pubDate>Tue, 19 Apr 2022 15:59:02 GMT</pubDate>
            <description><![CDATA[Hey Llamigos, Welcome to the first proposal for Diamond Heist. We&apos;re delighted to welcome you to our game and thank you for your trust and commitment in our project. Thank you for taking the time to read this proposal and decide the future of Diamond Heist together.TL;DRMore long-term, better floor price, better DIAMOND price.GEN-1: Mint price from 200 DIAMOND to 2000 DIAMONDGEN-2: Mint price from 300 DIAMOND to 5000 DIAMONDMint available with DIAMOND: 30k to 9.3k NFTsTotal supply: 37.5k...]]></description>
            <content:encoded><![CDATA[<p>Hey Llamigos,</p><p>Welcome to the first proposal for Diamond Heist. We&apos;re delighted to welcome you to our game and thank you for your trust and commitment in our project. Thank you for taking the time to read this proposal and decide the future of Diamond Heist together.</p><h1 id="h-tldr" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">TL;DR</h1><p><strong>More long-term, better floor price, better DIAMOND price.</strong></p><ul><li><p>GEN-1: Mint price from 200 DIAMOND to <strong>2000 DIAMOND</strong></p></li><li><p>GEN-2: Mint price from 300 DIAMOND to <strong>5000 DIAMOND</strong></p></li><li><p>Mint available with DIAMOND: 30k to <strong>9.3k NFTs</strong></p></li><li><p>Total supply: 37.5k to <strong>16.8k NFTs</strong></p></li><li><p>Diamond supply after GEN-1+ minted: From 13.5M to <strong>0 DIAMOND</strong></p></li></ul><h1 id="h-the-current-situation" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The current situation</h1><p>At the current moment, we have not fully minted out our GEN-0 yet. But the staking pool is already open and the herd is out seeking DIAMOND. Early investors have managed to capture a good part of the rewards and the earlier you&apos;ve been a part of the game the more DIAMOND you have.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/52a4f59d9478b79c96c09da061de35f584c3ff44000126bdbcc68a960a6a201c.png" alt="There is 24M DIAMOND in the staking pool." blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">There is 24M DIAMOND in the staking pool.</figcaption></figure><p>Our staking pool has a limit of <strong>24M DIAMOND</strong>. Currently 600k DIAMOND has been collected which at the price of 200 DIAMOND is good for 3,000 GEN-1 mints! By the time GEN-0 (ETH) is fully minted out, the amount of DIAMOND already collected will mean GEN-1 will mint out almost immediately.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7d170b724efc0bbb590b525ea64e1a64e13bb514b68024d128111872b845a6af.png" alt="Old: Minting gradually" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Old: Minting gradually</figcaption></figure><p>This will cause a supply inflation of NFTs of 7500 GEN-1, a lot of these will be staked again and every day (15k x 80% x 100 DIAMOND) 1.2M DIAMOND will be collected.</p><p>We imagine the floor price will crash as some investors decide to sell their new NFTs, and more and more supply is inflated as the future GENs unlock as the future GENS unlock. The game will be over in a few weeks with a supply of 37.5K NFTs.</p><p>Then the DIAMOND price will lower as we will remain with 13.5M DIAMOND supply that can&apos;t mint new NFTs, but can be used for other utility (more on that later).</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/28a764f6ee73343742f6015e3969433a46da55028dd6552d9c4e83853cd079ef.png" alt="Old: We would mint 30k NFTs at 10.5M DIAMOND cost leaving 13.5M DIAMOND left over" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Old: We would mint 30k NFTs at 10.5M DIAMOND cost leaving 13.5M DIAMOND left over</figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/22f1e51e77b00f7c85dcc933c932dae914909eedd91b5a06189d849532129859.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h1 id="h-proposed-solution" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Proposed solution</h1><p>As we can not change the rate of DIAMOND earned (100 per day per llama) and we can not change the total DIAMOND in the staking pool (24M DIAMOND), the best option to change this is to increase the price of the GEN-1 mint (after GEN-0).</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2e46b8f06865ba59cd9870b8fa3fa11e4834f5ed84eb2e669a7c242314b1dc1e.png" alt="New: 7.5k GEN-1 at 15M DIAMOND" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">New: 7.5k GEN-1 at 15M DIAMOND</figcaption></figure><p>This will leave us with 9M DIAMOND left after GEN-1 has been minted out. These DIAMOND can then be used for a GEN-2 mint which will cost 5000 DIAMOND to obtain. DIAMOND can then also be used and burned for other utility, such as the DIAMOND shop, as well as swapping for ETH, or similar ideas.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b59c4c4487543cbd5277f3c37141e94f39609b141498de58a2f367c1512b1daa.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Later GEN-3 or GEN-4 will be postponed per the proposal, but can be minted in the future when we introduce a new staking pool, or other way to generate DIAMOND beyond the 24M limit.</p><p>We think this solution will extend the game to be more long-term, reduce whale-power so that they can&apos;t mint out the whole supply quickly. We will have less supply of DIAMOND and NFTs which will cause floor price to increase. At the end of GEN-1 mint we will be able to have some time to create more value and build out the ecosystem before we continue minting more.</p><p>We think this is important for the future and the sustainability of the game and will benefit every holder. Choose wisely.</p><p>Thank you,</p><p>The Masterminds,</p><p>Jim, Meows and Jordan</p><h1 id="h-vote" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Vote</h1><p>Vote in our Discord in the #proposals channel.</p><ul><li><p>✅ For these changes</p></li><li><p>❌ Against these changes</p></li></ul><p><em>We will have a real voting system in place depending on how much $DIAMOND and NFTs you hold. But it’s difficult to make this as we have staked NFTs and we have unclaimed DIAMOND. Seeing as this proposal is very urgent, we decided it is better to vote right now as quickly as possible.</em></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/07c43cf66dbe1c5c888e304c431ae7c16c36a9e2da6d2c14dc80a33ea2cb2fd1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/diamondheist">https://discord.gg/diamondheist</a></p>]]></content:encoded>
            <author>diamondheist@newsletter.paragraph.com (Diamond Heist)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/a73a771b3f81cac4d9ce3ff40ed5d15739fc3878281fe1cad083b3706800f62d.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>