<?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>VNMRTZ</title>
        <link>https://paragraph.com/@vnmrtz</link>
        <description>EVM Researcher | Smart Contract Auditor &amp; Software Engineer</description>
        <lastBuildDate>Sun, 29 Nov 2026 02:10:28 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>VNMRTZ</title>
            <url>https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/f8b105d8ec68adf0d49e97526e1b2fac2cc23f9397dc2a41f19ed0fb5c8a852a.png</url>
            <link>https://paragraph.com/@vnmrtz</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[When bug-fixes go wrong: RAI debt auctions bug]]></title>
            <link>https://paragraph.com/@vnmrtz/when-bug-fixes-go-wrong-rai-debt-auctions-bug</link>
            <guid>gnetlUizsPH7bruydIMy</guid>
            <pubDate>Thu, 02 Nov 2023 17:16:38 GMT</pubDate>
            <description><![CDATA[“The way to be safe is never to be secure.” -Benjamin Franklin Its common to see projects hacked after an audit. After all, a security review doesn&apos;t guarantee a project is entirely free of bugs; it&apos;s more about enhancing security standards and uncovering as many potential issues as possible within a limited timeframe. But, things turn around when in the process of addressing a seemingly low-severity bug (some might even call it informational), the proposed bug-fixes introduce a hig...]]></description>
            <content:encoded><![CDATA[<p>“The way to be safe is never to be secure.”</p><p><em>-Benjamin Franklin</em></p><p>Its common to see projects hacked after an audit. After all, a security review doesn&apos;t guarantee a project is entirely free of bugs; it&apos;s more about enhancing security standards and uncovering as many potential issues as possible within a limited timeframe.</p><p>But, things turn around when in the process of addressing a seemingly low-severity bug (some might even call it informational), the proposed bug-fixes introduce a higher severity one. This scenario happened after an audit of RAI (the so-called &quot;truly stable&quot; non-pegged stable-coin) conducted by <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="">OpenZeppelin</a>. Fortunately, I stumbled upon this issue during one of my late-night bug-hunting sessions and thanks to Immunefi and the Reflexer team it was quickly addressed and fixed. Get ready to take notes anon, because things are about to get messy.</p><p>Chances are you’ve heard about DAI and MakerDAO, the biggest decentralised stable-coin of the ecosystem. Well RAI is a similar concept (also backed by ETH), but its price is not pegged to the US Dollar. What&apos;s the significance of this, you may wonder?</p><p>The Reflexer team asserts that:</p><p><em>RAI = RAI (In simpler terms, one RAI equals one RAI).</em></p><p>Interesting huh? In essence, RAI can be thought of as a low-volatility version of ETH, grounded in the notion that &quot;<em>the purpose of a stable-coin isn&apos;t to mimic the USD but to provide an asset with minimal price fluctuations.</em>&quot; Essentially, if we aspire to create a truly crypto-native stablecoin, it should have no ties to real-world assets.</p><h3 id="h-write-up" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Write-up</h3><p>Enough with theory, let’s get hands-on.</p><p>The protocol uses the GEB framework which is a modified fork of MakerDAO’s Multi-collateral DAI. And unlike DAI, it is pegged to itself, achieving this through the use of a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://youtu.be/YF0FMdvkxCE?si=h7OozyH1OBghtq0m">PID Controller</a> to dampen its volatility.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/9ba134bb2f6fd98e29194f6c87057aa0a87b183933de8eb3d59579ef71f80340.png" alt="RAI Stability Mechanism" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">RAI Stability Mechanism</figcaption></figure><p>While locking collateral into the protocol, the depositor creates a position called “SAFE” that can mint new RAI. Furthermore, the system requires a minimum collateral ratio of 145%; below this threshold, the borrower’s positions are liquidated through an auction model that relies on third parties, much like MakerDAO.</p><p>When there&apos;s a situation of bad debt, meaning that collateral auctions can&apos;t fully cover the outstanding debt, the system resorts to debt auctions to replenish its capital. During these auctions, protocol tokens are offered for sale in exchange for a fixed amount of system coins. In this process, bidders compete by offering to accept decreasing amounts of protocol tokens for the coins they will end up paying.</p><p>The <code>AccountingEngine</code> serves as the protocol&apos;s central component responsible for initialising both debt and surplus auctions. Debt auctions are consistently initiated with a predefined minimum bid referred to as <code>debtAuctionBidSize</code>. This is done to ensure that the protocol can only auction debt that is not currently undergoing an auction and is not locked within the debt queue.</p><p>This necessity prompts the check on line 317, which verifies that there is an adequate amount of bad debt available to auction:</p><pre data-type="codeBlock" text="require(debtAuctionBidSize &lt;= unqueuedUnauctionedDebt(),&quot;...&quot;);
"><code><span class="hljs-built_in">require</span>(debtAuctionBidSize <span class="hljs-operator">&#x3C;</span><span class="hljs-operator">=</span> unqueuedUnauctionedDebt(),<span class="hljs-string">"..."</span>);
</code></pre><p>The issue arises due to a proposed <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/reflexer-labs/geb/pull/75/files">modification by OpenZeppelin</a>, which involves invoking <code>settleDebt(safeEngine.coinBalance(address(this)))</code> before initiating the auction. The purpose of this change is to ensure that only bad debt is considered for the auction creation, thus preventing front-running problems.</p><p>However, if, after settling the debt, the remaining bad debt amount falls below the threshold defined by <code>debtAuctionBidSize &lt;= unqueuedUnauctionedDebt()</code>, the auction would still be initiated with an incorrect amount of bad debt to cover</p><p>In other words, this invariant does not hold: <code>debtAuctionBidSize &lt;= remainingDebt</code>.</p><p>Since the insufficient debt check is performed prior to the settlement call, the auction proceeds even when there is non-existent debt to be auctioned. This situation leads to the unnecessary dilution of the protocol token (the bidders will buy the debt in exchange of protocol tokens minted to his address).</p><p>In practice this means the system will print FLX, and auction it for RAI to repay bad debt that does not exist.</p><h3 id="h-conclusion" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h3><p>At the time of reporting the bug, the protocol was in a surplus state, making it unlikely for debt auctions to occur. However, in the event of a &quot;Black Thursday&quot; scenario, this issue could have posed a recursive threat to the protocol. Thanks to the fast response of the RAI team and the assistance of the Immunefi platform, we reached an agreement on a bounty and successfully addressed this hidden problem.</p><p>Hope you enjoyed this article, and it piqued your curiosity about bug-hunting and the mechanisms behind decentralised stable-coins.</p><p><code>// See you on the next write-up, anon</code></p><blockquote><br></blockquote>]]></content:encoded>
            <author>vnmrtz@newsletter.paragraph.com (VNMRTZ)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/919ec6492e208cfd16c8e481270144f0323a4f37ece95e0ae611ebbeddfa7039.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[EVM: Degen Bit Masking]]></title>
            <link>https://paragraph.com/@vnmrtz/evm-degen-bit-masking</link>
            <guid>JLNoQcxPW1IasJDp2Uvi</guid>
            <pubDate>Thu, 07 Sep 2023 23:38:28 GMT</pubDate>
            <description><![CDATA[&apos;If you wish to make an apple pie from scratch, you must first invent the universe&apos;. -Carl Sagan Note: This article dives directly into assembly code and explores advanced bit operations. If you&apos;re an experienced developer or researcher, you&apos;re in the right place. However, if you&apos;re not familiar with these topics, I recommend reading the article “Solidity and EVM: Bit Shifting and Masking in Assembly(YUL)“ by 0xweiss first before continuing with this one. This backgro...]]></description>
            <content:encoded><![CDATA[<p>&apos;If you wish to make an apple pie from scratch, you must first invent the universe&apos;.</p><p><em>-Carl Sagan</em></p><p>Note: This article dives directly into assembly code and explores advanced bit operations. If you&apos;re an experienced developer or researcher, you&apos;re in the right place. However, if you&apos;re not familiar with these topics, I recommend reading the article <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/@mweiss.eth/solidity-and-evm-bit-shifting-and-masking-in-assembly-yul-942f4b4ebb6a">“Solidity and EVM: Bit Shifting and Masking in Assembly(YUL)“</a> by 0xweiss first before continuing with this one. This background knowledge will help you fully understand the content presented here!</p><h2 id="h-introduction" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Introduction</h2><p>This article is all about showing how much gas you can save by using Yul to build complex Solidity data structures, instead of sticking with Solidity&apos;s built-in features. Keep in mind that what you&apos;ll see in the following article and code examples are for educational purposes. If you plan to use low-level assembly code in a real-world production environment, it&apos;s crucial to have it thoroughly audited for security, feel free to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/vn_martinez_">reach out</a> for auditing services!</p><p>To keep things practical and hands-on, we will dive straight into real-world examples without getting bogged down in theory. This article will follow a common Solidity use case (creating a new instance of a complex struct and storing it in a mapping), in order to explain the mechanics of bit masking:</p><h2 id="h-use-case" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Use Case</h2><p>The following elements are given to us in order to create an instance of the struct <code>Pool</code> and store it on a mapping:</p><p><strong>A packed optimized Struct type</strong> <code>Pool</code><strong>:</strong></p><pre data-type="codeBlock" text=" struct Pool {
    /// Slot 0
    uint16 poolRatio; // uint16 is enough to store BPS
    uint16 poolFee;
    uint48 poolActivation; //uint48 is enough to cover timestamps
    uint48 poolLastUpdate;
    //uint128 is enough to store up to 340282366920938463463e18 amount
    uint128 poolMaxDebt;
    
    /// Slot 1
    uint128 poolMinDebt;
    uint128 poolGain;

    /// Slot 2
    uint128 poolDebt;
    uint128 poolLoss; 
 }
"><code> <span class="hljs-keyword">struct</span> <span class="hljs-title">Pool</span> {
    <span class="hljs-comment">/// Slot 0</span>
    <span class="hljs-keyword">uint16</span> poolRatio; <span class="hljs-comment">// uint16 is enough to store BPS</span>
    <span class="hljs-keyword">uint16</span> poolFee;
    <span class="hljs-keyword">uint48</span> poolActivation; <span class="hljs-comment">//uint48 is enough to cover timestamps</span>
    <span class="hljs-keyword">uint48</span> poolLastUpdate;
    <span class="hljs-comment">//uint128 is enough to store up to 340282366920938463463e18 amount</span>
    <span class="hljs-keyword">uint128</span> poolMaxDebt;
    
    <span class="hljs-comment">/// Slot 1</span>
    <span class="hljs-keyword">uint128</span> poolMinDebt;
    <span class="hljs-keyword">uint128</span> poolGain;

    <span class="hljs-comment">/// Slot 2</span>
    <span class="hljs-keyword">uint128</span> poolDebt;
    <span class="hljs-keyword">uint128</span> poolLoss; 
 }
</code></pre><p><strong>A mapping to store pools:</strong></p><pre data-type="codeBlock" text=" mapping(address =&gt; Pool) public pools;
"><code> <span class="hljs-keyword">mapping</span>(<span class="hljs-keyword">address</span> <span class="hljs-operator">=</span><span class="hljs-operator">></span> Pool) <span class="hljs-keyword">public</span> pools;
</code></pre><p><strong>And the following cached values:</strong></p><pre data-type="codeBlock" text=" uint16 poolRatio = 300;

 uint16 poolFee = 500;

 uint48 poolActivation = block.timestamp;

 uint48 poolLastUpdate = block.timestamp;

 uint128 poolMaxDebt = 99999999e18;

 uint128 poolMinDebt = 999e18;
"><code> <span class="hljs-keyword">uint16</span> poolRatio <span class="hljs-operator">=</span> <span class="hljs-number">300</span>;

 <span class="hljs-keyword">uint16</span> poolFee <span class="hljs-operator">=</span> <span class="hljs-number">500</span>;

 <span class="hljs-keyword">uint48</span> poolActivation <span class="hljs-operator">=</span> <span class="hljs-built_in">block</span>.<span class="hljs-built_in">timestamp</span>;

 <span class="hljs-keyword">uint48</span> poolLastUpdate <span class="hljs-operator">=</span> <span class="hljs-built_in">block</span>.<span class="hljs-built_in">timestamp</span>;

 <span class="hljs-keyword">uint128</span> poolMaxDebt <span class="hljs-operator">=</span> <span class="hljs-number">99999999e18</span>;

 <span class="hljs-keyword">uint128</span> poolMinDebt <span class="hljs-operator">=</span> <span class="hljs-number">999e18</span>;
</code></pre><p>Note: The rest of the elements would be 0 on a new pool.</p><h2 id="h-solidity-solution" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Solidity solution</h2><p>The following code snippet gives a solution for the use case we have discussed above. It&apos;s important to note that as the size and complexity of the struct increase, the compiler tends to perform more behind-the-scenes operations, resulting in increased gas costs <em>(we don’t want that)</em>.</p><pre data-type="codeBlock" text=" // New pool struct is initialized with the required values
 Pool memory pool = Pool({
      poolFee: poolFee,
      poolRatio: poolRatio,
      poolActivation: block.timestamp,
      poolLastUpdate: block.timestamp,
      poolMaxDebt: poolMaxDebt,
      poolMinDebt: poolMinDebt,
      poolDebt: 0,
      poolGain: 0,
      poolLoss: 0
 });

 // The pool created above is stored in the mapping
 pools[poolAddress] = pool;
"><code> <span class="hljs-comment">// New pool struct is initialized with the required values</span>
 Pool <span class="hljs-keyword">memory</span> pool <span class="hljs-operator">=</span> Pool({
      poolFee: poolFee,
      poolRatio: poolRatio,
      poolActivation: <span class="hljs-built_in">block</span>.<span class="hljs-built_in">timestamp</span>,
      poolLastUpdate: <span class="hljs-built_in">block</span>.<span class="hljs-built_in">timestamp</span>,
      poolMaxDebt: poolMaxDebt,
      poolMinDebt: poolMinDebt,
      poolDebt: <span class="hljs-number">0</span>,
      poolGain: <span class="hljs-number">0</span>,
      poolLoss: <span class="hljs-number">0</span>
 });

 <span class="hljs-comment">// The pool created above is stored in the mapping</span>
 pools[poolAddress] <span class="hljs-operator">=</span> pool;
</code></pre><h2 id="h-degen-solution" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Degen solution</h2><p>Now is when the Optimizoor Auditor Alpha comes into play. Our goal is to create a new <code>Pool</code> instance without all the overhead generated by the compiler.</p><p>To achieve this, it&apos;s crucial to understand how the EVM handles storage and the packing of structs:</p><ul><li><p><strong>Storage Slots</strong>: Struct fields are stored in slots. In our case, the <code>Pool</code> struct is already packed and occupies three slots.</p></li><li><p><strong>Storage Allocation</strong>: An instance of a struct is stored from slot &quot;n&quot; to slot &quot;n + (number of slots - 1)&quot;. For our purpose, we want to create a struct where the fields of the first slot are at slot &quot;n,&quot; the second at &quot;n + 1,&quot; and the third at &quot;n + 2.&quot;</p></li><li><p><strong>Field Packing Order</strong>: Elements within a slot are packed from right to left. For example, in the <code>Pool</code> struct, the first uint16 (poolRatio) occupies the 16 Least Significant Bits (LSB), and the uint128 (poolMaxDebt) resides in the 128 Most Significant Bits (MSB) of the 32-byte slot.</p></li></ul><p>Let’s move to the next step, which involves creating the required 32-byte slots with their correctly padded elements. To optimize this struct packing process, we will rely on the two techniques mentioned earlier:</p><ul><li><p><strong>Bit-shifting</strong>: This involves shifting a group of bits either to the right or left within a 32-byte slot.</p></li><li><p><strong>Bit masking:</strong> This technique allows us to accurately select the required bits within a 32-byte slot.</p></li></ul><p>Mastering assembly provides you with the freedom to choose your preferred technique. In my opinion, a balanced approach that combines both bit shifting and bit masking is essential.</p><p>As a general guideline, I tend to employ bit shifting when dealing with selections exceeding 64 bits, and I rely on bit masking for selections involving fewer than 64 bits. This combination allows for flexibility and efficiency in assembly coding.</p><p>This is how the field packing of the first slot of the <code>Pool</code> struct would look like, using assembly and the techniques mentioned above, <em>now you now why the article is called “Degen Bit Masking“:</em></p><pre data-type="codeBlock" text=" or(
       shl(128, poolMaxDebt),
             or(
                   shl(80, and(0xffffffffffff, timestamp())),
                   or(
                         shl(32, and(0xffffffffffff, timestamp())),
                         or(
                              shl(16, and(0xffff, poolFee)),
                              and(0xffff, poolRatio) // 4 LSB bytes
                         )
                   )
             )
       )
 )
"><code> <span class="hljs-built_in">or</span>(
       shl(<span class="hljs-number">128</span>, poolMaxDebt),
             <span class="hljs-built_in">or</span>(
                   shl(<span class="hljs-number">80</span>, and(<span class="hljs-number">0</span>xffffffffffff, timestamp())),
                   <span class="hljs-built_in">or</span>(
                         shl(<span class="hljs-number">32</span>, and(<span class="hljs-number">0</span>xffffffffffff, timestamp())),
                         <span class="hljs-built_in">or</span>(
                              shl(<span class="hljs-number">16</span>, and(<span class="hljs-number">0</span>xffff, poolFee)),
                              <span class="hljs-built_in">and</span>(<span class="hljs-number">0</span>xffff, poolRatio) <span class="hljs-comment">// 4 LSB bytes</span>
                         )
                   )
             )
       )
 )
</code></pre><p>Let’s break down this process:</p><p>We work from the MSB to the LSB using or gates to combine the fields sequentially:</p><pre data-type="codeBlock" text="// The or gate combines both operators into the same 32-byte slot
 or(   
       // this shift moves the poolMaxDebt value all the way to the
       // left, leaving the 128 LSB free for the rest of the fields
       shl(128, poolMaxDebt), 
       ///....////     
 )
"><code><span class="hljs-comment">// The or gate combines both operators into the same 32-byte slot</span>
 <span class="hljs-selector-tag">or</span>(   
       <span class="hljs-comment">// this shift moves the poolMaxDebt value all the way to the</span>
       <span class="hljs-comment">// left, leaving the 128 LSB free for the rest of the fields</span>
       <span class="hljs-built_in">shl</span>(<span class="hljs-number">128</span>, poolMaxDebt), 
       <span class="hljs-comment">///....////     </span>
 )
</code></pre><p>We do this recursively, until hitting those lengths of 64 bit lengths mentioned above, we use the bitmask <code>0xffffffffffff</code> in order to select the 48 bits of the current timestamp making sure the rest is 0</p><pre data-type="codeBlock" text="///....///,
or(    // we shift poolLastUpdate 80 bits to the left
       // 80 bits = 48 + 16 + 16
       shl(80, and(0xffffffffffff, timestamp())),//
       ///....////
 )
"><code><span class="hljs-comment">///....///,</span>
<span class="hljs-selector-tag">or</span>(    <span class="hljs-comment">// we shift poolLastUpdate 80 bits to the left</span>
       <span class="hljs-comment">// 80 bits = 48 + 16 + 16</span>
       <span class="hljs-built_in">shl</span>(<span class="hljs-number">80</span>, <span class="hljs-keyword">and</span>(<span class="hljs-number">0</span>xffffffffffff, <span class="hljs-built_in">timestamp</span>())),<span class="hljs-comment">//</span>
       <span class="hljs-comment">///....////</span>
 )
</code></pre><p>Then for the fields <code>poolActivation</code>, <code>poolRatio</code> and <code>poolFee</code> we do the following:</p><pre data-type="codeBlock" text="///....////,
 or(
       shl(32, and(0xffffffffffff, timestamp())), // poolActivation
       or(.  // same masking than above but with 16 bits 
             shl(16, and(0xffff, poolFee)),  
             and(0xffff, poolRatio) // 4 LSB bytes
       )
  )
"><code><span class="hljs-comment">///....////,</span>
 <span class="hljs-selector-tag">or</span>(
       <span class="hljs-built_in">shl</span>(<span class="hljs-number">32</span>, <span class="hljs-keyword">and</span>(<span class="hljs-number">0</span>xffffffffffff, <span class="hljs-built_in">timestamp</span>())), <span class="hljs-comment">// poolActivation</span>
       <span class="hljs-built_in">or</span>(.  <span class="hljs-comment">// same masking than above but with 16 bits </span>
             <span class="hljs-built_in">shl</span>(<span class="hljs-number">16</span>, <span class="hljs-keyword">and</span>(<span class="hljs-number">0</span>xffff, poolFee)),  
             <span class="hljs-keyword">and</span>(<span class="hljs-number">0</span>xffff, poolRatio) <span class="hljs-comment">// 4 LSB bytes</span>
       )
  )
</code></pre><p>Nice!, so we got out first slot packed, bit-wise it would something like this:</p><pre data-type="codeBlock" text="128-bits      48-bits          48-bits          16-bits   16-bits
poolMaxDebt | poolLastUpdate | poolActivation | poolFee | poolRatio
"><code><span class="hljs-number">128</span><span class="hljs-operator">-</span>bits      <span class="hljs-number">48</span><span class="hljs-operator">-</span>bits          <span class="hljs-number">48</span><span class="hljs-operator">-</span>bits          <span class="hljs-number">16</span><span class="hljs-operator">-</span>bits   <span class="hljs-number">16</span><span class="hljs-operator">-</span>bits
poolMaxDebt <span class="hljs-operator">|</span> poolLastUpdate <span class="hljs-operator">|</span> poolActivation <span class="hljs-operator">|</span> poolFee <span class="hljs-operator">|</span> poolRatio
</code></pre><p>For the second slot, since the last three fields are 0, we only have to allocate <code>poolMinDebt</code> to the 128 LSB, cleaning the 128 upper-bits:</p><pre data-type="codeBlock" text="shr(128, shl(128, poolMinDebt))
"><code><span class="hljs-built_in">shr</span>(<span class="hljs-number">128</span>, shl(<span class="hljs-number">128</span>, poolMinDebt))
</code></pre><h3 id="h-storing-the-slots-values" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Storing the slots values</h3><p>Now that we have our struct created we should store it correctly on the pools mapping. In order to know which storage slot is “n”, we need to calculate the keccak hash of the address of the new pool and the slot of the mapping. In solidity it will look something like this <code>keccak(poolAddress,pools.slot)</code> but since this is supposed to be the <em>degen solution</em> we are going to calculate it in assembly using the scratch space <code>0x00-0x40</code>:</p><pre data-type="codeBlock" text=" mstore(0x00, poolAddress)
 mstore(0x20, pools.slot)
 slot := keccak256(0x00, 0x40)
"><code> <span class="hljs-built_in">mstore</span>(<span class="hljs-number">0</span>x00, poolAddress)
 <span class="hljs-built_in">mstore</span>(<span class="hljs-number">0</span>x20, pools.slot)
 slot := <span class="hljs-built_in">keccak256</span>(<span class="hljs-number">0</span>x00, <span class="hljs-number">0</span>x40)
</code></pre><p>Finally we can store the two 32-byte slots that we created in the bit masking step:</p><pre data-type="codeBlock" text="// store the contents of the first slot at &quot;n&quot;  
sstore(
       slot,
       or(
             shl(128, poolMaxDebt),
             or(
                   shl(80, and(0xffffffffffff, timestamp())),
                   or(
                         shl(32, and(0xffffffffffff, timestamp())),
                         or(
                              shl(16, and(0xffff, poolFee)),
                              and(0xffff, poolRatio) // 4 LSB bytes
                         )
                   )
             )
       )
 )
 // store the contents of the second slot at &quot;n + 1&quot;  
 sstore(add(slot, 1), shr(128, shl(128, poolMinDebt)))
"><code><span class="hljs-comment">// store the contents of the first slot at "n"  </span>
<span class="hljs-built_in">sstore</span>(
       slot,
       or(
             shl(<span class="hljs-number">128</span>, poolMaxDebt),
             <span class="hljs-built_in">or</span>(
                   shl(<span class="hljs-number">80</span>, and(<span class="hljs-number">0</span>xffffffffffff, timestamp())),
                   <span class="hljs-built_in">or</span>(
                         shl(<span class="hljs-number">32</span>, and(<span class="hljs-number">0</span>xffffffffffff, timestamp())),
                         <span class="hljs-built_in">or</span>(
                              shl(<span class="hljs-number">16</span>, and(<span class="hljs-number">0</span>xffff, poolFee)),
                              <span class="hljs-built_in">and</span>(<span class="hljs-number">0</span>xffff, poolRatio) <span class="hljs-comment">// 4 LSB bytes</span>
                         )
                   )
             )
       )
 )
 <span class="hljs-comment">// store the contents of the second slot at "n + 1"  </span>
 <span class="hljs-built_in">sstore</span>(add(slot, <span class="hljs-number">1</span>), <span class="hljs-built_in">shr</span>(<span class="hljs-number">128</span>, shl(<span class="hljs-number">128</span>, poolMinDebt)))
</code></pre><p>While this <em>degen</em> optimization may appear complex and challenging to the average solidity developer, it offers a remarkable gas-saving advantage, reducing gas costs by around 5,000 units when compared to the Solidity version.</p><p><em>Embrace low-level assembly anon.</em></p><p>Hope you have enjoyed this article and it piqued your interest in delving into low-level EVM code. If you or you project require assistance with Smart Contract gas optimisation, code reviews, or security assessments, don&apos;t hesitate to reach out to me via my <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/vn_martinez_">Twitter</a> account.</p>]]></content:encoded>
            <author>vnmrtz@newsletter.paragraph.com (VNMRTZ)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/db0a122856a3ad3ef06f198c9ac8d3f7b8b6cf08f30562169f7437114625e48f.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Celer cBridge whitehat cheat sheet]]></title>
            <link>https://paragraph.com/@vnmrtz/celer-cbridge-whitehat-cheat-sheet</link>
            <guid>aH6ON32YpPXbWOlHfE5z</guid>
            <pubDate>Tue, 25 Apr 2023 18:27:33 GMT</pubDate>
            <description><![CDATA[Protocol overviewCeler Bridge, cBridge, is a multi-chain interoperability system that provides cross-chain token bridging with deep liquidity for users between all chains. It&apos;s basically a system that lets you move tokens between different blockchains, like a bridge connecting them. And here&apos;s the juicy part: right now, they&apos;ve got a whopping $2 million up for grabs as a bug bounty on Immunefi. Can you imagine finding a crit and reporting it? Easy money, right? ;)Celer Bug Boun...]]></description>
            <content:encoded><![CDATA[<h2 id="h-protocol-overview" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Protocol overview</h2><p>Celer Bridge, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://cbridge-docs.celer.network/">cBridge</a>, is a multi-chain interoperability system that provides cross-chain token bridging with deep liquidity for users between all chains. It&apos;s basically a system that lets you move tokens between different blockchains, like a bridge connecting them.</p><p>And here&apos;s the juicy part: right now, they&apos;ve got a whopping $2 million up for grabs as a bug bounty on Immunefi. Can you imagine finding a crit and reporting it? Easy money, right? ;)</p><div data-type="embedly" src="https://immunefi.com/bounty/celer/" data="{&quot;provider_url&quot;:&quot;https://immunefi.com&quot;,&quot;description&quot;:&quot;Find bugs and vulnerabilities on Celer and get paid up to $2,000,000.&quot;,&quot;title&quot;:&quot;Celer Bug Bounties | Immunefi&quot;,&quot;mean_alpha&quot;:107.68015873,&quot;thumbnail_width&quot;:1200,&quot;url&quot;:&quot;https://immunefi.com/bug-bounty/celer/information/&quot;,&quot;thumbnail_url&quot;:&quot;https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/63ba1b11ced5ba4e1c7e56a7042831ac6df18c64d88b293ec9afafb5c1a342bb.png&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Immunefi&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:630,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1200,&quot;height&quot;:630,&quot;src&quot;:&quot;https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/63ba1b11ced5ba4e1c7e56a7042831ac6df18c64d88b293ec9afafb5c1a342bb.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/63ba1b11ced5ba4e1c7e56a7042831ac6df18c64d88b293ec9afafb5c1a342bb.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://immunefi.com/bounty/celer/" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>Celer Bug Bounties | Immunefi</h2><p>Find bugs and vulnerabilities on Celer and get paid up to $2,000,000.</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://immunefi.com</span></div><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/63ba1b11ced5ba4e1c7e56a7042831ac6df18c64d88b293ec9afafb5c1a342bb.png"/></div></a></div></div><p><em>The following article is a cheat sheet for whitehats/devs or even experienced users who want to understand how cBridge works, user flows, and some scenarios. Plus, a short compilation of questions formulated from the point of view of whitehat (me)</em></p><p><em>“This article does not promote any malicious activities, including hacking or exploiting vulnerabilities in the cBridge system.”</em></p><h3 id="h-basics" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Basics</h3><ul><li><p><strong>Decentralized</strong> and <strong>non-custodial</strong> asset bridge.</p></li><li><p><strong>Deep liquidity</strong>: supports large transfer sizes.</p></li><li><p>Single-click operations.</p></li><li><p>Makes use of <strong>Celer State Guardian Network</strong> (SGN) services and functionality.</p></li><li><p>Message bridging (NOT IN SCOPE).</p></li><li><p>Supports two fungible token bridging models:</p><ul><li><p><strong>Canonical mapping bridge</strong> for tokens that only have been deployed to one chain. (NOT IN SCOPE)</p></li><li><p><strong>Pool-based bridge</strong> for tokens that have been deployed on different chains.</p></li></ul></li><li><p>Supports <strong>150+ tokens</strong> across <strong>40+ blockchains</strong> and layer-2 rollups.</p></li><li><p>Supports node slashing</p></li></ul><h3 id="h-10000ft-view" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">10_000ft view</h3><ul><li><p><strong>CELR</strong> holders can <strong>stake</strong> (CELR stakers) their tokens <strong>into the SGN</strong> by becoming a <strong>validator</strong> and providing services for Celer Products or through <strong>delegation</strong>.</p></li><li><p><strong>Users and LPs</strong> of the Bridge pay <strong>fees</strong> to the SGN in exchange for its services, like on every PoS blockchain.</p></li><li><p><strong>CELR stakers</strong> receive <strong>staking</strong> and <strong>fee rewards</strong> from cBridge and other Celer products.</p></li><li><p><strong>LPs</strong> can add liquidity to the <strong>cBridge liquidity pool</strong> on any chain.</p></li><li><p>Bridge <strong>Users</strong> send tokens to a destination chain, using <strong>cBridge nodes’ liquidity</strong> and <strong>pooled LPs liquidity</strong>; this costs a fee (cBridge fee).</p></li><li><p>Bonded Validators validate and sign the cross-chain transaction.</p></li><li><p>Malicious or faulty validators can be slashed out of their staking token.</p></li><li><p>50% of the fees from cross-chain transfers are forwarded to cBridge LPs whose liquidity is used in the transfers, and the other 50% goes to <strong>SGN stakers</strong> (CELR stakers).</p></li></ul><p>In a nutshell, cBridge enables users to transfer tokens between supported chains in a decentralized and trustless manner, leveraging the liquidity provided by LPs on each chain. Transactions with the bridge contract typically require signatures from a threshold of validators, known as weighted signatures.</p><h2 id="h-deep-dive" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Deep dive</h2><h3 id="h-scope-of-the-bounty" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Scope of the bounty</h3><p>At the time of writing this article, the bug bounty set on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://immunefi.com/bounty/celer/">Immunefi</a> for cBridge has the following contracts in scope, as well as all the inherited ones:</p><ul><li><p><code>Staking.sol</code></p></li><li><p><code>SGN.sol</code></p></li><li><p><code>StakingReward</code></p></li><li><p><code>FarmingRewards</code></p></li><li><p><code>Govern.sol</code></p></li><li><p><code>Viewer.sol</code></p></li><li><p><code>Bridge.sol</code></p></li><li><p><code>Pool.sol</code></p></li></ul><h3 id="h-architecture-and-diagrams" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Architecture &amp; diagrams</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/864a3e91f89565aa2fee18ccd4f40bf20a6593f53294e6e0b7de12b3c62f3474.png" alt="Smart contracts (inheritance) / Main actors " blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Smart contracts (inheritance) / Main actors</figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/dadb6489f81c6d33afbdc1925aef55124f38b93bc26e623c7c7f1ff4d34e98fc.png" alt="The SGN as a Shared Liquidity Pool Manager" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">The SGN as a Shared Liquidity Pool Manager</figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/14209b5862e56af3292dbcb020a48ad85f1f79d64e19399b9f52797e52376d84.png" alt="Interchain messaging" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Interchain messaging</figcaption></figure><h3 id="h-terminology" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Terminology</h3><p><strong>SGN</strong> → The Celer State Guardian Network, a specialized PoS chain providing services for Celer Products. In this case, for the Bridge.</p><p><strong>Delegator</strong> → A CELR token holder that delegates its holdings to an SGN validator.</p><p><strong>Validator</strong> → A CELR token holder that must run a full SGN node in charge of validating and signing cross-chain transactions.</p><p><strong>Staker</strong> → A delegator or a validator staking CELR on <code>Staking.sol</code> in exchange for network + staking rewards.</p><p><strong>LPs</strong> → Users that provide liquidity to the pool-based bridge on a specific chain (Ethereum, polygon, bsc, etc.).</p><p><code>nativeLiquidity</code> → The chain native token provided to the bridge pool by an LP, e.g., ETH on Ethereum.</p><p><code>relay</code> → The function of the bridge that initiates the second half of a cross-chain transaction in the destination chain.</p><p><code>bond</code> → Bunch of tokens with value (user-delegated + validator owned) that the validator locks in <code>Staking.sol</code> to be part of the network and be able to perform diverse tasks.</p><p><code>bondedTokens</code> → Total amount of tokens of bonded validators.</p><p><code>signer</code>→ Actor that signs valid cross-chain transactions and other protocol interactions. It can be either a validator or an address previously registered as a signer by that validator.</p><p><strong>MinRequiredTokens</strong> → Minimum amount of tokens needed for a validator to be bounded.</p><p><code>selfDelegation</code> → Amount of tokens that a validator delegates to himself.</p><p><strong>xLiquidity</strong> tokens → Tokens that have been deployed on different chains used in the <strong>Pool-based bridge.</strong></p><p><strong>Weighted multi-signatures</strong> → This means that each signer has a different amount of power; this power is accounted by the amount of tokens the signer’s validator has bonded.</p><h3 id="h-key-points-and-focus-areas-for-whitehats" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Key points and focus areas for whitehats</h3><p>Imo, there are two areas to focus on:</p><ul><li><p>The <strong>multi-sig verification</strong> in the cBridge system plays a critical role in guarding important functions of the protocol. If there were to be a bug or vulnerability in this part of the code, the impact could be catastrophic.</p></li><li><p><code>Staking.sol</code> Covers most of the validator functionality; this makes it quite a complex state machine; validators can be delegated, self-delegated, bonded, unbonding, etc.</p></li></ul><h3 id="h-questions" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Questions</h3><p><strong>Bridge</strong>:</p><ul><li><p>Is the interaction with arbitrary weird ERC20 tokens considered? → NOT SUPPORTED</p></li><li><p>Is there a token whitelist for <strong>xLiquidity</strong> tokens? → There is an amount cap for each epoch and token, only for some tokens.</p></li><li><p>Are transactions replayable? → Each transaction has a unique id that gets whitelisted after it succeeds</p></li></ul><p><strong>Staking</strong>:</p><ul><li><p>How do CELR holders delegate? → Holders can delegate to a validator in <code>Staking.sol</code>.</p></li><li><p>Is it possible to de-register a node while a transaction is happening?→ nodes can only be unbonded if they have been slashed or have less than minimum tokens.</p></li><li><p>How do un-delegations work, and why are they only taken into account when a validator is bonded <strong>→</strong> each user can un-delegate if the resulting tokens of a validator go below the threshold and the validator is unbonded</p></li></ul><p><strong>SGN</strong>:</p><ul><li><p>Can a user slash a node’s bond without reason? → NO, validators on the SGN network have to sign the transaction.</p></li><li><p>Can cross-chain messaging trick msg.sender → OUTSIDE SCOPE, SGN tedermint network (the CELER Network) is not in the bug bounty scope.</p></li><li><p>How does cross-chain msg.sender work? Is <strong>there any aliasing done to the addresses? →</strong> Cross-chain transactions are signed by multiple validators, <strong>multi sigs</strong></p></li><li><p>What does HTLC mean? → time-locked hashed txs, every cross-chain tx has a deadline.</p></li><li><p>How is the priority SLA queue implemented? Can a less reliable node be the first option? → Node selection rule, governance can change it → not in scope</p></li><li><p>What is protobuffer → MESSAGE PASSING ENCODING PROTOCOL</p></li><li><p>How much is the SLA bond amount compared to liquidity? → They don’t take it into account</p></li><li><p>Is the relayer centralized? → OUT OF SCOPE</p></li><li><p><strong>Devs assume</strong> that the <strong>security model</strong> is the most <strong>secure,</strong> is this true? → Decentralized multi-sig validators.</p></li><li><p>How does the optimistic rollup work? → who can veto a tx? → SGN chain</p></li></ul><p>Rewards:</p><ul><li><p>Difference between <code>StakingRewards</code> and <code>FarmingRewards</code> → <code>StakingRewards</code> paid in CELR from Staking or validating, FarmingRewards extra CELR when providing liquidity to some pools with incentives.</p></li><li><p>How are StakingRewards paid? → in CELR, when a staker/validator calls <code>claimReward</code> in <code>StakingRewards.sol</code></p></li><li><p>How much are bridging fees paid to validators? 50% of bridge fees</p></li><li><p>How are liquidity fees paid to bridge LPs? Withdraw from <code>Pool.sol</code></p></li><li><p>Does a validator earn more than a delegator? → yes, validators take a cut of the delegators’ fees that have delegated to them</p></li></ul><h3 id="h-more-questions" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">More questions:</h3><ul><li><p>What kind of proxy is used?</p></li><li><p>Can the signature validity checks be tricked on the destination chain?</p></li></ul><h2 id="h-cross-chain-environment" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Cross-chain environment</h2><h3 id="h-other-bridging-and-messaging-protocols" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Other bridging &amp; messaging protocols</h3><div data-type="embedly" src="https://debridge.finance/" data="{&quot;provider_url&quot;:&quot;https://debridge.finance&quot;,&quot;description&quot;:&quot;Swap any tokens instantly cross-chain with deepest liquidity, low fees, and guaranteed rates.&quot;,&quot;title&quot;:&quot;deBridge&quot;,&quot;thumbnail_width&quot;:1200,&quot;url&quot;:&quot;https://debridge.finance/&quot;,&quot;thumbnail_url&quot;:&quot;https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/c1092fe9c8c7d411467abc69890b35e0e0e9ffd137b0b91e2a5aa97f0ee94785.jpg&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Debridge&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:630,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1200,&quot;height&quot;:630,&quot;src&quot;:&quot;https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/c1092fe9c8c7d411467abc69890b35e0e0e9ffd137b0b91e2a5aa97f0ee94785.jpg&quot;}}}" format="small"><link rel="preload" as="image" href="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/c1092fe9c8c7d411467abc69890b35e0e0e9ffd137b0b91e2a5aa97f0ee94785.jpg"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://debridge.finance/" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>deBridge</h2><p>Swap any tokens instantly cross-chain with deepest liquidity, low fees, and guaranteed rates.</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://debridge.finance</span></div><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/c1092fe9c8c7d411467abc69890b35e0e0e9ffd137b0b91e2a5aa97f0ee94785.jpg"/></div></a></div></div><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://immunefi.com/bounty/axelarnetwork/">https://immunefi.com/bounty/axelarnetwork/</a></p><div data-type="embedly" src="https://immunefi.com/bounty/wormhole/" data="{&quot;provider_url&quot;:&quot;https://immunefi.com&quot;,&quot;description&quot;:&quot;Find bugs and vulnerabilities on Wormhole and get paid up to $5,000,000.&quot;,&quot;title&quot;:&quot;Wormhole Bug Bounties | Immunefi&quot;,&quot;mean_alpha&quot;:107.68015873,&quot;thumbnail_width&quot;:1200,&quot;url&quot;:&quot;https://immunefi.com/bug-bounty/wormhole/information/&quot;,&quot;thumbnail_url&quot;:&quot;https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/55864d19e570f8a2fad430f6b01780ba048343fb0f5f7d4f0139eed25d020064.png&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Immunefi&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:630,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1200,&quot;height&quot;:630,&quot;src&quot;:&quot;https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/55864d19e570f8a2fad430f6b01780ba048343fb0f5f7d4f0139eed25d020064.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/55864d19e570f8a2fad430f6b01780ba048343fb0f5f7d4f0139eed25d020064.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://immunefi.com/bounty/wormhole/" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>Wormhole Bug Bounties | Immunefi</h2><p>Find bugs and vulnerabilities on Wormhole and get paid up to $5,000,000.</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://immunefi.com</span></div><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/55864d19e570f8a2fad430f6b01780ba048343fb0f5f7d4f0139eed25d020064.png"/></div></a></div></div><p>Disclaimer: It&apos;s important to note that the purpose of this cheat sheet is not to spread or promote any malicious activities, including hacking or exploiting vulnerabilities in the cBridge system. The information provided is intended solely for educational and informational purposes to help whitehats, devs, and experienced users better understand how cBridge works, user flows, terminology, and scenarios. Engaging in any unauthorized activities, such as attempting to hack or exploit the cBridge system or any other blockchain projects, is illegal and unethical. Any such activities are strongly discouraged and can have legal consequences. Users should always comply with applicable laws and regulations, and report any identified vulnerabilities or security concerns to the cBridge team through appropriate channels such as Immunefi. The cBridge team and platform are committed to maintaining the security and integrity of the system, and users are encouraged to use their knowledge and skills responsibly and ethically.</p><p>Good luck and happy hacking, whitehat ;)</p>]]></content:encoded>
            <author>vnmrtz@newsletter.paragraph.com (VNMRTZ)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/1127908d0c109428f2c4954e6bfb403aea32a3776cd1ff7bf2a644f7987b58c0.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[initial commit]]></title>
            <link>https://paragraph.com/@vnmrtz/initial-commit</link>
            <guid>R7rs1nzRrS2j0t41vAdk</guid>
            <pubDate>Tue, 25 Oct 2022 09:27:55 GMT</pubDate>
            <description><![CDATA[Hi! I am vnmrtz.eth, follow me @vn_martinez_ join me on this journey in web3!]]></description>
            <content:encoded><![CDATA[<p>Hi! I am <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://etherscan.io/address/0x8041c435473fd8657ffaead13c3447d3daca0635">vnmrtz.eth</a>, follow me <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/vn_martinez_">@vn_martinez_</a> join me on this journey in web3!</p>]]></content:encoded>
            <author>vnmrtz@newsletter.paragraph.com (VNMRTZ)</author>
        </item>
    </channel>
</rss>