<?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>Pyro | 0x3b</title>
        <link>https://paragraph.com/@0x3b</link>
        <description>Smart contract security researcher.

If you want an audit done, feel free to message me on twitter. </description>
        <lastBuildDate>Sun, 15 Nov 2026 23:07:51 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>Pyro | 0x3b</title>
            <url>https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/194c69bc0585fe1ffb449a19ca6374d30e23a0e5799461210a56468bf1ea6a71.png</url>
            <link>https://paragraph.com/@0x3b</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[5 oracle bugs (from real audits)]]></title>
            <link>https://paragraph.com/@0x3b/oracle-bugs</link>
            <guid>u3X28LiqJq8ZgFubeSt4</guid>
            <pubDate>Wed, 25 Mar 2026 06:13:03 GMT</pubDate>
            <description><![CDATA[5 real world oracle mistakes that will wreck your protocol before an attacker even shows up.]]></description>
            <content:encoded><![CDATA[<br><p>Instead of giving you the usual AI slop opener (like most of you do...) I would rather jump strait into the bugs. Enjoy:</p><br><h2 id="h-redstone-going-back-in-time" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Redstone going back in time</h2><p>When working with Redstone (not the minecraft one) you will most likely use the pull based mechanics (else you would use ChainLink), like this one:<br></p><figure float="none" data-type="figure" class="img-center"><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/da88f103fc1cc896fff2fc8c141afd2d1b1703e17f94582cf21daa458f025803.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAMCAIAAACMdijuAAAACXBIWXMAAAsTAAALEwEAmpwYAAADL0lEQVR4nI3QTW8bRRwG8I3ktDaQytms7Zkdr2d3MrPeXXtfvF7bWb/Ub7KjJnHaJg0I0RK1FCHBAbhQktRpgQuHKJUQCkRFgKAE9VIuXFLXn6AXjnwIvgCnorXdqGoQQvpp9PxnRvNIwz37++fhg1tPf+8Pf9t58uv24Jet4dH28Gj7yYPA4MetwA/bE99vPf5uZ+z4/u2Jw53jw/7xYf/xt/3BQX9wsDs42B1+s/to79Nnfzzkjr7+qJcp33i/m1w5D1I2IO6JBMkBmh/JJf4n5iaYC5iT1NwpoN679QF3f++9V+N0XrNlZmKWwVQPMAMzQ2EZhWWeZ3M+PWY/9695cofpzmxS/fLDd7i9O9f4aCqn2ZqiEdnI2jU33zTMStaqKmqOqK7j1nWzTNKuAJVoXBrjAeYBjoLUGA/wLMDRuDSbCFYe4Bgk3Cugf/Mqt3d388xryNCsUul8udqptS4VK4vV1mq5vmy45UKlu1C7YBiFZnOt6C/m8o1yZWnBXyqUutlczSt08oVWsdQt+osL/oVcsWV5NafYcEoNb6F5DrKgYP/zTS4EIFahbIiKAXEapFREDFHRIU4jokNZS4gUUxtTC1NLpjahDqY2UjKKmpPmTWnenBwxO0WzY4pqhfhU/+Y1bv/uJheCEjGsQs31267f9iqdtONjRUs7vulVc5VF6lRiUBagIkCFhzL/QhYmRvsAzwEyB4IxgSg3A8cF17kQSNGMV2l5lY5TalrFOqEmMzzXb2e9mul3IE6PX4wjGkMkBuUYIgKUgwBJHNHTgKRyM+JJARRlVVR0RAxEDIlmRRL81XhHVPSTIyCpCUkVmQNkXSSmSG0ga/9RcPvGVe6rz65PzSQVZjrFhlWojT6qlffbqp5net4pNjSrlPWqrt9y/TYz8klmZ+uX1UJXry4btVXq1ket7CUiTof45J133+a++ORNbkrkAYnwUphHZ6KBSBSFBRQWpLM8iggozKOzIxFeigho+hwI82g6CqejQYgIydNmAea4uY/feoP76+n+6xtLGxu99csrL5iMVy6ddnF9dXV9ZSVYg9B7ydpyb2354pVA78+f7v0Dh7T1yJQ5l+YAAAAASUVORK5CYII=" nextheight="330" nextwidth="884" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Pretty simple. Users can <code>updatePrice</code> with the new prices in  <code>msg.data</code>, which                          <code>getOracleNumericValuesFromTxMsg</code> uses to verify and return the price. Since Redstone validates that the data must be at least 3 min old (and no more than 1 min into the future) we don't need any validations here.</p><p>However there is still an issue here. We can travel in back and forth in time (figuratively speaking).</p><p>Since we do no checks here, we can technically update the price to be up to <code>now</code>, then update it again to be <code>now - 3min</code>. For example:</p><ol><li><p>ETH is 3k at <code>T = now</code>  (I wish D:)</p></li><li><p>Borrower borrows up to their max</p></li><li><p>Liquidator updates the price to be 2.9k for when <code>T - 3min</code></p></li><li><p>Liquidates the user</p></li></ol><br><p>The current price was $3000 and our borrower should not be liquidatable, but we did liquidate him.</p><br><h2 id="h-staking-feeds" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Staking feeds</h2><p>Some projects use interesting token connections. For this example our project was lending/borrowing and 2 of the assets were BTC and UNI.</p><p>At first it sounds really simple, just denominate BTC in UNI, or UNI in BTC and decide how much each costs compared to the other. However that is not so simple, since ChainLink does not have a feed that reports BTC price in UNI, or UNI price in BTC. It has BTC/ETH and UNI/ETH.</p><p>So we must use 2 feeds, why is that a problem? It's not if you know how to handle it (as every issue out there). However it is if you didn't know about it.</p><p>The problem here is that 2, or in our case 3 feed wBTC -&gt; BTC -&gt; ETH -&gt; UNI. We start with wBTC → BTC, because we are on ETH and don't have access to BTC directly and shouldn't assume 1 BTC == 1 wBTC. </p><p>The deviation threshold&nbsp;expands with each feed. Where in total we would have 4.5% deviation:</p><ul><li><p>wBTC/BTC - 0.5%</p></li><li><p> BTC/ETH - 2% </p></li><li><p>UNI/ETH - 2%</p></li></ul><p><br>Where that becomes a problem?</p><p>When you don't know that the total deviation can stack and set too tight liquidation margins. With a 4.5% compounded deviation (4% more realistically since BTC doesn't often deviate from wBTC), the oracle price can be up to 4.5% stale compared to the real market price in either direction.</p><p>This creates two problems:</p><ol><li><p><strong>Phantom solvency</strong>&nbsp;— A borrower whose position is underwater at real market prices still looks healthy to the protocol because the oracle hasn't crossed its deviation threshold yet. By the time the feed updates, the position is deep in bad debt and liquidators can't cover it profitably.</p></li><li><p><strong>Wrongful borrowing</strong>&nbsp;— A user deposits collateral and the oracle overvalues their collateral relative to the market. They borrow more than they should be able to. When the next update lands, they're instantly liquidatable.</p></li></ol><p>The worst part is that neither are an "attack", but can and will happen on occasion.</p><br><p>The fix is really simple. Make sure you check all deviations and lower the LTV by them. Also I will recommend to not allow borrowers to borrow up to the max LTV, but leave a gap (so they won't get liquidated in the next update).</p><br><h2 id="h-the-boring-one" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The boring one</h2><p>See anything interesting here? Yes? No?</p><figure float="none" data-type="figure" class="img-center"><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/f1f5c08da8cf6ea11fd1d60225fac86d1af15517924a42b78b94466dc658ad4c.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAPCAIAAAAK4lpAAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEBUlEQVR4nIWTS4scVRTHKxjpEBj6Xbeq+lZ1vd+vru7pulVd/aieR6cno/hKXEQzO0HC9EzQhTLJwnG008MwBAyCmRdEVy4VBHdu3Dmu/QKus/ADRKqqEweCCj8u/3O49/45596DPXv65HT24Y9PPjr7Zuv0cPP0cHJ6ODk52Dw5mJwcTI735xw9mBzNtudMtzIe700e702O9rZSthN2t452t492t08+v/vwkzvPnv6CfffV3bed7uadkXgzBqxDCo0MIoW8oLOQENz/QnQyaNV7hZD+/OFr7NHsg1yZZUQDsiotaDSvQV6heY0WEgF5GfIKIxpMGtK8xghaXdL/F16xFgj+j+8fYtOd969WBd1FuhtwSkPQmrKNBM2ryS3ejSV/lXdjsiaSvCXZvqC3CEYpAqYI2BLgSoArAjYNmRJgSkQ900XAVCgOu4yfn02xB/c3Xi3U66pLSw7F6xSvQ8mq8VqZVijZI6QmIbiAEipQgoJJCyYOpXwVPr+ITlaCKwC2kDixZZKrkEKFFAAlYDnw+9kM+3LndqlAN2VL4xSZVS27i9DYsiPT7ph2x3V7DW9A8bqs+Y7b181AUlqGE6lGqBqB43YlDbGi1rRNz9QMwyLqar4K81VYIetYDk8Mpju3sSukJBqybFkOiuLXUTT20FI4WEe9NUHxPH9ot3rtaOT5Q6vZFZSGLLuL4Wo7GqHuGHXHpheEaNCLVqLOyA/GPhq1Fpctp4MVakmLZvc3sEs4YCRaslQ3DOK1VnfZavWC/riBYhxKhhf63WtBvKZ6odXuQcGs1fgGGgb9cdAfd5Ze0xtRHN8YxDeGSzeXV969Nro1HL5lNSPsKnl+PE0ruITjUCxTQvUCZZIrk1wR0FmIQylFrJB8heRfbMOhVCY5nBJfhAAqAMokI2M5/B8DkhF1XpdN32h2JduXTd9pD1wU624AoKC6Ic0qjLrIN1eM3ptSsMaqTdVGmotkEzleH4Xjxfaq5XZVO8jeH6c4LAfOj/ex2b3EgGJEQ9Q1F2X9MbwoiK8H8fVmGBNQclHMizpnIqWz7iy/p/feEG2/geJmuGw0Ih+N4vidqLuOwrHd6mWl41CcG0x3NrDLAEABnxco4VDGoUyxKoASwShVKFWhmLWo+oLnTauQAk6JIDmSbqDEuUH6TX87mmH79zawHEEyoisnNXOcYrYHTrvvtPuQFlkz1DtjkmRVO/DQ0PTCCsWVAFMh+eyiMsmViHqJqGcinYPkkZI5WCCSCj77+BZ2pVahuEK1XgJMvppMaR4wBcAmP/qCKKbTtFCFL5N/KVMi6hhW/PXRF9jP337KK4bVWFRMb47uZkJNtWo0UtHIUNN8kvxXPNXwTKsla85fP539DV70HjR7lDRMAAAAAElFTkSuQmCC" nextheight="818" nextwidth="1690" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>I had to include it. It's 2026 and even now I see people do it... AI knows to not write it like this so why do developers do it?</p><p>If you don't know what I am talking about it's the fact that feed may have different staleness timestamps. Some might have a few hours and others 24h. However if you use 1 for all, then you are either using stale data (for feeds that have smaller time allowance than the one you give) or marking perfectly fine data as stake (for feeds that have bigger allowance).</p><p>The solution? Just use a map and set each feed to it's own staleness.</p><figure float="none" data-type="figure" class="img-center"><img src="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/22c8d9a3b4121387128ca9a8cee37e2c7c186a2b89cf770b4a20cfde7cb60083.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAKCAIAAABaL8vzAAAACXBIWXMAABYlAAAWJQFJUiTwAAACc0lEQVR4nK3Rz0sUYRgH8Hd3adgYVp1f7/x4Z2fceWdndnfcXdE2BS9Jf0E1u51WRVnJINT9oasZIgh1NEKCJCI6BYqRmLQlmESXDh29hMciOrmznjdmttVLpwo+DN/3eR7m5ZkBzdPlxufpH5/u/PwwfXIw4xzOOB9nnUNX46DYOCg5+0Vnv+zsl+u1Ur0257x11ffm6ntVZ3fe2a02XledV57tBWd70dleqm/dPdlcbO6sNL+sg6M3BU0xB2LW4CVTysT5uMmjqBA2Wnj1b4iqwSlRHE00d1fB+xcjw0Z6aXhoZTIemeoXr6aQZMo4hrR/JWux05fLoPY0fxGqlIQ7BI3lMZQwL+v/haDib88XwdajHAC0L0gBohMEKRfBAgJ6OBCEgIQgyAKCdp9BGhDU76Nbof+cvWF/CB5vzIHNtSwghB5rKJ26YllDujkYM1P9MbXXiPQaEQUhkZVFTkZ6StGTRnIgmrzMynpYT+J4vxbvE9UY0izdyuBERsYJvSeD431qNM0g7Ce54ydVsPUwBwJcWE10a2kBmZJiiTIOI0kUkSIhBooUJVGMRImYFiIMwrwc7YAKK+sMwpSodfEqLWhQNVlRo/huqBq81+qEyoWQ4F6wuZYDPgaQjLd7e9Mg74GA5AIh3k9y7sok6/O+UuvoZdZPcu2iOwAIBgRpn1cPhPivj+fBu408CHA+kveR7kvPQit7PwC27zvrQuC2znmT59nvzXQx6Puze6B5tLCzPr5ayVZuXy/dchUnr3ns4qRdKtyoFOxKwQ3lCbs8YZfGXZUxuzKWbSmP2uWRbFuulM/Nj968P5U/fDDbrK39Ap4nztLvAqxDAAAAAElFTkSuQmCC" nextheight="378" nextwidth="1200" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><br><h2 id="h-pyth-confidence" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Pyth confidence </h2><p>We are back to Pyth and it's "mysterious" ways of working. Most people will assume since Pyth is instant, and they are pulling the price themselves, that the price is what it's returned. Simple right?</p><p>Not exactly. Pyth has confidence (unlike you) where the confidence is a +/- bracket where the price can be. </p><p>Simplest example is when you get the price of ETH at $2000 and Pyth returns $2000 with confidence of +/- 50. Now the price can be 2k, or 1950, or 2050, or 1967 (1969 for you old folks...). Ok, ok, but what's the issue here?</p><p>The issue is that your project will assume the price is X and allow things to happen based on that X price, be it a liquidation, or allowed borrowing, or let you 50x on your YES position on "will dickbut will rise by 6.7% by the end of week" (I spend too much time on X D:).</p><p>Where in fact the price was not X, but X+y or X-y... So how do you fix it?</p><p>Assume the worst case scenario. When borrowing the project should assume the coll token price is X-y and the borrow token price is X+y, aka. always favor the project over the user.</p><br><h2 id="h-1-usdcusdt-1-usd" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">1 USDC/USDT == 1 USD</h2><p>Did you happen to use stablecoins in your vault? If so how do you price them? Of course it's 1$, it's a stable coin after all! Why would you need a oracle for it?<br><br>It's 2026 and bugs like this still exist (some <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/duonine/status/2035628453048021340">Morpho vaults can confirm</a>).</p><p>The problem here is that you are either skipping an oracle all together or using one that essentially hardcodes the vaults of stable coins to 1 USD. And don't get me wrong, this will work 99.99% of the time, however when it fails is when you will get wrecked.</p><p>The correct way to do it is to assume everything will change it's price some time in the future. Assets will rise and fall in value, stable assets will depeg, everything that can happen will.</p><p>oracle setups that require 2+ feeds but also need to support single-feed assets like rETH → ETH</p><br><h2 id="h-only-for-builders" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Only for builders</h2><p>Building anything that deals with oracles?</p><p>If you have a mainnet launch, upgrade, or token event in the next 60 days and your contracts haven’t been re‑audited, you’re running on luck.</p><p>Book a security audit review call with us here:</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://phagesecurity.com/request-audit"><u>https://phagesecurity.com/request-audit</u></a></p><p>or hit me up in my TG at<a target="_blank" rel="noopener noreferrer nofollow" class="dont-break-out graf markup--anchor markup--anchor-readOnly" href="https://x.com/@Pyro3b"> <u>@Pyro3b</u></a>.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <category>oracles</category>
            <category>vulnerabilities</category>
            <category>web3-security</category>
            <category>oracle-bugs</category>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/25297fa58439669c5e93878fc0a3dcc979004dc9e4e7b626e9096bdd84dc565d.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Hot and Cold]]></title>
            <link>https://paragraph.com/@0x3b/hot-and-cold</link>
            <guid>WuJ2rqeJlECijSl2ko3u</guid>
            <pubDate>Mon, 09 Mar 2026 05:57:58 GMT</pubDate>
            <description><![CDATA[If I ask you what is the most important way to improve your auditing right now what will you say? Maybe you would say to try different methods like to audit top to bottom, or follow user flows, or tell me to try AI or the most common - "just read code". What I would say is to audit while hot, so go and increase your AC temperatures, because it will help! go on, do it before you continue reading, just trust me ... Now for all of you who trusted me, thanks... and never trust anyone (especially ...]]></description>
            <content:encoded><![CDATA[<p>If I ask you what is the most important way to improve your auditing <strong>right now</strong> what will you say? Maybe you would say to try different methods like to audit top to bottom, or follow user flows,  or tell me to try AI or the most common - "just read code".</p><p>What I would say is to <strong>audit while hot</strong>, so go and increase your AC temperatures, because it will help!</p><p>go on, do it before you continue reading, just trust me</p><p>...</p><p>Now for all of you who trusted me, thanks... and <strong>never trust anyone</strong> (especially me) because that's not what I meant by auditing hot.</p><p>By auditing hot I mean to have X time of auditing (be it a few hours or a day or 2) before you are "hot", and when you are hot you would notice an improvement in your ability to understand and break code.</p><br><h2 id="h-sales" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Sales</h2><p>This may seem a bit off topic, but trust me it's important to know it.</p><p>In sales you have the term "hot" and it's when your sales guy gets into the mood of selling and he is performing at it's best. His close rate increase, by 20%, 30% sometimes 50% or even 2x and he becomes a "selling machine".</p><p>But why is that? </p><p>There are multiple factors and multiple prerequisites in order for this to happen, each playing a different role. But it usually goes like:</p><ol><li><p>Bob has a good sales call, he feels confident in the product and himself</p></li><li><p>He tries to sell the product a bit more, he asks more questions and fights more no's</p></li><li><p>Bob gets the sale</p></li><li><p>Bob is now even more confident in what he is doing, he truly knows he is doing gods work</p></li><li><p>You can notice that in the tone he uses, the words, the amount of questions he ask, the hunger to make the sale </p></li></ol><br><p>Where am I getting with this...? </p><br><p>Well it is the same here, usually how it goes is:</p><ol><li><p>You find something interesting</p></li><li><p>You think it's an issue and you start diving deeper</p></li><li><p>You find a High or an interesting Med and adrenaline hits you</p></li><li><p>You are now more curious and start looking further and further</p></li><li><p>You find a few more interesting edge cases, the spiral continues</p></li></ol><p>Sounds familiar ?<br></p><p>Do you know how to ruin your streak? Take a break after the first finding since "you've earned it".  And if you are the one that would take the break, then try not to do it</p><br><h2 id="h-taking-a-few-days-off" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Taking a few days off</h2><p>Similarly you may have noticed that if you break your audit with a break for 2 or maybe 3 days then the code feels off, the issues don't pop out, you are slower or even tired. You think to yourself "I've already looked at this" or even if you dive deeper it still takes you more time (to find something interesting) than before the break.</p><p>Maybe it's my terrible memory, but if you have felt this after taking a few days off then you know exactly what I mean. The context you built up in your head - the relationships between contracts, the assumptions you were questioning, the edge cases you were tracking - all of it fades. And rebuilding that context is never as fast as building it the first time.</p><p>But do you know what the worst part is? Some of those questions you had in mind before the break, you may have explored them to a point and your brain will think they are answered... however that is never the case. The hard to find, interesting bugs come from constant back and forth pushing between you and the code.</p><p>You go for the bug, but X stops you, you try another path, but Y stops you, you try to configure Y and move past it and you do, but Z stops you... The difference between finding something rare and thinking this path is secure is the ability to push forward, challenge obstacles and overcome them.</p><p>A junior will check and step after the first require or if. A senior will always try to find a way to move past it. And due to this "break" your brain may think that since X was there then this bug is invalid...</p><p>So the advice here is simple. Don't take multi-day breaks during an active audit. If you have a 2-week audit, treat it like a 2-week sprint, not a marathon with rest stops. The "hot" state is fragile, and a 3-day break in the middle can cost you more time than the break saved you. </p><br><h2 id="h-how-to-take-a-break" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to take a break</h2><p>So I just told you not to take breaks, but let's be real... You probably can't audit for 2 weeks straight without breathing (unless you are like me of course, cuz I am better). You are a human, not a machine. So how do you take a break without killing your streak?</p><p>Half days.</p><p>Wake up early, get your focused hours in while your brain is fresh and you actually have the will to do it. This is when you are sharpest. No distractions, no fatigue, just you and the code.</p><p>After that, the rest of the day is yours. Go outside, touch some grass (or women, consensually of course), do whatever you want. If someone sends you a message you can always respond, but don't go opening Cursor and start verifying that edge case "real quick". That's not a break, that's a half ass audit session.</p><p>Why mornings? Because your brain is fresh and you actually want to work. Try auditing at 9pm after a full day of hiking or going out. You'll be reading the same function 3 times and still not getting it. Your focus is a limited resource, spend it when you have the most of it.</p><h2 id="h-finding-bugs" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Finding bugs</h2><p>This is where it all comes together.</p><p>When you find your first bug in a codebase, something shifts. Before that first finding, you're reading code. After it, you're hunting. The code is no longer "probably fine", it's proven to be breakable. And if it broke once, it can break again.</p><p>That's the confidence boost that makes you hot. You stop giving the developer the benefit of the doubt. You stop skimming over that weird edge case because "they probably handled it". You start pulling on every thread because you've already proven that threads lead somewhere. You start digging deeper and deeper and maybe coming back to old invalid issues with a new knowledge of how everything moves around.</p><p>The more bugs you find, the hungrier you get. Bug number one makes you curious. Bug number two makes you suspicious. By bug number three you are looking at every function like it owes you money. The code didn't change, you did.</p><p>This is why auditing while hot matters so much. It's not about being smarter or knowing more. It's about being in the state where your confidence and curiosity are both maxed out, and every line of code feels like it's hiding something from you.</p><br><h2 id="h-so-what-do-you-do-with-this" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">So what do you do with this?</h2><p>Next time you find something interesting, don't reward yourself with a break. Reward yourself by going deeper. That first finding is not the finish line, it's the starting gun.</p><p>Stay in the code. Stay suspicious. Stay hot.</p><p><strong>Because at the end of the day, it's not how many bugs you find. It's how many are left after you.</strong></p><br><p>Thanks for reading this far and as always a shameless plug:</p><p>Founders and builders if you are looking for an audit you can check us out at: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://phagesecurity.com/">https://phagesecurity.com/</a> </p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/e951f5e862b8dd4f8a7a98b1e0a4bc8b3710723390232a93a20bd6b1b386efe5.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[A Realistic Web3 Security Maturity Roadmap]]></title>
            <link>https://paragraph.com/@0x3b/security-maturity-roadmap</link>
            <guid>KIgZpfkWo7MQM9c4psCM</guid>
            <pubDate>Thu, 05 Mar 2026 07:08:34 GMT</pubDate>
            <description><![CDATA[If you audit too early, you are paying for feedback on code that might change next week. The report doesn't provide a lifetime guarantee. If you launch without one, the market will audit for you and cost you your TVL.

This article is the roadmap for the security evolution that needs to take place in every Web3 project.]]></description>
            <content:encoded><![CDATA[<p>You have momentum. You have partners lined up, liquidity commitments in place, and a community in Discord asking "wen mainnet." Someone on the team says: "We need an audit right now." Someone else says: "We'll do the audit after launch."</p><p>Both of them are wrong.</p><p>If you audit too early, you are paying for feedback on code that might change next week. The report doesn't provide a lifetime guarantee. If you launch without one, the market will audit for you and cost you your TVL.</p><p>This binary view of security, where you are either "audited and safe" or "unaudited and reckless," is the biggest driver of preventable hacks. Security is not something you only care about right before launch. It is a maturity curve that has to grow alongside your product from the ideation phase to full grown protocol.</p><p>This article is the roadmap for the security evolution that needs to take place in every Web3 project.</p><p><strong>## The Maturity Levels</strong></p><p><strong>## Level 0: The Prototype</strong></p><p>You're early and still working on the overall architecture of your project and how you want it to look. The product surface is still being explored and discovered. Your team is learning what should be on chain vs off chain, what should be configurable, what your immediate priority is, and what is still experimental. Clarity is what matters the most in this stage.</p><p>Your job here is to get a clear understanding of your system on:</p><ul><li><p>The core user flows</p></li><li><p>How funds and critical states change</p></li><li><p>What assumptions you are making</p></li></ul><p>Write those as a living doc the team updates as the project evolves. This is also where you list likely "future upgrades" so you are prepared and making adjustments for them.</p><p>This is also the stage where many people forget about basic key management. While some devs are actively committing secret API keys or private wallet keys to GitHub, others are using their degen wallet to deploy their app. It's fine if it's just your closed-source beta, but some tend to forget and run with it until someone catches it.</p><p><strong>When to level up:</strong> When the core architecture stops changing every week and you are building something you can stabilize, test, and review seriously.</p><p><strong>## Level 1: Launch Hygiene</strong></p><p>As you grow from the basic MVP to adding more features, you enter Level 1. It is the phase where you are continuously working on programming and adding new features to your smart contract. Your codebase is getting bigger, as is your attack surface.</p><p>It is also the phase where you need to focus on extra work making the code clean, stable, and understandable. Most early hacks are not sophisticated ones; they come from minor mistakes that were overlooked because of messy code where basic behavior is unclear, edge cases are not considered, and intent is not documented for every new feature that is added.</p><p>- <strong>Complexity hides bugs</strong> — Develop the habit of refactoring code, using clean naming and proper structure. Simplicity is crucial when coding in any language, especially when deploying on the EVM where hacks are everywhere.</p><p>- <strong>Pick proven patterns</strong> — and well-used libraries, especially for sensitive stuff like auth, roles, and upgrades. OZ and Solady exist for a reason.</p><p>- <strong>Write a small set of tests</strong> — that prove the core flows work as intended and that the obvious fail cases revert. Simple function tests without malicious intent (deposit, claim, withdraw), simple user paths (deposit =&gt; withdraw, stake =&gt; claim =&gt; withdraw), and basic access control checks.</p><p>- <strong>Treat deploy and admin keys as high risk</strong> — You don't need a multisig yet, but keep them separate from everyday wallets. If the key you deploy with is the same one you're aping memecoins with, you have a problem.</p><p>The goal here is not to be sure there are no vulnerabilities in your codebase. It is to make sure your codebase and your approach are solid, so when the time for deeper testing comes, the team doesn't waste time on basic stuff.</p><p><strong>When to level up:</strong> When the code is stable enough that you can freeze scope for a bit and start trying to break it on purpose.</p><p><strong>## Level 2: Audit Ready</strong></p><p>Now that the scope is stable enough, the team can perform various in-house tests and call for an external auditor to review the security implementation. Security in this level should be thought about from the perspective of an attacker who would be trying to make your code do unintended things.</p><p>- <strong>Document the attack surface</strong> — Have a clear understanding of which parts of your product are most likely to be prone to security threats. Document the flows, assumptions, edge cases, and failure scope. If you are doing integrations, make sure you've followed their best practices and thoroughly read their docs.</p><p>- <strong>Add fuzzing and invariant tests</strong> — on the modules that matter most. Coverage is an inaccurate stat. It simply determines if your tests go through a given path, skipping the fact that you might have tested it wrongly or with the best possible conditions. 100% coverage of happy path tests is worse than 50% coverage that actually tries to break your protocol.</p><p>- <strong>Implement mutation testing</strong> — where it fits, so you can prove your tests actually catch broken logic. Mock tests will give you mock results. Stick to the real implementations.</p><p>- <strong>Work closely with integration partners</strong> — to validate your assumptions by reading their docs and, if possible, getting the team to sanity-check your integration. If you are doing heavy integrations, reach out to them, they know their code best and have seen many projects integrate beforehand.</p><p>- <strong>Run an internal review</strong> — where devs are actively trying to break the product they make. They are the ones who know their code best. Set a time window that would force about 300-400 nSLOC per day. During that time, the only goal is to break code. Don't fix bugs the moment you find them; make GitHub issues and continue breaking.</p><p>Only after you have done your tests and reviews do you pay for an external audit.</p><p>With your internal testing, you should now have a properly defined scope for the external audit. Get only logic contracts in scope. Interfaces can be removed to reduce the nSLOC and the price. The external audit works best when you have reduced most of the noise and are letting experts focus on breaking your assumptions and finding edge cases that you somehow missed.</p><p><strong>One more thing, the firm doesn't do the audit, the auditors do.</strong> Brands are a big thing in cybersecurity, but the brand is 80% client communication and 20% delivering results. Most firms work with contractors, the same team of 3 can be one price at firm X and 2x more expensive at firm Y, for the exact same guys. Look at the individual auditors, their contest wins, their past experience, and ask for people familiar with the project type you are building.</p><p><strong>When to level up:</strong> You have a final report. You ship the reviewed version, resolve meaningful findings properly, and the product version that is live is the one you audited.</p><p><strong>## Level 3: Production Hardened</strong></p><p>Level 3 is the shift from "securing smart contracts" to "securing the protocol" as a whole. You are live, you are seeing your product used and functioning exactly as intended, and nothing is breaking. Now that your code is secure, your team is growing, and the attack surface is not just the code but the entire system.</p><p>This is where the biggest failures stop being purely contract mistakes and start being control failures. It's about securing the humans, the machines, and the procedures.</p><p>- <strong>Introduce multisigs</strong> — and move ownership and high-stakes operational powers behind them. High-impact changes like upgrades, treasury moves, and role changes should require a higher threshold. Require hardware wallets for all signers.</p><p>- <strong>Allow single roles to pause</strong> — Create friction and stop attackers. It is easier to explain downtime to users than to explain why their funds are gone.</p><p>- <strong>Simulate before signing</strong> — Develop a habit of transaction simulation and avoid blind signing for high-value actions. Spoofing happens quite a lot.</p><p>- <strong>Treat your frontend, DNS, and dependency chain as part of the protocol</strong> — One hijacked domain or poisoned dependency update can drain users even when the contracts are fine.</p><p>This is also the phase where you start having real social media and community presence. As the team grows, this opens up possibilities for social engineering attacks. It is necessary to have your entire team be very informed about these types of attacks, as the trust of your entire protocol lies there too. It is very common for attacks to originate from a team member who got compromised. Assume the worst and have processes for it.</p><p><strong>When to level up:</strong> When you have good security policies in place and weird behavior triggers a calm process, not chaos. You can coordinate quickly, execute safely, and ship fixes without worsening the problem.</p><p><strong>## Level 4: Continuous Security</strong></p><p>Now, security is part of the process and not some sort of milestone you are trying to achieve. With every new change and every new update, you follow the security procedures to keep the whole system free from security threats.</p><p>However, as you ship changes regularly and the integration surface keeps expanding, drift becomes the main enemy. Small changes over time can create blind spots, and eventually, something might slip through. Level 4 is all about not letting that happen, or catching it before it causes any big damage.</p><p>- <strong>Continual internal reviews and a retainer with external auditor</strong> — to make sure every new update or feature you ship is audited and safe. Move from "one-off audits" to a continuous relationship. A retainer is cheaper than scrambling for availability before every release.</p><p>- <strong>Active automated monitoring</strong> — of on-chain and off-chain changes, splitting the alerts by team and authority level. Implement monitoring that alerts you to invariant violations (e.g., solvency check fails) rather than just "large transactions." Consider building a bot that can automatically pause the contract if it detects a critical invariant failure.</p><p>- <strong>Introduce a bug bounty program</strong> — so any security researcher can have a crack at your system and notify you about any flaws before threat actors find them. The more eyes, the better. A $50k bounty is cheaper than a $10M hack.</p><p>- <strong>Keep a lightweight integration drift check</strong> — so when oracles, bridges, routers, or other key partners change behavior, you re-validate your assumptions.</p><p>Monitoring here doesn't mean alert on everything. It's about sending the right info to the right person or team so they can react in time and aren't buried in noise all the time. This is where good teams start catching problems in private, through follow-up reviews, bounties, and monitoring, instead of learning the hard way in public.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/3383e6ed0a970c2b845a5266c60e733ee725f2924ac1114e4d930c2a6ab64b6b.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[The most common vault bugs (from real audits)]]></title>
            <link>https://paragraph.com/@0x3b/9-common-vault-bugs</link>
            <guid>4gxPtOyF1v0Nc0qgAoGL</guid>
            <pubDate>Mon, 23 Feb 2026 06:13:43 GMT</pubDate>
            <description><![CDATA[Real bugs we keep finding in DeFi vaults: first depositor, bad debt, MEV, lockup gaming, insolvency, broken reward handling, and yield killing routing. If you’re building or integrating vaults, read this before mainnet or you’ll learn these the hard way.]]></description>
            <content:encoded><![CDATA[<br><h1 id="h-building-a-vault" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Building a vault</h1><ol><li><p>First depositor attack</p></li><li><p>Being first pays too well</p></li><li><p>Front running bad debt</p></li><li><p>Gaming the lock up with 1 wei</p></li><li><p>How dust becomes insolvency</p></li></ol><h1 id="h-integrating-with-vaults" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Integrating with Vaults</h1><ol><li><p>Your withdraw order is killing your yield</p></li><li><p><code>convertToAssets + convertToShares == wrecked</code></p></li><li><p>Tokens sitting there, unclaimed, forever</p></li><li><p>Idle assets are stealing yield from your users<br></p></li></ol><h1 id="h-building-a-vault" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Building a vault</h1><br><h2 id="h-1-first-depositor" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">1. First depositor</h2><p>"<strong>I already know it</strong>",  "<strong>will skip this part</strong>" is what you are thinking. <strong>Then skip the whole article dumbass</strong>, because I am not only gonna talk about the basic bug, but will also include it's other variants. Now with that attitude out of the way lets continue.<br><br>The most common attack for vaults, done when there are no virtual shares or offset mechanism. The main problem is how shares are calculated:</p><p>Solidity rounds down and if <code>totalShares</code> is really small (like 1 wei) and <code>totalAssets</code> bigger than <code>assets</code>, then <code>shares</code> will round down to 0.</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/ace9756d2c37d58c90a36d9875e1246cd53b41690e3dcc17024d8dc6ff7e79c6.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAALCAIAAACRcxhWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC0ElEQVR4nK3R20sUURwH8CFEikDUdnMuuzsze86ZmTNnbmfG2Qu6uiGIf0RqPSmRlxV0vWcRa5H0koQ7CxlaUqIP9RhEjzv12N/Rc68bsxelorfgw4/v73cOHH4cpvFz/9vZ0vdP5fDjytfz5a/nK5Gzcni6Ep6Ww/fl8P1q/aRcPymHb1fD49XweC08anq9Gr7eiByuh4eb4auNem29Xtuq17bCYOtbsP35xVojPGQ+HNwbx/7E9Eg/9TnJYaHLAnpZ4b/YnfobDjktScW9wir7y7PM4fO7V3rTaWhK0BAhSUEiNsnIaoUk0CWIZRQFEehRhaR1uXPTFKEpo0hrkkZE0eweDuzdv8NUd6eYLj4NsYmMQdXC0HC80UxuwqYjfmY8k5vwvHzWc6lhuJad9wdV4lFvzHFHEc5gI4+wbzrD2BxCOEO9ItIziqJTQnzqXLspV2YnmerTKaabTwJdkDQTmQY0oe4ZgwUJGFBziTusu3md5hKyphJfpzns5DQ7L8h4IKGwKbVJaeHaGbIpKIgK0yNUZm43N+jmU5DEE6iPB308uMFJ/awY40E/J/ezYoSTYwKMWk6+EZHifDougLZOjrUDjAuQTSlMD995oIuHQLOQaSIDpgmxh6lXNGnB88dMOmpZnmuZ1DAsnfiOjTSL2AXqFRU9h80hRc+YTkG3ouB6txQ9p6rENUjWc68PgMrsVHuDJNBSkuZjx1Vt3c4PDo1D1dWMjJO9RbNF1x+WgUZo3s0WbH/U9otJYHCixkuYEzVBxs2ABVnnRMyJqiAqKaAxvYnmBpVpppuXEWFTSjyBBiLgL6jjj+HF0UXbnvCXf1CZZhguJsAeNv0/yK0Q4wFzla3MTDKNHwfvXi4Ee3PVZ23B07ngyVwtMh/sLgS7C9XH85FHLYvVh6XIzmJ1p1TbKQUPSrWtpu2l2maptlkK1peC9aU3OyuNL0e/AFK/+zqOjhC7AAAAAElFTkSuQmCC" nextheight="340" nextwidth="1020" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>The common patterns is:</p><ol><li><p>Attacker deposits 1 wei asset for 1 share</p></li><li><p>Attacker sends 1000e18 assets to the vault</p></li><li><p>Vault share ratio is 1 share = 1000e18 + 1 assets</p></li><li><p>Victim deposits 1000e18 assets, gets minted 0 shares</p></li><li><p>Attacker's share is worth 2000e18 assets</p></li></ol><br><p><strong>Stopping points:</strong></p><p>0 shares cannot be minted </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/76abec4407019e39ae824bcea6f939a90a06727b7fb0838dd95ba4e60ba9ae68.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAVCAIAAACor3u9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAEoElEQVR4nKWU22scVRzHB4oWyUOTdS9z27mdmXN2ZnZ29sxlZyZzNtntNknTpLT+C7ZFsdndCtViKbSaUonNprUtsVA0TStUkhRBsfgX+AdI+yT46JMIvvgamZlNLyEaUPhw+J4zw3zndzk/avuvu2u33vnmi7OPbr23ubqwdbe7uZqwcWdhK6G7eWshpfv4du/x7d7WjYz+5kovY2O5t7HcT7jeG7LU31jqby69v/37d9T3X/fnFPLZ6an58236eJPjMQ89VnV56CVCc/8bPHJG5dofT25SPzw4pwHn6GESdEg1js16WMXB/8dyQ8Xwfvt2mXr4+WnqAPsmD3O0WuC0Iq/lOSXPKQUOpFotcMma6UyUeC3PyNkLpX+AFrSRgvjs4SK1Njh1aFScwH5gYB/VoGyE0Vwcz2GnY9Ziz6oGuN4K6lalgk0jxKZrGUB3GtGxRjBj2UREdVaq7G1QlJ6uf0Kt33ibOsirqm6Yzvj4YT9sk/bxujsZkFmPTGEnQKruNkgw3ori1mRrOpo4YjfaXi3EuGk0prm9vr7L4DR1kKcFjZV1qeLoVc+oR9AOXdIxcMRIepEDLKiKqM6DalmtiQiLqM7wgC5rJdnIMVKekfKcnOdAkXvZAKUGi5kBy8koyyzLKsj0fTLtkSm16rMc4BVDgragWgrCgmoJqsUIiBGQDDGAGJqBpjcAdCRoc4qxy+DZ2lXq/uCFQYnXmLIqqJbpkqrb1HEsSkjVHRy2LY/gsJ0hwZqoGK4/1QhmouhYGM02ghmjHsu6s78BLSSiwIGMYqqznsnWAgdK/E6zMXKekXOMlKOlApuc72HwYOVMYiBpnGKWgYnsCBhepRYC3RFg3XQJtENoh8iOZN2B1YaOY2RHCnLUqo/sSMdxGVRfzv4rBl8tDg1oUauopgkthGMn6rhpAVReAc4EsBplkBQzCYgDtICyKEuC9kLz+xlwMqLLSTbUqh9MHA3IDKw2SDwbxXOkeSLN8lFkR5xiZinalx2Dq9T962kNJE1QLVpAXNozWUsA5KkVT624asUHyBXU2p536l8Mnn75wgBmTfa8aDlGGqOFMVrIDZGSIjNpYdMgsgonQ4VJSafLsBcYhebBbgNWqpRVqwxMXjFlzZY1G0AHIBdAR4ZYTGMqA1NBWII2LaAkON2XNFuCmEdOGWJW0nlgStAWUV1QrZGCuGPwOssIKtBd0p73yFTVIa32W1E8NzF5gjTnCZkfJ7Px4Xkctj3SiVqzyVVQa5PNk83myTies9yWFsxA74gIbR3HPpl2oraJoySCe1epB9fPUG9wSYokPY7nfX/abky6pKNaPg5bHpnKfscjHSfqmG5MCyhHSyUejNHlMVoYpcVkVNBigZGGGU6SKRW5NEX3rlFrn54aKWkyNOhh2yVzKhsGTLplhEomnj/KXsvEzjalPGzc7HykKP18b5F6dPNd6gBb4LRDtHKIVkZpkImdbQYY3X2yH4z8Wl74ZX2J2v7z4Y/rH9251l35eGHlytmVK92MweXu4HIv4VJ3cKk/uNRfvtgfvMryhd7gQn/w4XPOJXyQsHrx/E+r17Z/ffI3zXyjAjmx8I0AAAAASUVORK5CYII=" nextheight="456" nextwidth="704" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Donate 51% of the victim assets in order for him to mint 1 share and you will steal 25% of his assets (2 total shares - 1500e18 total assets, 1 share is worth 750e18).<br></p><p>Vault does not track assets by balance - look around any find if there is a way to increase that variable without increasing the shares. Some interesting variations I've noticed trough the years are:</p><ul><li><p> deposit and round with down withdraw to receive less assets and                       increase <code>totalAssets</code> (repeat that a few dozen times)</p></li></ul><ul><li><p>Liquidate your position so that you have less shares and the vault has extra assets (the vault had some extra functionality)</p></li></ul><br><p>Offset of 1 with <code>shares = assets * (totalShares + 1) / (totalAssets + 1)</code> - The attack is no longer profitable, however the shares value can still be increased in order to grief the vault. </p><p><br>Bigger offset - Neither profitable, nor it changes the ratio that much, is not considered an attack.</p><p><strong>Fix:</strong><br><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC4626.sol#L245-L257">OZ have made a really simple and easy to implement fix</a> which uses <code>_decimalsOffset</code> to make virtual shares. But basically you can redo <code>_convertToShares</code> and <code>_convertToAssets</code> to be:</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/f1708cefdd78b46cd4806cb2cda6726477e9d8f04ded2069067c0baa910612bf.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAALCAIAAACRcxhWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC/UlEQVR4nH3QzW8TRxgG8FEbJYKkSVgcZz9mPV6Pd3Z2Zz37bcdkSSIw6jGXXntC0BNVT61xoiRO2gAJUCRS5VYgtmkViVKlKoJLTj3Ybk/9H3rrFa6pdm1SlUpIP41ePfOMRjPg5PWT3vPVP483+7+s9Y/W+kfr/aNm/+eNxPON3rP13rON7uF677DZO2x2f9zs/tAc6HWavc5mt7XZbW11D1KPt7qPvh74/dH28f7Gyd/HYG/t2qcL8aXrlyU7lLErF70UT3ly0VOKp6H3n13dfVvjsu68A1nBiKT/8fg2+PLzTz6YzkFkQo1KiEiIyMiAGoXYgpopI0NGRQXpCiKKlkgLREnypJnQ6HBIKYhAjeaL1qiQO364Dm5cWwYjs7hAGDZDYmONueGlIKo57kJUvuJFNccJq6Hv2zZjTsDtIg28qFauXDHYXBDVdBqV3Nj1F5kTV6of62aZmnbASwHnYEp5sVsHX3y2DMZECRFRKTg6IxrVWUR4FSKqEZfwquXNU6eCsKkaIcpTbHimH1NnzvTmTG9exUzFjDpzBq9YXoyKJYhtucBmFQ2MZl/dW/33gqls/mxGncjmPsoo44I0lYXpII8L8oQAJ2dykxk4nklXQRrkZ9LaaXJGkCYzMElmchm5AD6cebk7uGBExIg4OithltNM7l70/CXHT76o5C8yi5e57VoWt6zI5Zi4rr8YhDVMfM9fIlaZuxdLbmywahDVijQyqR1yu+L74Jz6crcxfIGo6jLEkcFNbBm84pSX8phh6rMgthPzeczyxJVVXWeRHcSlcMEOYohMZF3ABcvyqoOE+ReSHFuiUgAT4tsXnJVggWak/DvOi9rpLEh5QdSENDnNz4vawP8PzioFMJZ9tbMCblxdBmBmQlBHp+HotPJ+Y8KwMybA95vKqgCce3GnAU7eHP70fePpfv3pfr3zXb2991Vnr955ONT+tt5+cLP94GbrfupuameltbNycKeRWmndGjrYXj3YXm1/k3iy1fj1/tbJX7/9A0xf/Hf+A2UfAAAAAElFTkSuQmCC" nextheight="336" nextwidth="1019" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><br><h2 id="h-2-being-first-pays-too-well" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">2. Being first pays too well</h2><p>The problem here is that most vault that distribute rewards do it time based (epochs or dripping), but they don't account for the fact that sometimes there may be no one to claim them (no depositors).</p><br><p>The common patter for this is:</p><ol><li><p>Vault is creased and immediately starts distributing rewards</p></li><li><p>The first depositor/staker comes after X hours/days</p></li><li><p>No matter how much he stakes, since he controls 100% of the shares he gets all of the rewards for that X hours/days where there were no stakers</p><br></li></ol><p><strong>Stopping points:</strong></p><p>They may handle this, but what if everyone leaves the vault for some time and one user deposits, will rewards be paused or will he receive all of them for that missed time.</p><p>Distributing rewards based on depositor enter time - what about the rewards that were generated when no one was in the vault, do they get stuck?</p><br><p><strong>Fix:</strong></p><p>There is no code specific fix as the issue is more of a design/business logic related. However structurally it should distribute rewards only when <code>shares &gt; 0</code> and track the start reward time the moment the first user joins. </p><br><h2 id="h-3-front-running-bad-debt" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">3. Front running bad debt</h2><p>If the vault has any external factors that will result in a profit or loss, but can't be put on chain with real time access, or can be observed before they happen, then share price can get MEVed.</p><p>This description complicates the issue a lot, but it comes to:</p><ol><li><p>User1 will get liquidate and will result in bad debt for the vault</p></li><li><p>User2 front-runs the liquidation TX and withdraws</p></li><li><p>User1 is liquidated, lowering the share price from 1 to 0.9</p></li><li><p>User2 deposits again</p></li></ol><p>User2 avoided the bad debt socialization and essentially MEV  the vault in order to keep his assets safe from bad debt.<br></p><p><strong>Stopping points:</strong></p><p>Bad debt is not socialized  - that's another issue. What happens to the losses if they are not accounted then they will lead to insolvency.</p><br><p><strong>Fix:</strong></p><p>If such events can be observed before they happen, then consider making users request to withdraw, followed by some time delay (1h, 24h, etc...), when after this time they will be able to withdraw.</p><br><h2 id="h-4-gaming-the-lock-up-with-1-wei" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">4. Gaming the lock-up with 1 wei</h2><p>Deposit -&gt; your assets are locked up -&gt; after T time you can hold or instantly withdraw. The most common issue I've noticed with vesting is that the vest is usually set once on the first deposit/withdraw (D/W for short) and every D/W after just adds more amount. This can be exploited by D/W 1 wei and when the vest expires to do the rest.</p><br><p>Example:</p><ol><li><p>User1 deposits 1 token</p></li><li><p>His token is locked for 1 week</p></li><li><p>He can now withdraw, but he deposits the rest 99 tokens</p></li><li><p>He has a deposit of 100 tokens and can withdraw any time</p></li></ol><p>Same for when deposits are instant, but you need to vest in order to withdraw</p><br><p><strong>Stopping points:</strong></p><p>Every action resets your vest - can we D/W for someone else and reset their vest?</p><p>Each D/W is it's own position with it's own vest time and amount - Accounting can get really messy as for each user we need to track multiple positions and their total combined value. Adds a lot of extra logic.</p><br><p>Fix:</p><p>Best recommendation is to reset the D/W vest on every new instance and prevent other users from making deposits.<br><br>However if you want users to D/W any time without punishing them with the lock, then consider making each D/W into it's own position, and track user total into a mapping. This will add a lot of complexity, but when done right it's the best solution.</p><br><h2 id="h-5-how-dust-becomes-insolvency" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">5. How dust becomes insolvency</h2><p>By far the most common of them all. But what is it?</p><p>As we already know solidity math is not precise, all divisions round down and if you are rounding down on how much shares to burn then you are essentially "rewarding" the user (even though the amounts are dust).</p><p>Simplest example is right here, where the share price changes and we may burn 1 less shares, essentially giving the user 1 more asset.</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/33371e20584754417fffe7717df6ea917d860ec7fb793f7ace5394316b3b6015.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAOCAIAAADBvonlAAAACXBIWXMAABYlAAAWJQFJUiTwAAADWklEQVR4nJ2S22scVRzHhzaFJq01u8nuXM6ZM3Ouc86c2dnZcS9JttHUQpW++Cx2W0ErormYptS0UJFedhMoQmWT6lNAW7SF4ov2zQf/D9s8CX0XfI3MznYbC+2D8OHHj+8cfh9+54yx9/SbzUvvf9c7u3njTPfyB731EWd6X+Z0upeecfE5Ny90NtY6G2tnexf2sdLpLp3Lub7Y2Xv8wPj9p9V3gpm1D98U5+Ydnjg0BWyIw2qAJSMcVssSXgM8yU6yWlb3kedggBuk4478+9Ft49edzw5NE8g0wMplClEJcABwALGANARYARpCqgHVkGpEwyzPkJAOycL8JFajBjP9us2ePrxl3N/6aPwIjFgokHBtDEkljNpCtTCLKWGRlAFjCPmcUuRjG0kuGyxoYJa4pIJZQkRq+8r3qRKiqhTymZZSBpn1QBE+uds17m+dPzABNdeN2mz9jXZUOx7H7Wb73Wb7VL0xW1HhTL391tzbJ9oLs62FtHkybZ6Ust5snZqdOz03d/r4/Hu1xolKnHIeKBF4RCgRaKkQDQ9Ourv3usaDrfPGQWvaITZWgMcW4tOma2PpYOXgsGQTGymP1XyWctXCIjW9oGC6LomISDFLWFD3WNX0VMEix8p+Xo+V/RIgxlF7997GQDBmm5BgVpV6hoV1Xmn5IhFRk+q67UumG0w3INWTZXfSRFM2KQFWtLyChQoWysOi5WW5TfJaskkZMOOos/tj77kA+CHhCWIxZBGg2uUVyHQJMEgjX8Q2CrJBtl8w0WjiYBzNmxd4QWBZkGKZMl2HJKomC/k7V+J5Gc1Q3Rh8agS1FqSa6rqImixqWigYaV4p6H9ijNkWpA4OHRaZSGKW2Eh6tJotRCsujxGLXR77IrY8CWmUr2hC/rLp+wSbuSDbQHhCE0U87oeprLZcHmdXbP6HouUVLW//Fb1KMOk8+WHD+Pnbjw8VsIOE53LiCRdxyCISJJDqEhi+2LAZ1VH+cszBBo93esYv258aY6Bok/Fp7/CUe6TkTUy5h4tgYsp9rez/bwpW9pv+dfeWsffPzqOdi3c2F+/0Fre7n293lzJuLG3fXN66vjTkWs5K/+vljK9yVvpXl/tXv8i4stK//Iz11f766vdXVv+4fW3vz9/+BdjvFmiLdE+4AAAAAElFTkSuQmCC" nextheight="722" nextwidth="1660" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>But how can 1 wei be dangerous? Usually it can't and these issues are Low or Info, however in rare circumstances it can cause insolvency. That's usually when the assets are fixed and accounted separate from vault balances (i.e. a variable instead                               of  <code>usdc.balanceOf(vault)</code>).</p><br><p><strong>Stopping points:</strong></p><p>But it also rounds in deposits, so it negates itself! - yeah as if there are gonna be the exact amount of deposits to withdraws. Users can deposit once and withdraw 1000 times.</p><br><p><strong>Fix:</strong></p><p>Simplest solution would be to use <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/Math.sol">OZ Math</a> and and simply round in favor of the system.</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/6b0215059f6e090329ea7637e34e0ab891c37c7bf20eb94cbbe37db55fee0b1f.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAJCAIAAADcu7ldAAAACXBIWXMAABYlAAAWJQFJUiTwAAACX0lEQVR4nGMwNLNT1TI6fvb6mdPXN6zduXHzvk9f/r978/PM6evnL9578/r71k37P3/829c7fcvWAzduPt2x++jEvhlPHr9bvGjN1CnzT527dfHqw2Wrtl25/mT+4g3Wdp6CwtJsnCK8ghIQxGDn7KOgoiUkJh0dHNpRUenq5GZtZTO5uSEnIcnTyys+NLS+IH9ibVVdfm5cRIS9vYOvi0dVVlZdfm5RakpabJy8iqashoa6iQkEyWtoyGtqyaqqC4hJIyyQU9ESlpRRMtC1DHETVZSXVFU287OX09O0DHAx9XOEMLySQ4Pz4ix8XOQ0NC18XFxiAzySQi18nNSMDdzjAj3igtzjAv0yo5wifJ0ifK18XWVV1bn5xEEWGJrZiUsrMbDw2Tv6REanl1Y2h0Qkp6QXZ+VWaOlapmWUJKYWGprYMTELcnKL8fJLQEKAjVOEiVkQEhRMzIJwBJFCCSJXr2A5FS0GFj7/0NiKutbZC1c1tPbNXrhqwoz5ptZO3ZNmdk+aqW1gwcDMw8DCx8DAysDAwSsoISAmDQ8ECBvORUMMSZlF0grqbDwiRRUNU2YvjkvO2bj9YO+UOVNmL4ag7MLK42evV9a3p2YVHT97feaClRD1WI3DYkF2YaWQuCwbj4i5jaurV7CrV7CTZ5CpjYtXQISTZ1BqVlFqVlF4bKqds4+5jWtcco5XQARpFiRlFkEsKKpoOH72ekF5/elLd89evqOgqsPAwIFALHzgIAIxiDcdZEF4bKqqlpG5jau4tJKqlpGCqo6qlpG2gYWQuCyvoASEhCBkNvEWAAB3t9bFd+V3BwAAAABJRU5ErkJggg==" nextheight="366" nextwidth="1288" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>In favor of the system means that you always give less assets to the user and burn more users shares.<br><br></p><h1 id="h-integrating-with-vaults" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Integrating with Vaults</h1><h2 id="h-1-your-withdraw-order-is-killing-your-yield" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">1. Your withdraw order is killing your yield</h2><p>Another simple, yet often missed vault bug. When using vaults as yield, or any other group of yield earning entities for that matter it's important on how and when you deposit to each and how and when you withdraw from each, aka your sorting of priority.</p><br><p>Simplest example is when projects have a basic FIFO (first in first out) order, where usually this order is like:</p><ol><li><p>Vault1 - 15% APY</p></li><li><p>Vault2 - 10% APY</p></li><li><p>Vault3 - 5% APY</p></li></ol><p>From first impression this looks fine. We deposit and fill up the first vault as it has the highest yield, then the second and the third.</p><br><p>But if you are a smart cookie you will notice that for withdraws it's the same. We always withdraw from the highest APY vault, meaning it's never fully filled. This will in turn decrease yield significantly.</p><br><p>Example:</p><ul><li><p>All vaults have caps of 100k</p></li><li><p>Vault1 and Vault2 has reached it's cap</p></li><li><p>Vault3 is filled with 50k</p></li></ul><ol><li><p>We earn <code>15% * 100k + 10% * 100k + 5% * 50k = 27.5k</code></p></li><li><p>User withdraws 50k </p></li><li><p>Vault1 <code>totalAssets</code> are decreased to 50k</p></li><li><p>Now we earn <code>15% * 50k + 10% * 100k + 5% * 50k = 20k</code></p></li></ol><p>Where as if we have withdrawn from Vault3 we would have made </p><p><code>15% * 100k + 10% * 100k + 5% * 0 = 25k</code></p><br><p><strong>Fix:</strong></p><p>Instead of using FIFO use FILO (first in last out) and sort the array based on the APY we earn in order to optimize for highest yield.</p><br><h2 id="h-2-converttoassets-converttoshares-wrecked" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">2. <code>convertToAssets + convertToShares == wrecked</code></h2><p>Imagine that you would need to figure out how many assets your shares represent. What function would your contracts? Most obviously <code>convertToAssets</code>, the name suggests that it will convert our shares to assets right?</p><p>That's the wrong answer. </p><p>The problem with it is they don't account for any withdraw fees or swap slippage, meaning that it will return an overinflated amount of assets.</p><blockquote><p>MUST NOT be inclusive of any fees that are charged against assets in the Vault.</p></blockquote><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/9ee4276569d1894a59d24760067010796af112ae62ff3dc77d0c002f9aa7ed24.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAICAIAAAAX52r4AAAACXBIWXMAAAsTAAALEwEAmpwYAAACEklEQVR4nI1Sz2vTUBx/FHbopTDIzNJulbF/xIOCDtSC3ZiT2FBS6VpbGqppZ1uyhCwtrzSE9sUmrUuw9QmmQqawHqygIoJ3T148ePCg4EG8eBHZHoQd/PX4HD7f9x6fz+f7vg/cx97HT1/evf/w+eu37z9+Pp0+Z2Lx5ZXV5ZVVJhaPLp0mJROLB/sUzRBO0UxQBheCIyYWp+gYYDneQBbsdCVFG7pjAw30Xl9t6cfcGrpj7PkNeU9rG6btSIpm2g7sdLHnm7ZTqe1izzfQwLQdA1kEsNN9fDCFna6BrLVLV0C1Lo/wxECW3usP3bGkaGoTmvY9qCO1pd8duNjzseeP8OTJdGYgy7SdoTsOegpA0QzBqcUoRTN0dImUILG+VRZr/HZxfSu1djm5waaE21WW4wuCmM2XEsnNdCa3fvU6AHOhcCQUjhACjtYcACAUjgTSvwVQtLb74JHahIezl9jzZ6/ePPQORnjiHz47jjx48fqtaTuJ5Oa1VIbfLrIcz3J8OpNjOV4Q75w5ez4yv/A3g3QmBztdkjebL6lNSCQ2WO5I6Ea+IIj50q2CIBaFSqW2KylatS6XxVpBEBvy3rkLF/9hQETLYm2noSha20CW2oQ7DWXojslsq3XZQFZBEKt1We/1kbUvKS2918/eFP7ridQmRNY++Rh6r489X1K0IBQhJzNG5hcIKHrx5Gz/ZPALHIz+XGY8sQYAAAAASUVORK5CYII=" nextheight="271" nextwidth="1042" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><br><p><strong>Fix:</strong></p><p>The correct function to convert shares to assets is <code>previewWithdraw</code>. It will return an exact version of what you would withdraw if you called withdraw, but without accounting any vault or user limits (aka. returns how many assets you have).</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/b3f74a44190eada6bba631f28eb9a860f8e4064f05072cd8bdd1110a2e044933.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAKCAIAAABaL8vzAAAACXBIWXMAAAsTAAALEwEAmpwYAAADIklEQVR4nGVTz2/TdhQ3U1WtQ/yoClkoiDAVrUhl0ooEUhFiY4cURaSNPFzTxJXdEuPade3UsWPXS7BDbZI4IXazb8ocTxhIFEFUqdU0+CM4TNO0wy6cuOzEiQu3iRmlIL766OnzpKfv0+fz3oPuOVt//v3Piz/+ev3m7ctX/1o2gCBoYOjggcNHBoYOBjhw+Eg/7fMgQp99Du0b7Fd+Wg9RDHfP2WIzuTVJESQ1IyoYnoaRVDQ2w2ZyP95YYHkRw9NoikjiNzOiskQy0dgsmsTx9DKMzFMMhy1RJM3DSApNERTDLZI09P/ba1CzG3rx7m3d3PIeliwbuA9cv9369bHndzbB/UazVbLscrXuP+pu3fda3kMHuNu7zxzg+Z2n6z/lVwgCR1HdKOc1wwFu0azUHIAm8UAZFI3NLGEYgSBzc6hlAzaToxgurxlsJsfw0lwiEZ+OsmxmLh5bIYhbqdQtgtANq2TZsqrphiVIcqMBpqYujYTCoWMnhkOjI6Hw6fGJ0ZNfvVfA8mJv57eSZXt+t2RtOsB9sr3r+R3P7zrA9fxO8BeGp9ckpWhWKIYLIEgqy4sLBJlVCqq2wfKiWann1vNr0juTP7Ko09spmpXezu81BwD3gQO8mgMc4DVbvgPcvGacu3Dx64lvz124ODF5vh8DRMbORMbGI2Pj4eOnTkROBzw0GukPHLoSjaEpAk3iMDI/HU8skvQiScPIfDxxneXFeOI6nl5muCzLi2gSx/B0oGaBIGVVyyqFbybP90c6dGgY2jf4LvlgryAYSanaBkmvsrwoSCqGp7NKQTfKFMM1W/4ds8rwEpddZ3iJpFdJms8qt0maNyt1NpMTJDVoI8jK1R++j393GYYRVds4c3ZyzyKGy7a7vZ+bngPcdre3vfvscfep53ebLb+383yVZm4mkyvE4jKGKWpBEoQ1kpQo6sa1a7mc7PrtolnJa0a726vZjc3GL7KqmZV6ybKjsVkIGthTIKuarOosL9YcwHDZkmXnNUM3yla1LkhyQdNLllU0K+VqfRM0ZxLw4Bf7j355LDioAMEWjYTCAe8f2n+91FdW7bsH3wAAAABJRU5ErkJggg==" nextheight="345" nextwidth="1118" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Same is true for the reverse functions - <code>convertToShares</code> and  <code>previewDeposit</code>.</p><br><h2 id="h-3-rewards" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">3. Rewards</h2><p>It's really common for vaults to not only distribute yield in the form of share price increases, but to also reward some sort of incentive tokens to given strategies. Simplest example and one that we cough recently on an audit is a vault that farms yield on Morpho, but does not handle <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.morpho.org/learn/concepts/rewards/">Morpho rewards</a>.</p><br><p><strong>Are reward tokens even handled?</strong></p><p>The most basic mistake — the vault integrates a protocol that emits reward tokens, and simply never claims or distributes them. They accumulate, sit there and get stuck forever.</p><br><p><strong>What tokens, and can they change?</strong></p><p>Protocols can add or rotate incentive tokens at any time. Does your vault hardcode them to one token - not good. Would recommend a map for reward tokens.</p><br><p><strong>Who can trigger the claim?</strong></p><p>Some protocols let anyone call the claim function, which means reward tokens can be sent directly to your contract address without warning. If your vault isn't built to handle an unexpected token transfer, those rewards are stuck.</p><br><h2 id="h-4-caps-and-static-tokens" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">4. Caps and static tokens</h2><p>Another easy to find (if you know it) bug is that some vaults have max caps. Be it for one reason or another they do not let more than X amount of assets be deposited.</p><p>Simple, so what's the problem here? </p><p>The issue is in the way most developers integrate with such vaults, as they don't know or consider that there is a possibility of the vault filling up and deposits to it to revert.</p><p>Sometime it's not checked and deposits are just reverting, even if there is some space still left in the vault.</p><br><p>Example:</p><ol><li><p>Index vault deposits to other vaults</p></li><li><p>There is space for 5000 assets to be deposited</p></li><li><p>User calls deposit for 8000 assets, but the TX reverts</p></li><li><p>User leaves</p></li></ol><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/4de30c8ef3192167421b2ea19caddad0521828d91dbc5c1d9f28fd42492857b8.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAALCAIAAACRcxhWAAAACXBIWXMAABYlAAAWJQFJUiTwAAAC+0lEQVR4nH3RTW8TRxgH8BEgIlqw48161rsez77M2LOzu/au17FJ7LxLLUVNUldteiSBoAQIIEqlJu2pKhIKTtLwBap+gEq9VEoViUiolJaqt56pxA1Vu3DsgUvQeLGVQ4X00+iZZx7N//CAw1ff//P4zvM/7sa/3X3x1+bLPzdfPtl88fu9rk78+F78qBM/2op+7UQPO9HDrcS/B1vxwXZ8sBM/2In2t6P97Xh/J/plO9r7LtrbjfZ24593n/24dfj0J3D7cnuhPLp8oYU+aw3pXMrbEuJ9g73zaJHIFN4Gmg4Y1O+sLYLry+0RrzYzXben6tQNitynvJKcR4qA8oDYAbXFQB9h5cTRZsJ2Q6jb3169AD6eHQfH4WkJp1L5tIzOyCgNcVpGGahLipHuXlMQpSGSFJxRxEB3BqXlQgbqYrgneUpkIAYns2sL8yJAlfU6c8sWt41iwXCardnh4fe40/SDqcbZc344zZhbZnQkcKsO81ip5nLPZshyw3CmGk77wRQmflYj70pa8ntKZIuAayJgbgIMKLJqwjxFFqdunZVHNNPFLDBYWHQbecvBxDNKvsECy66arGIUvQJx85aDSBmzgPJ6gXiY+Rpx8ybXiJdRjLSkiYBPPwKfzE2CAWVQwYOKoeCSRtxsoagRD9FKDjMFl3KmnTO5ajpJp8CCIY0qOjN4FTMfIlogrmpyi9cQLectR9ROjbq10zmrF3ACZhS9NjzTGpufmGg3zr7Pg1FeberFih9MNFuz1XC65DTcsFlpTCJa1onfGpsfHT3vh5N6ZRx74wYLs4imesuQVDOrEXBKeROQUkhWs1TMcoipWMhqBCI6pFkKKiHDyaFSt1OEqJjViKySZFhBJRlRWRPNIdUQmxfLFySIwQC8vtAGcx+MAZA5diYHTsj/47gkvL0/0PMO7BMfglMr7Q/Bf3/f73yz8vUXSxufLwq3lvrWby52XRJuXPyqa+Pq0sa1i8KVN9ZXL325Iqyv9i1vrF6+f3vt8MEPrwE+hucDT61HEwAAAABJRU5ErkJggg==" nextheight="508" nextwidth="1536" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><br><p>Some developers fix it by implementing <code>maxDeposit</code> Now we make sure to fill the vault up and all assets are utilized! </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/f61f2babb1e83ac86d136c70a286ae2c75f5387061ac675216c36a510625c433.png" blurdataurl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAPCAIAAAAK4lpAAAAACXBIWXMAABYlAAAWJQFJUiTwAAAD30lEQVR4nKXTSW8cRRQA4Iocj+1Zenp6qb2rt6rqZXrGs7SdjDWQA3DjByDIYscChZBEghM5QASJABFkFHNFQmJsBSU/gBtIXOw7B/4I4hrUMxkHwpHWp9LT6yc9vXrd4NlfD48fXZl9Wzk6uHp0cK3yzbXjh1ePH147+uq52Ze7z32xV3mwO3twfXZ/b3Z/7+jz63P7R59VZveuz+7tH9/b//7u7rNfDsAfv354KRh99OZW92pZz7sm1B2WvqT9r0B3mG6zpM2SZTI5Y3K9YIkUdILHn7wHfv/5DmIqlJpKjSPFQo2FXCDVGRNfEj9BvoZCLQIsNPET4iss4qrMlzRIXuKFSRMFP9zdBydPb4A1hKHnQo5d3rQIYhp7CaTKpZJ4qUukjThCnDPPRcxFjDHPhNyEAfFSxLSFgpbDGyZtWKxhsQ2Tbpi0ZTEAOo/uvF01aLSo9uKYxYmvWJDmvWnRe1UlpUzKojfV+U4Uax1Hm5kWwk+k7CXKCxWPemk+SfNJqIYOi2sGWlg3cd3E8wb24e3L4OTp+6CG1kzcIRGRhSy2SdzlquCqEKrgssBcUZGlvWmUXPDVkMYFVwMqC1/2o2QcJeMwGQnZpyKjIiNeYvOkwzRiCtTgssEGbljE5UqoQsgeFjpKB0IVJMiibGQjQb0kz3fyYppmF4mfBrrv0MgLim4xzfIdEfW9oEjzidJbUo+xHFrRgIU5MMjh7XfAyZNqgpZD21C4NHa56uDQoZHLlYXDDvLb0DOx38FBG3otk9hM2jhyaGyTyLCIhYRNIguHDotNJOomtpBv49DG4fKKniwnEMpPh1E6QFz7qq+K0tN94qcu8j216acjFmQuClSxHWdjIXtxVmImeZjL7lag+3FWClWYDg/0INADIbtgHR7eugxOn3wAaqjpUMvhNuQGEh0cdJBvuLxl4jYKTOSvGnClCVcNuGaglWYVrzRhtVITn2u65w242oTnm+5iw4vzxZJPf7q5aIChx7jMBtPxxdfLyRtpf4JpLNItrgrEFKQKce3QGHHtMukyaUDPxjEVmY1ju/r7UgtHbSgWH2vb4WDVmU8wb9ByqAG9usWkLtNsUhRTmZRc9oQqsEjSfJLlOyrZYvMLUUU533MsddnffEXqksoBTC8gP3do9J8Gj2/WTN6GnsukCcW6iRcaFlmUNiy2yNTnybpZaVik5dCGRZaVZP62Km45vOVwEwpQg9/dugJ++/EGOIdXDAJqDthwwQZacv+P8wYCoP71u2+BP08/fe3S9rgcD8ej4Xg0GL2weIajcWUwOjP4R1zZPFOeKYdbF4bl6cHHfwNOF+4pQxqQMAAAAABJRU5ErkJggg==" nextheight="778" nextwidth="1614" class="image-node embed"><figcaption htmlattributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>But is that a fix? Do you see the issue here?</p><p>This bug wasn't about deposit reverting when the vault fills up, but for when it doesn't. The issue here is that after the final deposit where the internal vault is filled up we are still allowing more deposits. These extra assets are not gonna be used in a yield generating way, but will take part of that yield. This is best shown with math</p><br><ol><li><p>Index vault1 has 100k assets</p></li></ol><ol start="2"><li><p>50k are deposited to 15% APY vault</p></li><li><p>50k are deposited to 5% APY vault</p></li><li><p>Users earn 10% APY</p></li></ol><p>vs.</p><ol><li><p>Index vault2 has 120k assets</p></li><li><p>50k are deposited to 15% APY vault</p></li><li><p>50k are deposited to 5% APY vault</p></li><li><p>20k are idle as both vaults are filled up</p></li><li><p>Users earn 8.3% APY</p></li></ol><br><p><strong>Fix:</strong></p><p>Fill up all vaults to 100% and then prevent more users from depositing.</p><br><h2 id="h-only-for-builders" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Only for builders</h2><p>Building a vault or anything that deals with shares? </p><p>If you have a mainnet launch, upgrade, or token event in the next 60 days and your contracts haven’t been re‑audited, you’re running on luck.</p><p style="text-align: justify">Book a security audit review call with us here:</p><p style="text-align: justify"><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://phagesecurity.com/request-audit"><u>https://phagesecurity.com/request-audit</u></a></p><p style="text-align: justify">or hit me up in my TG at<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/@Pyro3b"> <u>@Pyro3b</u></a>.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/5c0b93a6eb7f6bd200306cdf75d41453c55291d4244aece4d7fcb770c7042b2a.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[The most common prediction market bugs (from real audits, not theory)]]></title>
            <link>https://paragraph.com/@0x3b/pm-bugs</link>
            <guid>cdtmbiNYzKDMsAYToMI7</guid>
            <pubDate>Tue, 17 Feb 2026 07:07:21 GMT</pubDate>
            <description><![CDATA[Prediction markets and the protocols building on top of them are booming. If you're one of those teams, this list of bugs should matter to you.

I'm not going to claim this replaces an audit, but every bug here is something we at Phage Security have caught in real engagements, and the patterns were consistent enough that I thought they deserved a write up.]]></description>
            <content:encoded><![CDATA[<p>Prediction markets and the protocols building on top of them are booming. If you're one of those teams, this list of bugs should matter to you.</p><p>I'm not going to claim this replaces an audit, but every bug here is something we at <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://phagesecurity.com/">Phage Security</a> have caught in real engagements, and the patterns were consistent enough that I thought they deserved a write up.</p><br><h2 id="h-re-entrancy-attacks" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Re-entrancy attacks</h2><p>In half of the PMs and PM add-ons I've audited there was a re-entrancy bug somewhere. That is pretty common in these products as CTFs are ERC1155 tokens, which have a receive hook when transferred (If you didn't know this it's better to quit, web3 ain't for you D:).</p><p>The best way to avoid is to have <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol">nonReentrant</a> on every function that sends these tokens to the user.</p><p><em>But what if I have multiple contracts? </em><code>nonReentrant</code> <em>won't protect me against multi contract re-entracy. </em></p><p>For that my dear friend we need to figure out how to stop re-entrancy without relying on <code>nonReentrant</code> modifiers. </p><p>The simplest way to do it is to just <strong>transfer the tokens at the end of the whole call</strong>. Save them in memory and just transfer them after everything else is done. There won't be a point in re-entering if there is no difference between it and just another call. It's that simple...</p><br><h2 id="h-yes-no-1-usdc" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">YES + NO = 1 USDC</h2><p>Fundamental in prediction markets. It may seem simple, but it's sometimes not accounted for when you try fancy math with positions, forget that order books have spread or when distributing yield based on YES/NO probabilities and a negative yield surfaces by.</p><p>These vulnerabilities are best described with examples, so here we go:</p><br><h3 id="h-order-books" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>Order books</strong></h3><p>Order books can be used to match users who sell YES and users who buy YES, directly 1 to 1. But they can also match buys of YES and buys of NO, by collecting the USDC and then splitting it to create YES + NO tokens. Same can be done for selling when one users sells NO is matched with another user selling YES, where both tokens are used to merge into USDC and give it back proportionately to the users based on their order prices.</p><p>Fundamental feature of orderbooks are their spread. The current probabilities may be 50% / 50%, but some users will place limit orders at 10%, 20% or 30% as stop losses or entries.</p><p>Your engine may not be able to match positions that fill up to exactly 100%. Simple examples are to match 2 orders for YES at 0.6 and NO at 0.45 for a total of 1.05, or we collect YES at 0.55 and NO at 0.40 for a total of 0.95.</p><p>So what are you gonna do if positions are matched to above or bellow 100%, who is gonna take the profit and who is gonna eat the loss?</p><p>To fix the first you should forbid orders from matching above $1.00 (100%). Because the system cannot deliver on them. If we collect 100 YES for 0.6 and 100 NO at 0.45, and merge them then the total is 100 USDC, but we must deliver 60 to the YES holder and 45 to the NO, which will cause insolvency.</p><p>For the second case it comes more to a taste. Either one of both orders are matched at a discount, where they will be different from the actual price. When we collect 100 YES at 0.55, 100 NO at 0.40 and merge them we get 100 USDC, deliver 55 USDC to the YES holder and 40 to the NO, the extra 5 USDC can be fees (really big fees).  Or if you want to spare your users the huge fees you can overdeliver on one or both sides (i.e. send the extra 5 USDC to them). Essentially deliver positive slippage as one or both parties are gonna receive more USDC than they placed a sell order for.</p><br><h3 id="h-yield" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>Yield</strong></h3><p>You may be doing fancy math on yield and splitting it based on YES/NO probabilities. </p><p><strong>Smart cookie! </strong></p><p>However when farming yield there is always a possibility of negative yield. The black swan event where out of nowhere 70% of one of your Vaults TVL is wiped out. They didn't hack you, but you will still take the L and if you haven't planned for it in advance... </p><p><em>Well it's gonna be problem. But how do you handle it?</em></p><p>Well if you farm 100 USDC in yield you can split it 80/20 (or whatever the probabilities are at the time) and deliver 80 USDC to YES holders and 20 to NO. </p><p>However if you lose 100 USDC burning 80 YES and 20 NO won't result in the 100 USDC being accounted for. <strong>Matter in fact you made it worse</strong>. You've essentially accounted only for 20 USDC  as the 20 NO + 20 YES = 20 USDC and burned extra 60 YES for nothing.<br><br>You must reduce both YES and NO by 100, i.e. not to split the loss, but to account it at 100% for both YES and NO.</p><br><h2 id="h-fees" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Fees</h2><p>When charging fees how exactly would you "charge" them. If a user deposits 1000 YES tokens you can only take a fee on YES, so you take it and keep it, but the market resolves in NO. What now? The user was charged a fee, his assets decreased, but you didn't take a profit too, since all of the YES resulted in being 0$.</p><p>Your fees become a bet, and that is no fun. Not only that but your revenue comes at the resolution date of the bet, not whenever users interact with your product. You are building a project that should produce somewhat consistent revenue, not one that bets with the users.</p><br><p>To avoid this you can merge YES+NO in order to have pure USDC.</p><br><p>But merging from time to time will result in the same betting as the market may resolve before you merge. The best solution is right after taking the fee for the system to keep track of it's YES/NO tokens and to try to merge them instantly. This way you will always keep X amount of either YES or NO, but will minimize "betting" and maximize guarantied profit.</p><br><h2 id="h-early-resolution-for-borrowing" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Early resolution for borrowing</h2><p>Using your position as collateral and borrowing against it may seem fine at a first glance. It's collateral that sits and does nothing, why not utilize it?</p><p>However if you dig deeper you will see that prediction have extreme volatility. Volatility doesn't go well with borrowing and lending, that is if you don't wanna get liquidated all the time.<br><br>You see some predictions may have an end date in 1 year making them somewhat stable, however they can:</p><ul><li><p>prematurely end (due to an early resolution)</p></li></ul><ul><li><p>get canceled</p></li></ul><ul><li><p>flip overnight</p></li><li><p>get manipulated </p></li></ul><br><p> Example:</p><ol><li><p>100k YES on if BTC will hit 100k by the end of 2026 - 60% valuation = 60k coll</p></li><li><p>Loan for 30k, overcollateralization ratio of 200% - pretty solid for normal markets</p></li><li><p>Black swan event occurs and drops BTC price by 10% in a day, market looks bad</p></li><li><p>Suddenly YES is valued at 25%</p></li><li><p>Loan is for 30k, but your coll is worth 25k</p></li></ol><p>You will get liquidated at a win, but the lenders will take that loss.</p><br><h2 id="h-the-oracle-problem" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The oracle problem</h2><p>First thing that comes to mind when you think about borrowing or lending is <s>leverage </s>oracles, yes oracles...</p><p>The main problem is that there are no oracles for PM positions. Yes there are deciding oracles like UMA, but no oracles from where you can get the YES/NO price.</p><p>This will prevent you from building a reliable product that is dependent on the price of a position. </p><br><p><strong>What if you make your own oracle?</strong></p><br><p>Great question! But oracles are not just prices on chain, they have many hidden components, like:</p><ul><li><p>Few sources to avoid manipulation</p></li></ul><ul><li><p>Deep asset liquidity (again to avoid manipulation)</p></li><li><p>Instant prices (who cares what the YES price was 1h ago?)</p><br></li></ul><h2 id="h-locked-out" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Locked out</strong></h2><p>Another issue, not a security one, but user facing is how quick a user can remove and sell their position. If they are farming yield, but decide that YES no longer works for them and want to sell how much would they have to wait to get their tokens?</p><p>Some vaults tend to have withdraw periods or lock ups. Which is fine if the user want to hold their token till resolution, but for users that wanna sell when the price increases (or drops too much) that waiting is essentially forcing them to keep their bet when they don't believe in it.</p><p>Having such mechanisms will drastically lower their participation in your product.</p><br><h2 id="h-only-for-builders" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Only for builders</h2><p>Building a prediction market or anything that uses it's tokens? </p><p>I’m offering a limited number of free 3 day security reviews specifically for PM products. </p><p>DM me on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/0x3b33">X</a> about this offer to grab a slot before going mainnet.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/92aca58e963575ab9947a8d380af0b7982c7bae4a47b8cd85b043c379fc005fe.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[You Just Got Hacked: A Realistic Incident Response Plan For Web3 Teams]]></title>
            <link>https://paragraph.com/@0x3b/incident-response-plan</link>
            <guid>TBICaEVgd84YYnU4jD5u</guid>
            <pubDate>Wed, 11 Feb 2026 08:24:36 GMT</pubDate>
            <description><![CDATA[Most teams freeze. They stare at the screen, not knowing what the immediate step should be.

This document is for that moment. It is not a theoretical framework for "security resilience." We have seen the best teams crumble and the worst situations salvaged. This is how you survive.]]></description>
            <content:encoded><![CDATA[<h1 style="text-align: justify" id="h-" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"></h1><p style="text-align: justify">The protocol TVL has dropped by 40% in two blocks. You are getting constant pings in your Discord and Telegram community chat, asking you what happened?<br></p><p style="text-align: justify">You check Etherscan. You check it again. The "To" address is a contract you don't recognize. The "From" address is your main liquidity pool.</p><p style="text-align: justify">The marketing intern just drafted a tweet that says, "We are aware of an issue, funds are safe." They have no idea if funds are safe. You have no idea if funds are safe.</p><br><p style="text-align: justify"><strong>This is the moment. The "Oh sh*t" moment.</strong></p><br><p style="text-align: justify">Most teams freeze. They stare at the screen, not knowing what the immediate step should be.</p><p style="text-align: justify">This document is for that moment. It is not a theoretical framework for "security resilience." We have seen the best teams crumble and the worst situations salvaged. This is how you survive.</p><p><br></p><h2 style="text-align: justify" id="h-this-is-not-bug-fixing" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>This Is Not Bug Fixing</strong></h2><p style="text-align: justify">The most common mistake in the first hour is teams going into debug mode. That’s the wrong first instinct.</p><p style="text-align: justify">If an exploit is continually causing harm to your system in real time, your priorities should change. Your first job is not to figure it out. It’s to be safe.</p><p style="text-align: justify">Containment. Assessment. Mitigation. Remediation. In that order.</p><h2 style="text-align: justify" id="h-first-15-30-minutes-containment" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>First 15-30 Minutes (Containment)</strong></h2><p style="text-align: justify">Your only objective right now is containment. You do not need to understand how it happened yet. You just need to stop it from happening further.<br></p><p style="text-align: justify"><strong>1. Incident Mode</strong></p><p style="text-align: justify">Once you are in Incident Mode, normal rules don't apply anymore. You don't ask for permission to pause contracts. You don't wait for a code review to revoke a compromised key. You act to save the protocol.</p><p style="text-align: justify">Do not tweet or post anything detailed on Discord just yet.</p><br><p style="text-align: justify"><strong>2. Kill Switch</strong></p><p style="text-align: justify">If you have pausable contracts, pause them. Now. It is easier to explain downtime to users than to explain why their funds are gone.</p><p style="text-align: justify">It is very common for attacks to originate from a team member who got compromised. Assume the worst and revoke key permissions as well.</p><p style="text-align: justify">Now, you can tweet. Along the lines of “We are aware of the issue. We are investigating” should be just fine for now, as you are not aware of the scale of it, just yet.</p><br><p style="text-align: justify"><strong>3. Verify Reality&nbsp;</strong></p><p style="text-align: justify">Now that you have shut down everything you could, it’s time to check whether it’s actually an attacker or a bug causing this. Check the transactions, check the logs, verify the exploit, and try to understand the scale of it.</p><p><br></p><h2 style="text-align: justify" id="h-first-few-hours-assessment" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>First Few Hours (Assessment)</strong></h2><p style="text-align: justify">The initial panic is over. The protocol is either paused, or the attacker has finished. Now you need to figure out the blast radius and prevent secondary damage.</p><br><h3 style="text-align: justify" id="h-1-extra-checks" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>1. Extra Checks</strong></h3><p style="text-align: justify">Check your website. Is the attacker serving a malicious UI? (See the Ledger Connect Kit or BadgerDAO incidents). Check your DNS records and recent deployments.</p><p style="text-align: justify">Rotate your AWS/GCP API keys and database credentials. If the attacker got in via a compromised developer laptop, they might have access to your backend infrastructure, not just the smart contracts.</p><br><h3 style="text-align: justify" id="h-2-the-forensic-ledger" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>2. The Forensic Ledger&nbsp;</strong></h3><p style="text-align: justify">Start a "Loss Accounting" spreadsheet. You need to categorize assets into three buckets:</p><ul><li><p style="text-align: justify"><strong>Confirmed Lost:</strong> Assets already moved to the attacker’s wallet.</p></li><li><p style="text-align: justify"><strong>At Risk:</strong> Assets in contracts and vaults that you are not sure if it’s compromised.</p></li><li><p style="text-align: justify"><strong>Secure:</strong> Assets in cold storage or successfully paused contracts.</p></li></ul><p style="text-align: justify"><em>Why this matters:</em> You need to know if you are solvent before you write the breakdown tweet.</p><br><h3 style="text-align: justify" id="h-3-incident-timeline" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>3. Incident Timeline&nbsp;</strong></h3><p style="text-align: justify">Assign your best engineer (or external security partner) to trace the attack.</p><ul><li><p style="text-align: justify"><strong>T-Minus:</strong> When was the contract deployed? When was the last upgrade?</p></li><li><p style="text-align: justify"><strong>T-Zero:</strong> The first malicious transaction.</p></li><li><p style="text-align: justify"><strong>Pattern:</strong> Is it a single atomic TX (Flash Loan) or a drip-feed drain over multiple TXs?</p></li></ul><br><h3 style="text-align: justify" id="h-4-external-coordination" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>4. External Coordination</strong></h3><ul><li><p style="text-align: justify"><strong>Security Partners:</strong> Contact your auditors and security firms. They can further help confirm the vector. Escalate to SEAL 911 from <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/_SEAL_Org"><u>Security Alliance</u></a>. It is basically an emergency hotline run by security researchers (often reached via their official <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://t.me/seal_911_bot"><u>Telegram bot</u></a>). They can help coordinate triage, support fund tracing and recovery flows, and advise on how to engage exchanges and law enforcement.</p></li><li><p style="text-align: justify"><strong>Exchanges &amp; Stablecoins:</strong> If the attacker stole stablecoins or assets, try contacting the issuers to see if they can help freeze the assets. This rarely works in time, but it is a required step for liability. Contact major exchanges with the attacker's address to flag deposits.</p></li><li><p style="text-align: justify"><strong>Update: </strong>Provide a further update to the community and on X with your findings. The goal is to share the factual details you know so far, so independent investigators like ZachXBT can also take a look and potentially help.</p><br></li></ul><h2 style="text-align: justify" id="h-first-24-hours-remediation-strategy" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>First 24 Hours (Remediation Strategy)</strong></h2><p style="text-align: justify">The world knows you are hacked. Your goal is to control the narrative and plan the recovery.</p><br><h3 style="text-align: justify" id="h-1-the-situation-report-sitrep" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>1. The Situation Report (SitRep)</strong></h3><p style="text-align: justify">Communication is a minefield.</p><p style="text-align: justify"><strong>The Don’t: </strong>Don’t jump into saying “all funds are safe” unless they’re 100% safe or already recovered. I remember the Celsius team saying “all funds are safe and we have robust risk management,” only to file for bankruptcy later.</p><p style="text-align: justify"><strong>The Do’s:</strong> “We are aware of an exploit. The protocol is paused. We are investigating the scope. Please do not interact with anything on our site or the smart contracts until the next update.” If you have a general idea of what happened, write a blog or article summarizing the incident, the impact, the suspected cause, the actions taken, and the next steps. If done right, you’ll earn trust from the community instead of being questioned and mocked.</p><br><h3 style="text-align: justify" id="h-2-remediation-decision-patch-vs-migrate" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>2. Remediation Decision: Patch vs. Migrate</strong></h3><ul><li><p style="text-align: justify"><strong>Patch:</strong> Can you upgrade the implementation contract to fix the logic?</p></li><li><p style="text-align: justify"><strong>Migrate:</strong> Do you need to deploy V2 and move all liquidity?</p></li><li><p style="text-align: justify"><strong>Redeploy:</strong> In cases of severe key compromise where you cannot trust <em>any</em> previous state, a full redeploy of the architecture might be necessary.<br></p></li></ul><h3 style="text-align: justify" id="h-3-preservation-of-evidence" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>3. Preservation of Evidence</strong></h3><p style="text-align: justify">This is critical for any future law enforcement action or further investigation.</p><ul><li><p style="text-align: justify"><strong>Save Logs:</strong> Snapshot your CloudTrail logs, RPC logs, Transactions logs, Discord audit logs, Twitter logs, etc. depending on the type of attack.</p></li><li><p style="text-align: justify"><strong>Download Git History:</strong> Ensure no one force-pushes changes to the repo to hide a "bad commit."</p></li><li><p style="text-align: justify"><strong>Document Decisions:</strong> Keep a log of who decided to pause, who decided to tweet, and exactly when.</p></li></ul><br><h3 style="text-align: justify" id="h-4-the-whitehat-negotiation" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>4. The "Whitehat" Negotiation</strong></h3><p style="text-align: justify">You might receive a message on-chain (Input Data Message) or seeing movement to Tornado Cash.</p><ul><li><p style="text-align: justify"><strong>The Bounty Offer:</strong> It is standard industry practice to offer a 10-20% bounty for the return of funds, treating the incident as a "whitehat rescue."</p></li><li><p style="text-align: justify"><strong>The Channel:</strong> Open a communication channel (email or on-chain messaging). Do not negotiate on public Twitter.</p></li></ul><br><h2 style="text-align: justify" id="h-first-few-days-the-fix" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong><br>First Few Days (The Fix)</strong></h2><p style="text-align: justify">The adrenaline has now faded. Now you have to do the hard work of rebuilding.</p><br><h3 style="text-align: justify" id="h-1-root-cause-analysis-rca" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>1. Root Cause Analysis (RCA)</strong></h3><p style="text-align: justify">You must produce a technical RCA that is verifiable.</p><p style="text-align: justify"><strong>The Invariant:</strong> What was the root cause, and exactly what, logically or technically, caused things to break. Some edge cases may not have been handled properly. This will likely become more common with AI-written code.</p><p style="text-align: justify"><strong>The Miss:</strong> Why wasn’t this caught in internal testing? Did you do a proper audit before deploying the contract? Or maybe the audit was done on the original contract, and the team didn’t run a full audit when deploying v2.</p><p style="text-align: justify"><strong>The Proof:</strong> Provide PoC (Proof of Concept) steps that reproduce the hack on a fork.</p><br><h3 style="text-align: justify" id="h-2-patch-and-verify" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>2. Patch and Verify</strong></h3><ul><li><p style="text-align: justify"><strong>Private Audit:</strong> Do not deploy the fix immediately. Your "fixed" code often introduces new bugs because it was written in a panic. Send the patch to a trusted security partner for a review.</p></li><li><p style="text-align: justify"><strong>Adversarial Testing:</strong> Try to hack your own patch. Use the tools and methodologies the attacker used and learn from all the previous hacks on different protocols.</p></li></ul><br><h3 style="text-align: justify" id="h-3-the-restitution-plan" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>3. The Restitution Plan</strong></h3><p style="text-align: justify">Users want to know if they are getting their money back.</p><ol><li><p style="text-align: justify"><strong>Treasury Assessment:</strong> Can the Company cover the loss?</p></li><li><p style="text-align: justify"><strong>Collateral:</strong> Will users have to take a % loss?</p></li></ol><br><p style="text-align: justify"><strong><em>Advice:</em></strong> Be honest. If you cannot pay them back immediately, say so. "We are exploring options" is better than a lie. You should be openly communicating to big institutional partners asking for help, as they are more open to help as to not give crypto the bad rep of always being hacked.</p><br><h3 style="text-align: justify" id="h-4-phased-rollout" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>4. Phased Rollout</strong></h3><p style="text-align: justify">Do not flip the switch back to "ON" for everyone.</p><ul><li><p style="text-align: justify"><strong>Phase 1:</strong> Withdrawals Only. Let people leave. (Most won't, if you communicate well).</p></li><li><p style="text-align: justify"><strong>Phase 2:</strong> Capped Deposits. Limit exposure.</p></li><li><p style="text-align: justify"><strong>Phase 3:</strong> Full Operations.</p><br></li></ul><h2 style="text-align: justify" id="h-first-few-weeks-narrative-shift" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>First Few Weeks (Narrative Shift)</strong></h2><p style="text-align: justify">If you survive the first week, you have a chance to become resilient. Many of the strongest protocols today (MakerDAO, AAVE, Euler Finance, etc.) have survived major incidents.</p><br><h3 style="text-align: justify" id="h-1-operational-hardening" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>1. Operational Hardening</strong></h3><p style="text-align: justify">The hack was likely operational, not just code.</p><ul><li><p style="text-align: justify"><strong>Multisig Hygiene:</strong> Implement multisig, if you haven’t yet and expand the signer set if you already have it. Require hardware wallets for all signers. Implement geographic distribution of signers.</p></li><li><p style="text-align: justify"><strong>Timelocks:</strong> Add timelock to all governance actions. This gives the community time to react to a malicious proposal or compromised admin key.</p></li></ul><br><h3 style="text-align: justify" id="h-2-monitoring-and-response" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>2. Monitoring and Response</strong></h3><ul><li><p style="text-align: justify"><strong>Real-time Alerts:</strong> Implement monitoring that alerts you to "invariant violations" (e.g., solvency check fails) rather than just "large transactions."</p></li><li><p style="text-align: justify"><strong>Automated Pause:</strong> Consider building a bot that can automatically pause the contract if it detects a critical invariant failure.</p></li></ul><br><h3 style="text-align: justify" id="h-3-the-audit-cycle" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>3. The Audit Cycle</strong></h3><ul><li><p style="text-align: justify"><strong>Retainer:</strong> Move from "one-off audits" to a continuous retainer with a security firm.</p></li><li><p style="text-align: justify"><strong>Bounty Program:</strong> Launch a high-value bug bounty. A $50k bounty is cheaper than a $10M hack.</p></li></ul><br><h3 style="text-align: justify" id="h-4-rebuilding-trust" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>4. Rebuilding Trust</strong></h3><p>Trust isn’t rebuilt by marketing alone. It’s rebuilt by shipping secure code, communicating clearly, and surviving the next few weeks without surprises.</p><ul><li><p style="text-align: justify"><strong>Publish the Post-Mortem:</strong> A clear admission like “we overlooked this specific logical bug” earns more trust than vague deflection like “it was a sophisticated hack none of us expected” when it wasn’t. What matters is clarity on what happened, what broke, what you did, and what changes going forward.</p></li><li><p style="text-align: justify"><strong>Consistent Updates:</strong> Share specific, technical updates on what you’ve changed to prevent recurrence, along with timelines and what users should do (or avoid doing) in the meantime.</p><br></li></ul><h2 style="text-align: justify" id="h-how-to-handle-ct" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>How to Handle CT</strong></h2><p style="text-align: justify">Crypto Twitter is a coliseum. If you show weakness, they eat you. If you lie, they destroy you.</p><h3 style="text-align: justify" id="h-the-3-posts-teams-regret" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong><br>The 3 Posts Teams Regret</strong></h3><ol><li><p style="text-align: justify"><strong>"Funds are safe."</strong> (When they aren't).</p></li></ol><ul><li><p style="text-align: justify"><em>Why:</em> You look incompetent or malicious. (See Celsius, 2022).</p></li></ul><ol start="2"><li><p style="text-align: justify"><strong>"We were hacked by a sophisticated state actor."</strong> (When it was something completely different).</p></li></ol><ul><li><p style="text-align: justify"><em>Why:</em> Independent security researchers will find the truth ultimately. You will be mocked and not be trusted.</p></li></ul><ol start="3"><li><p style="text-align: justify"><strong>"We take security seriously."</strong></p></li></ol><ul><li><p style="text-align: justify"><em>Why:</em> It's a cliché. Obviously you didn't, or you wouldn't be here. Show, don't tell.</p></li></ul><h3 style="text-align: justify" id="h-safer-alternatives-templates" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong><br>Safer Alternatives (Templates)</strong></h3><ul><li><p style="text-align: justify"><strong>The Initial Ack:</strong> "Eg: We are investigating an irregularity in the Vault contract. Operations are paused. <span data-name="thread" class="emoji" data-type="emoji">🧵</span>"</p></li><li><p style="text-align: justify"><strong>The Hard Truth:</strong> "Eg: We have confirmed an exploit. ~400 ETH has been drained. The vector was a logic error in the <code>claimRewards()</code> function. Remaining funds (~2k ETH) are secured."</p></li><li><p style="text-align: justify"><strong>The Path:</strong> "Eg: A fix is in development. It is being reviewed by our security audit partners. We will pause the operations until it is deemed safe."</p></li></ul><h3 style="text-align: justify" id="h-handling-rumors" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong><br>Handling Rumors</strong></h3><ul><li><p style="text-align: justify"><strong>Quote-Tweet Hysteria:</strong> Ignore the ragebaiters. Do not reply to "Rug?" tweets. You shouldn’t take them seriously.&nbsp;</p></li><li><p style="text-align: justify"><strong>Fake “Official” Links: </strong>Scammers will post lookalike claim sites, Google forms, and “recovery” wallets in replies. Warn users clearly: “We will never DM first, and we will never ask you to send funds.” Pin that message and repeat it in every update.</p></li><li><p style="text-align: justify"><strong>“Funds Are Safe” Pressure:</strong> People will demand reassurance. Don’t overpromise. Say what you can verify: paused status, known impact, what’s being done, and when the next update drops.</p></li></ul><br><h2 style="text-align: justify" id="h-closing-thoughts" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Closing Thoughts</strong></h2><p style="text-align: justify">Getting hacked is not a filter for competence, it is a filter for resilience. The market doesn’t only judge what went wrong, it judges how you respond when everything is burning down.</p><p style="text-align: justify">A protocol dies when the team panics, goes quiet, overpromises, or ships “fixes” without a second thought. A protocol survives when the team contains fast, communicates facts, and rebuilds with discipline.</p><p style="text-align: justify">Vibe coding is fine for prototypes. Vibe incident response is how you lose real money, real users, and the narrative.</p><p style="text-align: justify">Have a plan before you need one. Because when the exploit hits, you don’t rise to your intentions. You fall to your preparation.</p><br><h2 style="text-align: justify" id="h-dont-wait-for-your-oh-sht-moment" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Don’t Wait For Your “Oh Sh*t” Moment</strong></h2><p style="text-align: justify">If this felt uncomfortably real, that’s your warning shot.</p><p style="text-align: justify">We at Phage Security perform smart contract audits for Web3 protocols so this story stays an article, not your post‑mortem.</p><p style="text-align: justify">If you have a mainnet launch, upgrade, or token event in the next 60 days and your contracts haven’t been re‑audited, you’re running on luck.</p><p style="text-align: justify">→ Book a security audit review call with us here:</p><p style="text-align: justify"><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://phagesecurity.com/request-audit"><u>https://phagesecurity.com/request-audit</u></a></p><p style="text-align: justify">or hit me up in my TG at<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/@Pyro3b"> <u>@Pyro3b</u></a>.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/f961111c99dc6ba1008f4e9c3a20c4791706ee2a97563ee5427243f00d162fc7.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[The 6‑step checklist that can save you one full audit]]></title>
            <link>https://paragraph.com/@0x3b/audit-checklist</link>
            <guid>Xh5dMX4keUY3C4H2n5xl</guid>
            <pubDate>Mon, 02 Feb 2026 08:57:27 GMT</pubDate>
            <description><![CDATA[Most teams burn the cost of an extra audit before they ever talk to an auditor. 

In this article I’ll show you the exact 6 step checklist I use to help teams go from “we think we’re ready” to actually audit ready for an audit.]]></description>
            <content:encoded><![CDATA[<p>Most teams burn the cost of an extra audit before they ever talk to an auditor.</p><p>In this article I’ll show you the exact 6 step checklist I use to help teams go from “we think we’re ready” to actually audit ready for an audit.</p><h1 id="h-summary" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Summary</h1><p>1. Have complete code (skip if you are interested only in the security part)</p><ul><li><p>No placeholder functions or TODOs</p></li><li><p>All integrations implemented</p></li></ul><p>2. Writing tests</p><ul><li><p>How much coverage is enough?</p></li><li><p>Should we mock or simulate real conditions?</p></li><li><p>Unit tests vs integration tests</p></li></ul><p>3. Internal reviews</p><ul><li><p>Code reviews before audit</p></li><li><p>How and what to do</p></li></ul><p>4. Clear documentation</p><ul><li><p>What should/shouldn't it have?</p></li><li><p>Architecture diagrams</p></li><li><p>Comments</p></li></ul><p>5. Scope definition</p><ul><li><p>Be specific about what needs auditing</p></li><li><p>Exclude out-of-scope contracts/functions/interfaces</p></li></ul><p>6. Choose the right audit firm</p><ul><li><p>Get multiple quotes</p></li><li><p>Research the auditors</p></li></ul><p><br></p><p>--------</p><h1 id="h-1-have-complete-code" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">1. Have complete code</h1><p>Before you consider any sort of security, you must first have a MVP/POC. That means an actual piece of code that should be working on its own. All user paths from first interaction (deposit, stake, lock, etc.) to last (withdraw, redeem...) should be working with the intended variable inputs without reverting or leading to any errors.</p><p>If you have any integrations, make sure you followed their best practices (thoroughly read their docs, or at least make Claude read them and correct any code that goes against them). If you are unsure about some functions, most (if not all) projects have supportive developers that you can reach out to and who would be happy to look at your code and help with anything you are missing.</p><p>If you are doing heavy integrations, I would even suggest reaching out to them, as they know their code best, have seen many projects integrate beforehand and know what works and what doesn't.</p><h2 id="h-2-writing-tests" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">2. Writing tests</h2><p>The most dreaded part.</p><p>Most people would look at what coverage you have to determine your test suite. However, coverage is an inaccurate stat. It simply determines if your tests go through a given path, skipping the fact that you might have tested it wrongly, or with the best possible conditions.</p><p>The amount of tests you want to write depends on how fast you want to launch (you can write tests during an audit, although I suggest to have everything beforehand).</p><p>If you are in a rush, you would need the most basic tests:</p><ul><li><p>Simple function tests without malicious intent (i.e., just regular user interactions) -&gt; deposit, claim, withdraw</p></li><li><p>Simple user paths without malicious intent -&gt; <code>deposit -&gt; withdraw</code> and <code>stake -&gt; claim -&gt; withdraw</code></p></li><li><p>Access control -&gt; if users can call <code>onlyOwner</code> functions or if users can <code>withdraw</code> from other user accounts</p></li><li><p>Simple protocol integrations -&gt; mock calls for the protocol you are integrating, distribute yield and then try claiming it</p></li></ul><p>However, if you have a spare day or two, you should consider testing more thoroughly (all of the above and):</p><ul><li><p>Users with malicious intent calling functions/flows -&gt; try simulating first depositor bug if you are using 4626 or deposit/withdraw 1 wei</p></li><li><p>Advanced function flows -&gt; <code>user1 deposit -&gt; user2 withdraw -&gt; user1 claim</code></p></li><li><p>Reverse scenarios -&gt; black swan events, negative yield, bad debt liquidations</p></li><li><p>Integration tests to see if your integrations actually work</p></li></ul><p>Honestly, these tests shouldn't take that much time. You should be spending 80%-90% of your effort on the actual project.</p><p>Notice that I said "making" as for tests you don't need to write them on your own. You can (and I suggest you) use AI. I prefer Cursor with Clude, but Claude code works too (if not better). The way to make it write the correct tests, the right way is simple:</p><ol><li><p>Make it create a testing diagram for every function and user flow (make sure it's correct)</p></li><li><p>Prompt it to make a complete setup (initialize and configure every contract) with a few user accounts</p></li><li><p>Start writing tests one by one</p></li><li><p>Correct it where necessary</p></li></ol><p>You won't write them yourself, but you'll be supervising their creation. This would speed it up by a lot.</p><h2 id="h-3-internal-reviews" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">3. Internal reviews</h2><p>You've written a lot of tests, but often they miss unique paths and "strange" conditions. This is why you should audit your own contracts. Paying your developers (or doing it yourself) would cost you 2-3 days of "no progress" on your code/app. However, that can save you an extra audit. What would you rather do - pay your devs to work a few more days (300$ - 500$) or get an extra audit (10k - 20k+)?</p><p><strong>This often will make the difference between needing 1 or 2 audits</strong></p><p>Now, before you start, I would recommend setting a time window that would force you to do about 300-400 nSLOC per day (i.e., 1000 nSLOC -&gt; 2-3 days). Since this is your own code and you know it well, you won't need extra time to understand it.</p><p>During that time, your only goal is to break everything you can. Don't write new code, don't re-edit old code (note it somewhere for later), but just go around and try to exploit your own project.</p><p>Don't start fixing bugs the moment you find them! Make GitHub issues with the vulnerabilities (or note them somewhere) and continue breaking your code. After the time is up, start fixing them as best as you can.</p><p>After you are done with the fixes, make sure all of the tests run and new ones if you introduced new logic.</p><h2 id="h-4-clear-documentation" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">4. Clear documentation</h2><p>This should not be complex. Don't overengineer it. No one needs GitBooks for every smart contract with every function and every variable and what they do. If they want that, they can open your GitHub and read the contracts (or interfaces) and get the info they need.</p><p>Your docs should be simple to understand, concise, and to the point. Again, use Claude to write them. It takes only a few minutes (with a good prompt), maybe 30min of you want them polished. Also, if you happen to have diagrams and schemes, feel free to show them in the docs. They provide a good visual reference.</p><p>Make sure you have some minimal nat-spec. You don't need to explain every single line, but have 1 or 2 sentences above function or complex logic that gives a brief explanation what it does and why. Again Cursor can do that for you.</p><h2 id="h-5-scope-definition" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">5. Scope definition</h2><p>The simplest part. Get only logic contracts in scope. That means any contracts that are interfaces can be removed from the scope to reduce the nSLOC (and possibly the price). Finding bugs in interfaces is rare, and most are due to wrong interface implementation, which is implemented in the logic (i.e., already covered by the scope).</p><p>If that's your 2nd or 3rd audit, you can exclude simple helper functions (or implement OZ/Solady ones) from the scope. Auditors will still look at out-of-scope contracts that integrate with in-scope ones and try to find bugs there. However, note that if the helper functions are too complex, they may also need to be included in scope, just in case.</p><h2 id="h-6-choose-the-right-audit-firm" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">6. Choose the right audit firm</h2><p>Choosing the right firm is not easy. You must consider:</p><ul><li><p>What your users think (most don't know which ones are good)</p></li><li><p>What your VCs think or push you to choose (they still don't know which ones are good, but rely on their brand, which is very dangerous)</p></li><li><p>What you and your developers think (these guys you can trust the most).</p></li></ul><p>My first suggestion would be to not let yourself be pushed around by VCs telling you which firm you should pick. Resist them as much as you can and provide logical feedback on which ones you think are better and why. But how do you know which ones are better and why?</p><p>To know that you must first find a number of auditing firms and research them. Here is what you should be looking for:</p><ul><li><p><strong>The firm doesn't do the audit, the auditors do</strong></p></li></ul><p>Brands are a big thing. But in cybersecurity, the brand is 80% client communication and the other 20% is delivering on results.</p><p>On top of that, most firms work with contractors, some have employees, but I've seen employees of big firms take things "on the side". So consider that most firms have access <strong>to the same pool of auditors</strong>, where the same team of 3 can be one price at firm X and 2x more expensive at firm Y, <strong>FOR THE EXACT SAME GUYS</strong>.</p><ul><li><p><strong>Some auditors are better than others, and some are specialized</strong></p></li></ul><p>Most (if not all) auditors have a GitHub portfolio/CV with their past experience. You will need it to determine how good they are. Look for contest wins, which firms they have worked with or overall quantity of audits.</p><p>Some auditors are mediocre in general but are highly specialized in X niche (lending, bridges, prediction markets, or any interesting topic). It's generally good to have one of these as they would most certainly catch the rare bugs (missed by most).</p><ul><li><p><strong>Some auditors are booked on 2 projects at the same time, reducing their quality of work</strong></p></li></ul><p>When making deals, make sure to ask if all of the guys would be doing only this audit during the whole time frame. Again, most big firms usually send a team of 2 juniors or intermediates for the whole audit and 1 lead auditor just to check at the end if they have missed anything.</p><p>Steps to take before you choose an auditing firm:</p><ul><li><p>Get a quote from a few firms</p></li><li><p>Ask each about the team they plan on putting and their CVs</p></li><li><p>Ask for people familiar with the project type you are building</p></li><li><p>Look at each team and consider the price</p></li></ul><h2 id="h-short-summary-of-next-steps" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Short summary of next steps</h2><p>1. Make sure your code is finished</p><p>2. Spend a few days with Claude writing tests</p><p>3. Do an internal review on your contracts and fix/improve anything you've noted</p><p>4. Write short and clear docs</p><p>5. Scope your project</p><p>6. Research a few auditing firms --- Want help doing all of this before you pay for an audit?<br><br>---</p><p>If you’ve got your MVP live on testnet and you’re aiming to launch in the next 4–8 weeks, we offer a free 3‑day security overhaul for a small number of teams each month.</p><p>Over 3 days, we will:</p><ul><li><p>Try to break your core flows like an attacker</p></li><li><p>Flag Critical / High / Medium issues with clear fixes</p></li><li><p>Tell you if you’re actually audit‑ready and what your scope should be</p></li></ul><p>If you want me to do this on your contracts, apply here:</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://phagesecurity.com/request-audit">https://phagesecurity.com/request-audit</a></p><p> or hit me up in my TG at <a target="_blank" rel="noopener noreferrer nofollow" class="dont-break-out css-1jxf684 r-bcqeeo r-1ttztb7 r-qvutc0 r-poiln3 r-1inkyih r-rjixqe r-1ddef8g r-tjvw6i r-1loqt21" href="https://x.com/@Pyro3b">@Pyro3b</a>.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/745e7f86c1c18a4817871cd907da27ae6a0b69e3c75c27d4a799ef353180e837.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Time]]></title>
            <link>https://paragraph.com/@0x3b/time</link>
            <guid>2RNSfj5YDxsjZpOHm5Mt</guid>
            <pubDate>Tue, 28 Jan 2025 08:28:19 GMT</pubDate>
            <description><![CDATA[Your progress is slow, isn't it? It's taking more time than you hoped for. Everybody else is doing it, they are winning competitions, getting clients, winning big bounties, but you are still here, with little to no progress...]]></description>
            <content:encoded><![CDATA[<p>Your progress is slow, isn't it? It's taking more time than you hoped for. Everybody else is doing it, they are winning competitions, getting clients, winning big bounties, but you are still here, with little to no progress...</p><p>You are not alone, my friend. I sometimes feel this too. The sad truth is that not everyone is meant to make it, there is not enough room for everyone to be successful.</p><blockquote><p>"All those who work hard don't succeed, but all those who have succeeded have worked hard." - <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/BowTiedDravee/status/1751950690367267203">Kamogawa Genji, Hajime no Ippo</a></p></blockquote><p>I consider the above just an excuse not to give your best, to not make the greatest sacrifice. These beliefs are like ghosts, the more you believe in them, the more real they will seem. They are excuses to quit early, but remember, <strong>every failure bring you closer to the win</strong>. You have no choice but to do your best, failing time, after time, after time, without seeing an end.</p><p>Everyone falls the first time they try to walk…</p><p>The above was the first thing you needed to learn, and below is the rest, enjoy.</p><h2 id="h-progress-is-exponential" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Progress is exponential</h2><p>Progress, whether in sports or a career, is never a straight line. It's exponential. The more you practice, the better and faster your improvements will be.</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/a6b0bd36f28095c3c4cb5990fac5accc5894e0dbdf23a6a92f565bb2960d4ed4.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>Indeed, this scientific graph (which I definitely didn't draw myself) shows a good representation of how progress is measured.</p><p>It's the same with success, money and even women (or so I've heard D: ). The more you achieve (have), the faster you can acquire more. This is why they say:</p><blockquote><p>When it rains it pours</p></blockquote><p>This is great and all, however it's upside is also it's a downside. You see, this doesn't apply only to you, it applies to everyone. Everyone is on this curve and if someone is ahead a month or two he can be much better and much more successful than you. Even worse, the more in front they are the faster they will expand the gap between you and them.</p><p>But worry not kind reader, there are things you can do (or not do) that will help you scale better in any aspect you want. If you've read my previous article (selfish promotion )</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/-NXPrhqz8kzbDEZzEbIq5B-EExV2l7tTvTzidOWoc5k">https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/-NXPrhqz8kzbDEZzEbIq5B-EExV2l7tTvTzidOWoc5k</a></p><p>you will know that in order to master a certain skill you will need to practice this specific skill and not skills that mimic it. If you are confused, here is an example from the above article:</p><blockquote><p>Driving your car every day to work won't make you a F1 racer.</p></blockquote><p><strong>For you to master something as fast as possible, you will need to cut off all distractions</strong></p><p>And the most dangerous of all distractions are the ones that make you thing you are going the right way, that you are working and grinding, task that take your energy, time and attention, but yield no return.</p><p>These my fellow reader, are the ones that you pay the highest price (time, energy and suffering) and get the lowest returns - nothing…</p><h2 id="h-do-you-remember-it" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Do you remember it?</h2><p>While we are on the topic of acquiring as much knowledge as possible, I need to ask you</p><blockquote><p>Do you remember it all?</p></blockquote><p>You may remember the stuff you've read for a few days, even a a week or two, however if this knowledge is not used it's ultimately forgotten.</p><p>Does that mean you should stop listening to advice or new ways of thinking? No it's just the opposite. You should aspire to find the best way to be proficient at what you do, and that is by learning and implementing new methods and mindsets.</p><p>So what should you remove?</p><p>Well, why are you reading an article about how Compound works, when you don't plan to audit Compound based projects? Why are you reading the famous <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.notonlyowner.com/learn/what-happens-when-you-send-one-dai">1 DAI article</a> when 50% of the stuff in it you already know and the other 50% you won't need? I've personally read it and if you ask me I've forgotten everything in there, as I didn't really need it.</p><p><em>Note: No hate, it's a really good article for general knowledge, however I don't recommend wasting 1 hour of your life if you have basic knowledge of EVM.</em></p><p>Have you read Mastering Ethereum ? Why ? It’s extremely dense nature makes it packed with info that you won’t remember, or won’t need. That book i as old as time (probably dinosaurs wrote it), most of the stuff inside is outdated. It’s a giant waste of time.</p><p><em>Note: Again, nothing personal, this book might have been a great read a couple of years ago. However if you want to be a developer/auditor this book is too outdated.</em></p><p>I am telling you this from experience, when I started I spend 1-2 hours a day reading random articles on different DEFI projects. How Compound works, deep dive into OpenSea, Curve, Maker, Lido... Yet, this information is now completely forgotten.</p><p>Reading things like this might seem productive, and it's better than playing video games, however at the end you only end up with the feeling of productiveness. Better spend the Saturday night with family or friends, or writing articles if you are like me (empty inside :D).</p><h2 id="h-do-you-need-it" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Do you need it?</h2><p>As per <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/bytes032/status/1749439854935494887">Bytes</a> (a random guy I saw on twitter :D ) one of the biggest mistakes new auditors make is:</p><blockquote><p>Studying stuff that you don't need right now</p></blockquote><p>This leads me to the most important question that you must ask yourself before starting any new endeavor:</p><blockquote><p>Do I really need it?</p></blockquote><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=HCprqZ7q7xk">Does It Make The Boat Go Faster?</a> is a quote from a world class rower. There are so many exercises that you can train to improve team coordination rowing technique and a thousand other little things. <strong>But does it make the boat faster?</strong> The fastest boat wins the race, not the one that trains the little things.</p><p>So I am asking you, are you training to make the boat faster or are you training the small little things? Some thing might feel like work and look like work, however they are the furthest things away from work. They are not making you progress faster, they are just occupying your mind, making you think you are productive, while letting your competition surpass you.</p><p>Very few of the articles I’ve read were useful. Again that doesn’t mean to skip everything, but it means that some articles, some videos, even some tweets are useless.</p><p>You see, everything you need is already on the internet, you don't need to remember all of the stuff as long as you know it exist and how to find it. Simply if you are working on a project that integrates with Lido, go and look up how lido works. This way your learning will help you build better code and the information that you are gonna acquire is gonna be remembered for longer as you will use it in your code.</p><h2 id="h-trust-your-gut-or-boredom" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Trust your gut (or boredom)</h2><p>Most people will tell you that you need to rely and discipline and do the tasks even if you don’t want to do them. I have nothing against it, however in most cases your gut instinct tells you pretty well if you actually need to know something or you are just procrastinating, and if the latter it would make you not want to learn it. Here discipline will actually be bad for you, as you would force yourself to learn something you don’t need or want.</p><p>Perfect example is reading the docs while on an audit. Everyone has had that experience needing to understand the code better and heading to the docs, in order to spend the next 1 or 2 hours mindlessly reading stuff. If you actually gain insight, then that’s amazing! However I can tell from experience that most of the time you would read it with the hope of getting more context, but end up in the same place 2 hours later, with 2 hours less and a ton on energy wasted on useless tasks.</p><p>Same can be said for tutorial hell. Most people after watching enough videos and reading enough boring articles will start to notice that every new piece of content is 95% already known and 5% new stuff. These 5% of “new stuff“ might be useful, but most likely not.</p><p>When you reach that point you would need to shift your priorities. There is nothing bad in learning more, or reinforcing what you already know, however do that in your spare time, don’t count it as “work done” because it’s not. It’s entertainment, especially if it doesn’t change your behavior.</p><p>With time and experience you will get a feeling of what is actually useful and what isn’t.</p><h1 id="h-if-you-do-it-do-it-good" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">If you do it, do it good</h1><p>Finally you’ve got my point (if not, hit me up on twitter, I would appreciate some feedback) and you have eliminated all of the crap and started reviewing the real stuff. Now it comes the time to ask you how well you are doing it ?</p><p>Generally I would suggest when you read an article or watch a video to do only that. Don’t check your phone, or send a few messages on telegram, or read all new emails. Just watch the video and fully concentrate on it. When you finish, do a short 30 second summary in your head.</p><p>If you have chosen to watch it, it means it’s important (even if at the end it proves not to be). Most interviews or podcasts have a tone of hidden implies that are only a sentence or two long and may sound like small talk, but in fact they actually give extreme detail on the methods or way that this guy operates. Multitasking in these cases would mean that you have wasted 1 or 2 hours watching the podcast, but have gotten 20% of it’s insights and thus made near 0 improvements.</p><p>With that I would put an end to my rant. I hope you’ve got the point I was trying to make. If while reading it, or just in general you have some ideas or topics that I have missed, hit me up on twitter and I would add them here.</p><p>And of course if you really liked it, want to share the knowledge or just want to get more followers on X, then feel free to tweet about it!</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/985dc5c1a1ad09fe19c9328afeb61aa49e1397a64e69bc7cff51bf628bac844e.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Advanced learning concepts]]></title>
            <link>https://paragraph.com/@0x3b/advanced-learning-concepts</link>
            <guid>Twp5QC502eG7WmHZUYmb</guid>
            <pubDate>Mon, 29 Jan 2024 06:17:33 GMT</pubDate>
            <description><![CDATA[In this part of Master Your Mind series, we&apos;re diving into the world of learning. Everything in life is a skill, yes…, even breathing, eating, making your parents think you are a disappointment, and learning. However learning is not just a skill, it&apos;s a meta-skill. Now, you might be wondering, what on earth is a meta-skill? Well, it&apos;s a skill that helps you acquire more skills faster. Learning how to learn is the ultimate meta-skill, allowing you to grasp anything faster and be...]]></description>
            <content:encoded><![CDATA[<p>In this part of <strong>Master Your Mind</strong> series, we&apos;re diving into the world of learning.</p><p>Everything in life is a skill, yes…, even breathing, eating, making your parents think you are a disappointment, and learning.</p><p>However learning is not just a skill, it&apos;s a meta-skill. Now, you might be wondering, what on earth is a meta-skill? Well, it&apos;s a skill that helps you acquire more skills faster. Learning how to learn is the ultimate meta-skill, allowing you to grasp anything <strong>faster</strong> and <strong>better</strong>. That sounds good, doesn&apos;t it?</p><p>Today I am gonna teach you 1 concept (useful stuff) and 3 tips (gibberish), enjoy :)</p><h2 id="h-deliberate-practice" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Deliberate practice</h2><p><strong>Deliberate practice</strong> can significantly enhance the performance of a specific skill. It&apos;s important to emphasize that deliberate practice is the key, and it exclusively contributes to the improvement of the targeted skill. Now, I&apos;ll provide you with 2 examples:</p><ol><li><p>Driving your car every day to work won&apos;t make you a F1 racist (I mean racer).</p></li><li><p>There are people who train in the gym for 10+ years, but they still lift the weights wrong.</p></li></ol><p>The first example illustrates that even though you are engaging in the &quot;same&quot; skill (driving), it won&apos;t make you that much better in it. This is because they are not the same skills, it&apos;s a different level of driving. You driving to work at a normal speed, won&apos;t improve your ability to take 90-degree corners at maxed-out 2nd gear. It will only make you better at the normal circumstances. You become a better <strong>normal</strong> driver (and that&apos;s not always the case).</p><p>Now, I&apos;m not suggesting you should speed, but… we all have that one friend who drives like an F1 racer. In most cases, they excel at taking corners, speeding, and avoiding obstacles (hopefully). They engage in learning the skill of racing by driving at high speeds, while you focus on driving normally. These are two different skills, even if they appear similar.</p><p>The same principle applies to coding, auditing, business, or any other field, different levels of a particular skill must be treated as different skills.</p><p>The second example suggests that there is a difference between practice and deliberate practice. Even though there are individuals who train for years, it doesn&apos;t necessarily mean they are training correctly.</p><p>If you are into the gym, you will probably know the basics (hopefully) and notice that some people, despite being jacked, still make fundamental mistakes, especially in compound movements.</p><p>These individuals are merely practicing, they don&apos;t know how to lift, so they lift the weight and hope for gains. This is not the recommended approach in any pursuit. You may achieve some results, however there are better ways.</p><p>First, understand your goal and how to achieve it (check this article if you are curious).</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/4mvQk7T7KQA-pE1YY3_OEpbdFAYOxbKLmIYFYXCJ_P8">https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/4mvQk7T7KQA-pE1YY3_OEpbdFAYOxbKLmIYFYXCJ_P8</a></p><p>Only then should you strive to achieve it, and that is through deliberate practice - <strong>with the intent of improvement and conscientiousness in the task.</strong></p><h2 id="h-drill-everything" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Drill everything</h2><p>Now that we&apos;ve covered how to practice, we will also need to cover the fact that you need to practice. Regardless of how well you perform your job or how deliberately you practice, if it&apos;s done only once a month you will see zero progress.</p><p>The most effective way to acquire a new skill is to turn it into a habit. Habits are made by consistently performing the task as frequently as possible, ideally on a daily basis. A downside is that you&apos;ll only realize a habit has formed once it&apos;s firmly in place. Pinpointing the exact time it takes varies, it could be as short as a few weeks or as long as a few months, depending on the complexity of the habit.</p><blockquote><p>&quot;But what if the skill I need to acquire is suuuuuuuuper boring?&quot;</p></blockquote><p>Well, to that, I would say that with time, it&apos;ll become more interesting and easy. Surprisingly, the more you do a specific task, the more enjoyable it becomes. If you&apos;re someone who hits the gym regularly, you get what I mean. Initially, you might not always feel like going, but after some time (a few months or a year), it starts becoming the best part of your day.</p><p>To summarize it, when aiming to pick up a new skill, choose a consistent time each day when you&apos;re typically free, be it morning before work, or late evening after the kids are asleep. Eliminate all distractions during this time and focus on what you need to do.</p><h2 id="h-retrieval" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Retrieval</h2><p>Knowing how memory retrieval works is absolutely essential for learning faster. Retrieval, for those unfamiliar with the term, is a method used to improve storing a given memory into your long-term memory. It increases the chance that your brain will actually remember what you are learning.</p><p>Certainly, the best way to remember what you are learning is for the subject to be interesting to you. However, in life, the things you must learn are often boring. Even with a few techniques, we can make your brain remember even the most boring subjects.</p><p>Retrieval or recall is simply done by closing the source of information and trying to explain what you just read. It&apos;s that simple. However, you will notice that you can&apos;t retrieve everything. Don&apos;t worry, open the source again and read what you missed. If you want to recall again, you can, and it will increase the benefits even more, but generally, once or twice is enough to remember most of the stuff.</p><p>Now, I know that after reading this article, your behavior when learning won&apos;t change, so I challenge you to try it now. Minimize the tab, close your eyes, and take 1-2 minutes to summarize the parts that you&apos;ve read. Use your own words. Even if you can&apos;t summarize everything, continue thinking, and the explanations will pop into your mind. Trust me.</p><p>Did you do it? If not, here is a second chance...</p><p>As you can see this will increase your time spent when learning. However, it will also increase the number of things you learn, help you connect the dots between different parts, and store this memory for longer. If that&apos;s not a good deal, I don&apos;t know what is!</p><p>Like every other tip on the list, the more you do it, the better it becomes. If you do it with everything important that you must know, over time you will get really proficient at it. It will also force your brain to remember the stuff when reading them, in order to retrieve them later.</p><h2 id="h-dont-take-notes-on-the-same-day" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Don&apos;t take notes on the same day</h2><p>This might sound strange, but hear me out. Your brain is like a computer (very powerful, yet stupid) and like a computer, it has RAM and storage memory. When you read stuff, your RAM fills up, and <strong>when you sleep</strong>, your brain processes this RAM and decides what is &quot;important&quot; (memes, cat videos, embarrassing moments) and stores it. During this time, your brain also &quot;deletes&quot; what it deems &quot;unimportant&quot; (i.e., what you studied today). Learn more <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=2hIhFlNMFxY&amp;t=655s">here</a>.</p><p>Writing is a form of relief. It&apos;s a great way to express what&apos;s on your mind, break it down, and judge it from a logical standpoint.</p><blockquote><p>It gets stuff off your mind.</p></blockquote><p>Now your two brain cells are making the connection. When you write, you &quot;offload&quot; your RAM onto a piece of paper. It&apos;s no longer in your head, and thus your brain doesn&apos;t need to process it.</p><p>All of this processing happens during the fancy sleep you have all heard about - REM sleep. That is why if your girlfriend breaks up with you and you go to bed instead of crying, it&apos;s going to be more beneficial. You will still be single and stressed, but a tiny bit less stressed than the night before.</p><p>Your brain determines which things are important, and it typically does so in the following order (just remember, this field is complex and I am here teaching BRO science, so take it with a grain of salt ):</p><ol><li><p>Fix emotions. If you are learning something and your girlfriend breaks up with you, the next day you will remember almost nothing, as your brain is prioritizing fixing your well-being first. Because if you hug a tree at 160km/h it won&apos;t matter that you scored a C on the final exam.</p></li><li><p>Remember important (aka repeated) stuff. You hopefully know how to learn correctly by now <em>wink</em>.</p></li><li><p>Remember emotions and motor skills. I don&apos;t know which of these is first, so I put them together ( ¯\<em>(ツ)</em>/¯ ).</p></li></ol><blockquote><p>&quot;So, what should I do, never write notes?&quot;</p></blockquote><p>No kind reader... , I would suggest writing them in the morning. This way, you have remembered most of the things, you will have your note, and you have done a retrieval on the information. Everything in one!</p><p>This &quot;exercise&quot; is great and all, however, it may not work for everyone or with every subject. I have noticed that for me, math doesn&apos;t work this way. I need to write the formulas, break them down, and understand them in order to remember anything.</p><p>This should be all for today. If you have enjoyed reading this article, you will probably enjoy reading the rest.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/8db83729606c40d2e3ea33bfcf63bb4829bbe0fc97694677bfe90a7d4e8ba9a8.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Gas from high level]]></title>
            <link>https://paragraph.com/@0x3b/gas-from-high-level</link>
            <guid>tTDgThmAjXCBrIf9hUfm</guid>
            <pubDate>Fri, 19 Jan 2024 07:29:59 GMT</pubDate>
            <description><![CDATA[This won&apos;t be your typical article on basic gas-saving tips and tricks. Instead, it provides a high-level view, focusing on significantly reducing the gas required for deployment and usage.AlgorithmsFinding the most efficient method can be a challenge, it may even require restructuring some functions or even some contracts. But fear not... “Everything that can be invented has been invented.” - Charles H. Du Not vary accurate, but great rule of thumb. Most functions that you are going to ...]]></description>
            <content:encoded><![CDATA[<p>This won&apos;t be your typical article on basic gas-saving tips and tricks. Instead, it provides a high-level view, focusing on significantly reducing the gas required for deployment and usage.</p><h3 id="h-algorithms" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Algorithms</h3><p>Finding the most efficient method can be a challenge, it may even require restructuring some functions or even some contracts. But fear not...</p><p>“Everything that can be invented has been invented.” - Charles H. Du</p><p>Not vary accurate, but great rule of thumb. Most functions that you are going to use have already been optimized for minimal computational requirements. You just need to find the answers (or the solutions *wink*).</p><p>The function below is used in a DAO-type system to return the vote count of a user at a given time. By understanding the context of other write functions and how <code>block.timestamp</code> works, we can deduce that the Checkpoint array is sorted. This is based on the fact that <code>block.timestamp</code> only moves in one direction (towards the inevitable end of time).</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/bdb18493917860814892ab204a2a5e8994c872223c4800a3d2068c3975f3a424.png" alt="Easy, but costly..." blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Easy, but costly...</figcaption></figure><p>With this knowledge, we can implement a binary search algorithm to find our checkpoint more efficiently. You can copy the code from someone else (like I did), or microdose some &quot;substances&quot; and write it yourself.</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/9ee828af9fa034f17dafa4c81204b00b8fbca6de677a69de35db4ed846307e0e.png" alt="Code is not mine. I am not that smart D:" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Code is not mine. I am not that smart D:</figcaption></figure><p>When we compare those two functions, we can find that the gas cost for the normal search is linear (more checkpoints -&gt; more gas), whereas the binary search has an exponential decrease in gas cost (more checkpoints -&gt; a bigger percentage of gas saved).</p><h3 id="h-transfers" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Transfers</h3><p>Transfers and how the system implements them can lead to excessive gas costs. This happens when you perform too many or unnecessary transfers.</p><p>Unnecessary transfers include internal system-to-system transfers, where you move tokens from the user to the periphery contract and then transfer them again to the main vault.</p><p>Implementing such mechanics isn&apos;t necessarily incorrect, but it&apos;s not optimal from an economic perspective.</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/b23d1e2f13d81e883f5e76376832b26c17151453704b0be04bc00e74fed8437c.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>With the above function we can save ourselves some gas if we simply sent the funds to the vault, instead of doing 2 transfers. Same can be said if the vault mints any tokens to the periphery contract and then the periphery distributes them.</p><h3 id="h-math" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Math</h3><p>When it comes to math in older Solidity versions, we were accustomed to seeing only <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/Math.sol">OZ math</a> being used. However, with the newer versions, we started implementing simple math operations (a * b / c) and creating our own functions.</p><p>This is beneficial, as it gives us the ability to perform simple subtraction without the fear of underflow. However, it has led developers to completely abandon the safe and economical math functions and dive straight into simple math.</p><p>While on this topic, I must mention that doing complex math using basic methods like direct multiplication and division can be dangerous, as it&apos;s error-prone.</p><p>Apart from the potential bugs that may arise, we are also wasting gas on calculations that could benefit from optimization or, even better, refactoring.</p><p>For example, consider these two functions, they achieve the same result, but the second one is approximately 18% cheaper than the first.</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/708f70ed78c21697cf01888fb9fe0fee50e25503216a63e350bc48a9bb3c4aab.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><h3 id="h-off-chain" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Off-chain</h3><p>This topic might be somewhat controversial, but I believe that anything not essential in Solidity should be handled by some back-end process. While some protocols can shift a considerable amount of functionality to a back-end or integrate it within the UI, others might require everything to be on-chain.</p><p>Generally speaking, the more complex your protocol is, the more components can be moved off-chain. This approach is beneficial, as it saves the gas required to deploy and operate substantial portions of code.</p><p>Examples of functionalities that can be efficiently removed include complex find algorithms, array sorters, user imputed data (you will see what I mean in <strong>Storage hashes</strong>) and any other elements that can be securely removed from your contract.</p><h3 id="h-merkle-trees" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Merkle trees</h3><p>If you are a developer, you will know what Merkle trees are (hopefully). However, the issue is, do you know when to use them? Well, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/PopPunkOnChain/status/1734686388975722877">this developer</a> didn&apos;t know, which caused him to pay about 6.2K for a transaction that was worth 50 dollars.</p><p>Firstly, let me provide you with a quick (bad) description that will help us identify their use cases.</p><blockquote><p>Merkle trees are compact (user) storage data, great at storing pieces of the same kind of information. Used when we need to insert external information into the EVM.</p></blockquote><p>This could include, as in the aforementioned case, whitelisted tokens, or other data such as users and their reward amounts. It can even be something more complex, like users and the roles they have (if you have many different roles such as admins, guardians, owners, operators, and so on...).</p><p>It doesn&apos;t matter what you store there, as long as it&apos;s a repeatable patters you can get it off your head and into the code.</p><h3 id="h-storage-hashes" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Storage Hashes</h3><p>While discussing Merkle trees, I cannot go away without mentioning storage hashes.</p><p>They are incredibly useful when used correctly. However, improper use can lead to complications and can be quite dangerous. Proper use includes, but is not limited to:</p><ul><li><p>Verifying the important variables on creation.</p></li><li><p>Including <strong>every</strong> variable in the hash.</p></li><li><p>Ensuring that once a hash is used, it is promptly deleted.</p></li></ul><p>With these security considerations addressed, let me introduce you to an impressive piece of code:</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/ead21ca27e85c0c4ad29311897bf75735684819fcf2c584d70ac4e2947be8390.png" alt="code in not mine D:" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">code in not mine D:</figcaption></figure><p>The snippet above demonstrates how to hash an order and store it in a 32-byte space. Compared to using a giant struct, this hash implementation can save a significant amount of gas.</p><p>Furthermore, this approach eliminates the need to store and later retrieve these structs when processing orders. It also removes the need for checks during order processing, as any incorrect user input will result in keccak256 computing an unknown value that won&apos;t be stored.</p><p>This also involves off-chain elements in a sense, as users are not expected to remember and retain all of this information. Here, technically, the developers have &quot;moved&quot; their storage off-chain (not entirely, but to a significant extent).</p><h3 id="h-simplicity" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Simplicity</h3><p>I&apos;m saving the best for last. If you&apos;re reading this, your attention span is longer than I expected, congrats!</p><p>Simplicity is crucial when coding in any language, especially when deploying on the EVM where hacks are everywhere, and the gas cost is higher than Snoop Dogg.</p><p>That&apos;s why it&apos;s crucial to keep everything simple. To achieve this, consider refactoring your functions, making them smaller, and even splitting them if necessary. Your sole goal should be to make everything simpler and clearer to understand, commonly known as “writing clean code”.</p><p>It usually takes a few tries, as no developer can code the perfect function on the first attempt. This is me giving you permission to play with your functions. Don&apos;t be scared, it&apos;s part of the process of real optimization. Slowly but surely, bit by bit, you&apos;ll develop better functions and consequently, better contracts.</p><p>In the meantime, ensure you&apos;re making the function cheaper, not the opposite (and more secure, but that’s for another article *wink*). You can achieve this with foundry gas reports.</p><p>An added benefit tis that the code-base will have fewer bugs, and its audit tends to be on the cheaper side.</p><p>That&apos;s all from me. If you&apos;ve enjoyed this article, feel free to share it with the people who will need it.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/7d2d6f41418e5beae59dbe244aa8ca1a0df0d29b206bdd79d719eba84d65b798.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Focus ain't the secret]]></title>
            <link>https://paragraph.com/@0x3b/focus-ain-t-the-secret</link>
            <guid>meuK3fKNMLvAgsi48lCC</guid>
            <pubDate>Mon, 15 Jan 2024 17:18:12 GMT</pubDate>
            <description><![CDATA[Focus ain&apos;t the secretAnother day, another segment of mastering your mind. As always, today you&apos;re going to realize that it wasn&apos;t your fault, not in your relationships (there you totally deserved everything), but in your career/business. I am going to show you how to unlock your secret potential and achieve what you truly desire.What you missedUp until now, you&apos;ve been aware of only 25% of the equation. Everyone has explained why focus is essential and how to achieve it, ...]]></description>
            <content:encoded><![CDATA[<h1 id="h-" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"></h1><h1 id="h-focus-aint-the-secret" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Focus ain&apos;t the secret</h1><p>Another day, another segment of <strong>mastering your mind</strong>. As always, today you&apos;re going to realize that it wasn&apos;t your fault, not in your relationships (there you totally deserved everything), but in your career/business. I am going to show you how to unlock your secret potential and achieve what you truly desire.</p><h3 id="h-what-you-missed" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">What you missed</h3><p>Up until now, you&apos;ve been aware of only 25% of the equation. Everyone has explained why focus is essential and how to achieve it, but no one has unveiled the other 75%.</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/46e3afc95cfacc1d03586e17202eeeaa96738f4d9bc44951900a3736eb20468a.png" alt="Some random letters and a circle..." blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Some random letters and a circle...</figcaption></figure><p>Above, you see the &quot;holy trinity&quot; (yes, there are 4 things, but I&apos;m bad at math D:). Here, you&apos;re shown:</p><ol><li><p><strong>Clarity</strong> - to know what you want and how to get it.</p></li><li><p><strong>Energy</strong> - your daily energy.</p></li><li><p><strong>Willpower</strong> - the ability to execute boring tasks.</p></li><li><p><strong>Focus</strong> - the multiplier that focuses (<em>pun not intended</em>) the other 3.</p></li></ol><p>Your mentors either didn&apos;t know or didn&apos;t care to show you the other parts of the system. They have glamorized focus and its powers (which it has), but focus is only a multiplier. If everything else is at 0, well... you do the math.</p><p>I will give you some examples with points so your video game-addicted minds can understand them better.</p><p>Most likely, these are your current stats. You are good at focusing and isolating your work. However, the prerequisites that focus multiplies are really low, which will cause your total output to be low as well.</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/7168f6d13296bd4ac5dbecff4b3124f94f552dc987386e2aa42fccfebf96feb0.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>Compare the above to the below, and you will see the difference (it&apos;s 5x).</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/ab4022c5c14a3fc0e079ae3f1d4a49036f762ce85ca628b19082e926e93f4079.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>If you little degenerates think that 5x is not that much, please close this article. I you won’t need the skills anyway.</p><p>Now comes the important question - “What should we eat for dinner?” No... the other important question - “Well, how do I level up my stats?”. That&apos;s what we are going to learn in the next sections.</p><h3 id="h-energy" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Energy</h3><p>Energy is by far the hardest to optimize because it depends on a lot of thing, things that you might like, but are bad for you. However, to achieve your dream goals, you need to make some sacrifices.</p><blockquote><p>If you don&apos;t sacrifice for your goal, your goal becomes the sacrifice.</p></blockquote><p>Energy is also the hardest to define. The best definition I have is “zero brain fog”. It&apos;s the time when you wake up fully rested, fasted, and your brain feels like it&apos;s not yours...</p><h4 id="h-sleep" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Sleep</h4><p>We start with sleep, and like our relationships, everyone talks about polymorphism (many), but anyone that tries it always regrets. If you sleep monomorphically (one sleep), it will be easy to find out how much sleep you need.</p><p>You might be blessed with a 6-hour sleep or cursed with 10. For the biggest optimization, you will need to know how much you need.</p><p>Afterward, you will have to find your chronotype. Chronotype is the word that signifies when you wake up and when you go to bed. If you&apos;ve heard that some entrepreneurs wake up at 4 AM in the morning, remember that they are either lying or early in the morning is their best performing time. Find yours, and you will be amazed at how easy work becomes!</p><p>There are other basic factors that you need to know.</p><ul><li><p>You sleep best at around 16-19 degrees Celsius.</p></li><li><p>Don&apos;t eat at least 3 hours before going to bed.</p></li></ul><p>There are probably more that I can think of, but this is going to turn into a sleep article, so I am going to cut it short.</p><h4 id="h-diet" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Diet</h4><p>Similar to sleep, there are many different types of diets. The &quot;best diet&quot; varies from person to person, and some might feel better on keto, carnivore, or other strange eating habits. However, it&apos;s best for you to identify which foods make you less productive and eliminate them.</p><p>Certain foods, generally fast carbs, can make your brain function like a monkey. They will cause an insulin spike that will make a hungry lion to fall asleep and cuddle with a sheep. As you can guess, this is not good for you. After consuming certain foods (like bananas with honey, I really like those...), your body will expend most of its energy towards digesting the food, rather than engaging in thoughtful activities, ultimately making you &quot;dumber.&quot;</p><p>Find what foods your body functions best on and stick with those. Additionally, ensure you are getting enough protein, fats, vitamins, and all the other important bits.</p><h4 id="h-substances" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Substances ?</h4><p>That depends on you, just try not to overdose... with coffee (I know what you thought). Different stimulating substances like caffeine and black/green tea are quite useful, as long as you don&apos;t become dependent on them.</p><p>Being dependent means using them not because they make you better, but because without them you are worse. You know that you have reached that point, the turning point where you no longer use caffeine, but caffeine uses you. When you reach this point of “I can&apos;t work without coffee”, that is when you should stop drinking it (at least for a while) - <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=y_xA70lWrDs">video on the subject</a>.</p><p>On the other side, coffee and other &apos;substances&apos; can be quite useful if you know how to use them right (<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=cD_FWDYeBMg">another video</a>). They are not for pleasure but for work, and if you use them, it should be for this purpose and this only. Currently, I am on the side of “abusing” coffee for only important work. This means once a day for 6 days a week (at most), and sometimes I will take breaks of 2-3 days.</p><p>With coffee, you build tolerance. If you want to be more efficient (and less addicted), you need to know:</p><ol><li><p>How fast you are building tolerance.</p></li><li><p>How much caffeine you need to have high energy (and enter flow easily).</p></li></ol><p>The first point you just need to figure out by yourself, give it a try and see when the effect of coffee starts fading out. Then you will know when to take a day off from caffeine.</p><p>The amount you need will determine the task you are doing. If it&apos;s manual, you may need higher amounts, and if it&apos;s mental, I suggest microdosing it. When doing mental tasks, you need a calm and effective mind, not one that is high on coffeeine and ADHD.</p><h3 id="h-clarity" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Clarity</h3><p>I know you degenerates think &quot;I want money&quot; is enough for your clarity, however, if it were enough, you would have skipped this section of the article, wouldn&apos;t you?</p><p>&quot;I want money&quot;, &quot;I want fame&quot;, or &quot;I will show them all&quot; are good starting points, however, we need to improve on them as they are really vague. We need to pick a clearer goal for you, one that will satisfy this need and is also autistically easy to follow.</p><p>Most likely, if you are reading this, you are some kind of programmer, so this example will suit you.</p><p>&quot;I want to learn solidity&quot;</p><ul><li><p>Complete 1 part a day of the 30-part solidity course.</p></li><li><p>Read 1 article a day on how different crypto protocols work.</p></li><li><p>Post what you learned on Twitter every day.</p></li></ul><p>Depending on how much free time you have, you can add more tasks, remove some, or make some more extensive.</p><p>The above example is a good level of clarity (you can always make it better and easier to follow) that will give you 3 tasks that you need to finish before turning the PC off. This will prevent you from distractions, as you know you need to finish these 3 before wasting your time on YouTube cat videos.</p><p>And what next? What happens when I learn solidity? Well, your next step to your final goal &quot;make money&quot;, is to get hired as a solidity developer. Here are a few goals you will need:</p><ul><li><p>Start working on a project (for production).</p></li><li><p>Post actively on Twitter and other social media.</p></li><li><p>Complete puzzles and participate in hackathons/CTFs.</p></li></ul><p>If your semi-goal changes in the meantime from &quot;I want to work as a developer&quot; to &quot;I want to have my own project&quot;, you can always switch or replace some of your daily tasks.</p><p>It&apos;s that simple. Clarity is to have a direction and a plan. The clearer the direction and the better the plan, the faster you will move forward in its execution.</p><h3 id="h-willpower" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Willpower</h3><p>The easiest to understand, and the hardest to implement.</p><p>Willpower is the ability to brute force through things that you don&apos;t like.</p><blockquote><p>You are bored and don&apos;t want to write code, &quot;Forget it, I am writing code now,&quot; and you open the editor and start writing.</p></blockquote><p>This is not discipline, this is willpower, and your willpower is like a battery. The more you use it, the less you have left in the tank. To recharge it, you will need better sleep and some passive and active rest. You can check those in another article of mine (after you finish this one <em>wink</em>).</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/r8pU23Aucpp7jnOaP_4lIE99KsFJGBCSm0yY_ynNv38">https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/r8pU23Aucpp7jnOaP_4lIE99KsFJGBCSm0yY_ynNv38</a></p><p>But don&apos;t worry, there is good news too! The &quot;battery&quot; that contains your willpower can actually get bigger. Yes, like every other skill in your life, you can also improve in willpower. And how is that done, you may ask... Well, if you go to the gym, you &quot;break&quot; your muscles, and they become bigger. The same applies here.</p><p>The more you use your willpower, the bigger the battery will become.</p><p>But keep in mind that it can&apos;t be infinite, you can run out of willpower, no matter how big your battery is. This is a reminder not to always rely on it, as it will fail you when you most need it.</p><p>If you want an even better explanation, go and check out one of the videos where I learned these subjects - <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=Pf7A91nDkfs&amp;t">here</a>.</p><p>That should be all for today, thank you again for giving me your time and attention. If you enjoyed this article, feel free to tweet about it!</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/d532be6b56c1a999611c43d94a957c2f76b6bf22ebfd92a428e4d72781015cc6.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[The beginning]]></title>
            <link>https://paragraph.com/@0x3b/the-beginning</link>
            <guid>eupGDhNjOVZOJ9HazUc6</guid>
            <pubDate>Thu, 28 Dec 2023 17:14:57 GMT</pubDate>
            <description><![CDATA[This is the fundamental stuff that you will need on your journey as an auditor. Here, you will read about what the pro players do and why they do it. Let&apos;s begin.Report everything.Write good issues.Spend as much time as you can.Close the cycleThink outside of the box.Report everythingOne extremely common mistake that most auditors make is catching a bug and not reporting it. That may seem stupid. Yes... yes, it is. However, most beginners are not sure what a bug is and what is not. Some ...]]></description>
            <content:encoded><![CDATA[<p>This is the fundamental stuff that you will need on your journey as an auditor. Here, you will read about what the pro players do and why they do it. Let&apos;s begin.</p><ol><li><p>Report everything.</p></li><li><p>Write good issues.</p></li><li><p>Spend as much time as you can.</p></li><li><p>Close the cycle</p></li><li><p>Think outside of the box.</p></li></ol><h3 id="h-report-everything" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Report everything</h3><p>One extremely common mistake that most auditors make is catching a bug and not reporting it. That may seem stupid. Yes... yes, it is.</p><p>However, most beginners are not sure what a bug is and what is not. Some people think only major issues are bugs, like stealing some funds or breaking the whole contract, and so on. However, really simple bugs are also bugs, and they usually are the bugs that pay the most. These bugs can be a simple discrepancy between the docs and code, small errors, things that are &quot;strange&quot; but don&apos;t cause any issues. An example is a recent audit of mine, where a MED is a slight discrepancy between the docs and the code. The bug was worth some money, not because no one knew it or that it was an &quot;advanced&quot; exploit, but because they didn&apos;t report it as they thought it was informational at best.</p><p>That moves us to the second point. Most people are afraid of submitting stuff. I am questioning Sherlock, as they are the guys that punish people for submitting false bugs. However, some people are transferring that feeling of being wrong when they submit an invalid bug to other platforms, like c4. On platforms that don&apos;t punish bad reports, I would suggest reporting everything that you find as &quot;strange&quot;. Put the big stuff as MEDs and the small stuff as LOWs (however, make the report good so you can argue for escalation if that LOW is a MED at post-judging QA). There is no penalty for submitting invalid stuff (unless you submit 15-20 awfully invalid findings, but you are not that stupid... right?). Of course, try not to spam the judge with crappy reports and half-baked findings.</p><p>&quot;<strong>You miss 100% of the bug you don&apos;t report.</strong>&quot;</p><p>Look at another perspective, the perspective of the developer. He is paying for the audit, and as such, you should provide him with as many bugs or inconsistencies as possible. Reporting something &quot;strange,&quot; which may be a bug or may not be, is you trying your best to make the code <strong>as secure as possible</strong>. Because if something &quot;strange&quot; is left out, on future updates, it can be the reason a bug pops up.</p><h3 id="h-write-good-issues" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Write good issues</h3><p>Now, while we are on the topic of issues and reports, it is really important that you write as good reports as you can. That skill purely affects your payout, as you can be a really good auditor, but bad reports will consistently get your findings invalidated or marked as 50% (half the payout). And if you are really good at writing those reports, you can get &quot;selected for report,&quot; a nice title with a 30% reward increase for this issue.</p><p>Here, I am going to give you the short version of &quot;How to get selected for report every time” and if you want more details, check my other article about writing the best report there is.</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/PaGjtbM61hxA1kAqJYXPfrzNaW7Sh_gCX3M5XGsV0SU">https://mirror.xyz/0x3b338e782859aE11c0B15694bc482a9aFa4A5809/PaGjtbM61hxA1kAqJYXPfrzNaW7Sh_gCX3M5XGsV0SU</a></p><ol><li><p>Make it simple - Be sure that, even if the judge hasn&apos;t looked at the codebase yet, he will know what you are talking about.</p></li><li><p>Use ChatGPT - Make the report yourself and use GPT just to structure it better and fix the grammar mistakes.</p></li><li><p>Do a POC if you have time. This is avoiding the 50% mark and making you really close to being the selected report. However, just a POC won&apos;t make you selected, as you need a really good-looking report. And for God&apos;s sake, make those POCs in a Gist, don&apos;t just put 500 lines of code into that report.</p></li><li><p>Use fancy math - Use markdown mathematical formulas (<code>$$ \frac{1^{(n-1)}}{n} $$</code>) if there is math involved.</p></li><li><p>More links, the better - Every time you reference a function, make it a link. Firstly, they add some color to your report, making it less blunt, and secondly, they make it really easy to follow with the main code.</p></li><li><p>Make good resolutions - After doing the report, think of what&apos;s the best solution. If it&apos;s some code that needs to be redone, do a <code>diff</code>, that makes the solution seem extremely simple.</p></li><li><p>Use tables for examples with a lot of prerequisites - save space and looks really good.</p></li><li><p>Use the <code>solidity</code> tag instead of <code>jsx</code> - that may be obvious, but some of you mules are still marking your Solidity code with <code>jsx</code>.</p></li></ol><h3 id="h-spend-as-much-time-as-you-can" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Spend as much time as you can</h3><p>When you are done auditing and you think you are finished, I want you to know that actually, you are 50% done, if even that much. There are always more bugs to be found, more ways to break the system, and more tricks you can pull to score those fine <strong>A</strong>s on QA reports.</p><p>Why is that, you may ask? As described by the best auditors on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HollaWaldfee100/status/1729449267880710166">Twitter</a>, they only catch about 50% of highs and 35-50% of mediums. So why do you &quot;finish&quot; the audit with 6-7 bugs? What makes you think that you have found every bug you can find?</p><p>We often wrap up audits and call them finished because we looked at everything, our minds are exhausted, and we can&apos;t think of any new ideas. We already know the code by heart and every aspect of it. The audit gets hard as we are forced just to think and think of what could go wrong in a system that by now seems empty of bugs. However, no matter how many bugs you have found, there are always more. You need to stop listening to your mind telling you to jump ship to the next audit, focus on the thinking, and be there looking at the code.</p><p>Most times, you are able to find one or two more bugs. Even if you found one, these bugs are often the most valuable. This is because there is another really important concept:</p><p>&quot;<strong>If it&apos;s hard for you, it&apos;s hard for everybody.</strong>&quot;</p><p>This means that when you reach the point that you want to quit, other auditors have reached it too, and they have chosen to quit.</p><p>One really good piece of advice I&apos;ve heard from <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xOwenThurm">Owen</a> is after you have finished the audit, submit everything, read the code one last time. Read it line by line, the same way that you did when you were starting the audit. Most likely, you will catch a few more leads.</p><h3 id="h-close-the-cycle" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Close the cycle</h3><p>We need to close the learning cycle as quickly as possible. Imagine it as a large circle, the faster you close it, the smaller it becomes. We need to make it as small as possible in order to do the most laps, where with every lap you get better and better. This is advice for anyone who wants to progress quickly, because the more you repeat the same mistakes, the more they will slow you down.</p><p>Everyone advises to &quot;review your past audits,&quot; but no one teaches you how to accomplish it. That&apos;s why today I am going to give you the most straightforward advice that anyone could follow, maximizing your learning from every past issue.</p><p>Get yourself a note-taking app, I use <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://obsidian.md/">Obsidian</a>, and we will start making notes.</p><ol><li><p>Make sure you do it as soon as possible.</p></li><li><p>Write the audit name + summary. Write the date and name of the project (&apos;2077-12-coconuts&apos;) and a short description below (like a summary).</p></li><li><p>Write every issue with your own words and link it to the original report.t. Avoid laziness and write each issue in your own words, that&apos;s the primary learning mechanism.</p></li><li><p>Write three or more questions on how this issue can be found again.</p></li><li><p>Close the tab and try to name every issue and how it&apos;s done. This is the secondary learning mechanism. Your brain makes memories not just from reading but from pulling information out of itself.</p></li><li><p>Read all the issues you weren&apos;t able to explain.</p></li></ol><p>If you wish, you can repeat steps 5-6 until you know every issue by heart (it will take 2-3 turns). However, we have already achieved maximal learning with minimal effort. This kind of summary will likely take 30 minutes to an hour, and you will have reviewed every issue, whether you found it or missed it. The important thing is to know how these issues are found and what their structure relies on.</p><h3 id="h-think-outside-the-box" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Think outside the box</h3><p>Finally, but most importantly, you will need creativity for this job. That is the hardest part, yet the most proficient one. Because it doesn&apos;t matter that you spend all day in order to find that finding, it won&apos;t matter that this is your only issue, and it won&apos;t matter if your report is mediocre <strong>if you are the only one reporting this issue</strong>. At the end, if you want to call yourself one of the best, what will matter are your skills at finding the hard-to-find bugs.</p><p>This here is what defines good from great. Your ability to be creative and think outside the box, for your brain to work in ways that no one else can. This is why this is the hardest thing you can do, and of course, the one that pays the most. This is all great, but &quot;<strong>How is that done?</strong>&quot; is the question you are asking yourself.</p><p>To think outside the box, firstly, you will need a box. These are the fundamentals, like solidity, how transactions work, how big protocols work (UNI, COMP), and so on. You will learn them with time, as some audits will require you to know how certain protocols work. Focus on learning things that are important and useful for what you need at the moment.</p><p>You will need to view the system as a whole, not function to function interaction, not contract to contract or protocol to protocol, but the whole web3 as one giant sphere of possibilities. How the contract you are currently auditing will interact with other contracts and the network, this is where the floodgates of creativity will open.</p><p>Here is where I will end, as I have not yet reached this part. I can write more stuff about it, I can say more things that you can do, that you will need, but those will be just guesses.</p><p>I hope you enjoyed the reading. Give this article a tweet and tag me at <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0x3b338">0x3b</a> so we can share this knowledge faster. See you next time.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/787a19141dc8cb517ca7e61905fe351282d31a4fce70b0514158add03b80f33e.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[How to get selected for report every time]]></title>
            <link>https://paragraph.com/@0x3b/how-to-get-selected-for-report-every-time</link>
            <guid>ISXtGLj3WgnbxGCebqpD</guid>
            <pubDate>Thu, 28 Dec 2023 17:05:25 GMT</pubDate>
            <description><![CDATA[This article is for everyone who struggles with writing good reports (95% of this space). I&apos;ll keep the explanations short (to match your attention span) and provide more examples. It&apos;s really important to write good reports. That skill purely effects your payout, as you can be a really good auditor, but bad reports will consistently get your findings invalidated or marked as 50% (half the payout). Also if you are the only one reporting this issue, a good report can be the differenc...]]></description>
            <content:encoded><![CDATA[<p>This article is for everyone who struggles with writing good reports (95% of this space). I&apos;ll keep the explanations short (to match your attention span) and provide more examples.</p><p>It&apos;s really important to write good reports. That skill purely effects your payout, as you can be a really good auditor, but bad reports will consistently get your findings invalidated or marked as 50% (half the payout). Also if you are the only one reporting this issue, a good report can be the difference between invalid and solo. Finally if you are really good at writing reports you can get &quot;selected for report&quot;, a nice title with 30% reward increase for this issue.</p><h4 id="h-make-it-simple" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Make it simple</h4><p>Be sure, even if the judge hasn&apos;t looked at the code-base yet, when he reads your report he will know what you are talking about. Simple, clear, straight to the point.</p><h4 id="h-use-chatgpt" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Use ChatGPT</h4><p>Compose the report yourself and use GPT to enhance its structure and remove any grammar mistakes. If you are like me, you&apos;ll find it quite useful.</p><p>Here&apos;s my approach:</p><p><em>paste the report</em></p><p>If you&apos;re good with how you&apos;ve set things up and the words you&apos;ve chosen, go ahead and &quot;check for grammar.&quot; If you want to make your description sound better, you can &quot;improve on the report.&quot; And if the words seem a bit too complicated, just &quot;use simpler words.&quot; But sometimes, these choices can be a bit much – either too complicated or too simpler. If that&apos;s the case, you can &quot;use simpler words, preferably grade (pick one from 8-12) reading&quot;</p><h4 id="h-do-a-poc-if-you-have-time" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Do a POC if you have time</h4><p>This helps avoid the 50% mark and brings you closer to being the selected report. However, just having a POC won&apos;t make you selected. You also need a well-presented report. And for god&apos; sake, put those POCs in a Gist, don&apos;t simply insert 500 lines of code into the report.</p><h4 id="h-use-fancy-math" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Use fancy math</h4><p>Always use markdown mathematical formulas (using <code>$$</code>), if there is math involved.</p><p>You can:</p><p><code>toleratedGaugeWeight = 80000e18 * 1.2e18 / 1e18 = ...</code></p><p>However it looks 5x better if you do it the correct way. You insert the formula into GPT and let it write it for you.</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/5d0c807a570b235ba0b1949623e1e51968da221f90d160664751d47af5bcfe67.png" alt="Simple math" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Simple math</figcaption></figure><p>I use:</p><p>&quot;represent this formula in .md mathematical format using <code>$$</code>&quot;</p><p><em>paste math here</em></p><h4 id="h-more-links-the-better" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">More links, the better</h4><p>Every time you reference a function, make it a link, firstly they add some color to your report, making is less blunt, and secondly they make it really easy to follow with the main code.</p><p>&quot; Due to the nature of how <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/code-423n4/2023-07-arcade/blob/main/contracts/token/ArcadeAirdrop.sol">ArcadeAirdrop</a> is made and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/code-423n4/2023-07-arcade/blob/main/contracts/token/ArcadeAirdrop.sol#L17-L19">the expectation</a> that there might be a change in the Merkle tree in the near future, users will expect to be able to claim the extra rewards (if they are increased on Merkle root). However, because there is a problematic <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/code-423n4/2023-07-arcade/blob/main/contracts/libraries/ArcadeMerkleRewards.sol#L106-L107">if statement</a> (that is inherited in <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/code-423n4/2023-07-arcade/blob/main/contracts/token/ArcadeAirdrop.sol">ArcadeAirdrop</a> by <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/code-423n4/2023-07-arcade/blob/main/contracts/libraries/ArcadeMerkleRewards.sol">ArcadeMerkleRewards</a>) users that have already claimed their rewards will have <strong>no share</strong> of the future ones. &quot;</p><p>Tell me, doesn&apos;t the above look better that this bellow? If you think it&apos;s the same, you have a bad taste.</p><p>&quot; Due to the nature of how <code>ArcadeAirdrop</code> is made and the expectation that there might be a change in the Merkle tree in the near future, users will expect to be able to claim the extra rewards (if they are increased on Merkle root). However, because there is a problematic if statement (that is inherited in <code>ArcadeAirdrop</code> by <code>ArcadeMerkleRewards</code> users that have already claimed their rewards will have <strong>no share</strong> of the future ones. &quot;</p><h4 id="h-make-good-resolutions" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Make good resolutions</h4><p>After completing the report, consider the best solution you can implement. If it involves code that needs to be redone, use <code>diff</code>, this makes the solution appear extremely simple.</p><p>See how clear the one below is. It clearly highlights the issue we have.</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/8226f34e8f75f777c9b411a181420021148dabc824ff1e65bc578656fd54109b.png" alt="How it will look in the report" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">How it will look in the report</figcaption></figure><p>If you encounter an issue for which you don&apos;t have a clear solution, it&apos;s better to admit uncertainty than to suggest something useless.</p><p>&quot;Because I am unsure of how the developers want this protocol to function, I am unable to propose an effective solution to resolve this issue. Significant parts of the system need to be redone.&quot;</p><p>&quot;Because this issue relates to the overall structure of the protocol, and not some specific one liner issue, I am unable to give an exact solution.&quot;</p><h4 id="h-use-tables-for-examples-with-a-lot-of-prerequisites" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Use tables for examples with a lot of prerequisites</h4><p>This is an area where providing examples in bullet points can make your report long and boring.</p><ul><li><p>the size of the pool is 10,000 tokens</p></li><li><p>the max LTV is 50%</p></li><li><p>and so on...</p></li></ul><p>Can you imagine yourself writing all these as bullet points? Why not use the table below, it&apos;s a great summary and it looks amazing!</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/b767f2d97fd93d1488ad1bcf40e61a4d3d834de6f50b2b74a311db5f2a623be5.png" alt="Isn&apos;t it great?" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Isn&apos;t it great?</figcaption></figure><h4 id="h-use-the-solidity-tag-instead-of-jsx" class="text-xl font-header !mt-6 !mb-3 first:!mt-0 first:!mb-0">Use the <code>solidity</code> tag instead of <code>jsx</code></h4><p>That may be obvious, but some of you mules are still marking your Solidity code with <code>jsx</code> (I also was one of these mules D: ). This is really annoying because some things have color while others don&apos;t. It gives this feeling that it&apos;s your first report ever.</p><p>Finally, after completing most or all of the tasks, there&apos;s no guarantee your report will be chosen. If you believe your explanation is the best, wait for the escalation period and then explain why your report is actually the best. Sometimes, the judge has too many things on their mind and may not thoroughly compare all the reports. This is why you should comment and escalate with a clear description stating why your report is better.</p><p>For example: The currently selected report looks good, however, I believe this one highlights the issue more clearly (<em>selfishly pointing to my report</em>). The report is simpler and easier to understand, with a more in-depth explanation, a great solution, and even includes a runnable POC!</p><p>If you enjoyed this article, feel free to tweet it out. This way, we can help share knowledge faster. See you next time.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/de1d08c7b0aa75fcc140a46bd1ea34feccedfd2216117deb2ae84293b5f4a499.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[The ultimate rest]]></title>
            <link>https://paragraph.com/@0x3b/the-ultimate-rest</link>
            <guid>fpqosn1kpU7xsUXWCIao</guid>
            <pubDate>Thu, 28 Dec 2023 17:04:32 GMT</pubDate>
            <description><![CDATA[In this first part of the series, Master Your Mind, we are going to talk about rest. This is as important as your work, but most people overlook it. "Rest? But, man, I wanna grind 16 hours a day!" Firstly, I may be a woman (I almost believed myself on this), and secondly, that is possible with mindless tasks, ones that don&apos;t require much focus or willpower. However, if you are reading this article, most likely, your primary work/business requires some hard focus, the kind that you need t...]]></description>
            <content:encoded><![CDATA[<p>In this first part of the series, <strong>Master Your Mind</strong>, we are going to talk about rest. This is as important as your work, but most people overlook it. &quot;Rest? But, man, I wanna grind 16 hours a day!&quot;</p><p>Firstly, I may be a woman (I almost believed myself on this), and secondly, that is possible with mindless tasks, ones that don&apos;t require much focus or willpower. However, if you are reading this article, most likely, your primary work/business requires some hard focus, the kind that you need to pull from the back of your dead soul.</p><p>For this to happen easily and at will, you will need some good rest. I am not saying you can&apos;t work 16 hours a day, 7 days a week. I am saying that you don&apos;t have the balls to do it. If you want to consistently put in 12-hour workdays, 6 days a week (maybe 7 if you are a maniac), you will need some good rest.</p><p>Now, I am going to shut up with my rant and just tell you what&apos;s the best rest and why.</p><h2 id="h-what" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What?</h2><p>Boredom. It&apos;s that simple. You can either:</p><ol><li><p>Meditate.</p></li><li><p>Stare at the wall/ceiling.</p></li></ol><p>Here, the important part is to stare at something bland that is not moving and not changing (like a wall...). I prefer to lay on my bed (I set up an alarm if I fall asleep) and watch the ceiling. Meditation also works, but if you are like me, it will need some effort and willpower to meditate, and that is not what we want. We want full rest mode.</p><p>I&apos;ve been doing this for a few months, and I can say that it is by far the best rest thing you can do. Depending on your work, you can stay focused for an hour and a half, maybe 2 hours (maybe 3 if it&apos;s really pleasing), and afterwards you can take a 10-15 min break, just lying on your bed letting your mind think (or try to fall asleep and take a 10 min nap).</p><p>To this, I can also add my Sunday &quot;break.&quot; It is simply the above but exaggerated. Where you can lay on your bed and stare at the ceiling for 2 hours (maybe 3 if you want to have a bigger effect). It is really important not to fall asleep, that&apos;s why you need set up an alarm every 20-30 min. Here we want to make your brain think of all the things it wants to think about. Just let yourself think (you have the time, <em>wink</em>). This exercise is extremely boring, as after about thirty minutes to an hour, it will hit you. You won&apos;t want to lay there doing nothing and will want to go do some productive things, but bear with me, last the 2 hours. This will have a profound effect on your mind.</p><p>Now when you have finished this, you can feel 2 things. Either that you are sleepy or energized. If energized, just go do your work. However, if you are sleepy, we need to start moving your body, do any task that you have planned for the day, or take a short walk (15-20 min) <strong>without listening to music</strong>.</p><h2 id="h-why" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Why?</h2><p>Now it&apos;s the interesting part. Work is the same thing as exercise, however, its effects are larger on the brain than the body (yes, you can feel sore after some mental work). And just like when exercising, you pause between sets, here, we will also need that &quot;pause&quot;.</p><p>However, we need to make the rest relaxing rather than stimulating. This is the most important part, as some things that people consider &quot;rest&quot; are not actually rest (like TV, video games, checking Twitter, or Instagram). Stimulation on rest time is like bench pressing on your 3m squad rest break. You think it won&apos;t affect you because these are 2 different things. However, if your brain can think, you should have been driving a Lambo by now, instead of reading this article.</p><p>This is the magical part here, as the brain likes to stimulate itself, and like the 30-year-old single women, the bigger the better. If we make your &quot;rest&quot; more stimulating than your work, your brain will choose... well, to &quot;rest.&quot; That is why we make it so boring that your brain is thrilled to work again.</p><p>The extra bonus part is that you don&apos;t have infinite thoughts. You think you do because your brain is always full of them. However, that&apos;s because you have no waking moment when you and your brain are together. Every waking second you spend either consuming content or multitasking, like watching a YouTube video while preparing dinner, listening to music while walking the dog, and so on.</p><p>However, if you are left with enough time with your brain, you will just run out of things to think about. All the cringe childhood memories, the awkward moment when you tried to flirt with a girl in the gym, all of that, gone. And what happens afterward, you may ask. Well, here is a 3-minute video about the subject <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=Yb5TV8uHmQ0">link</a> (it&apos;s like your brain overdosed on brake cleaners).</p><h2 id="h-sweat-out-the-stress" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Sweat out the stress?</h2><p>Rest and boredom are good, but you will also need an active way of removing stress from your body. This can be going to the gym, running, some fighting sport, or anything that will get you focused and make you sweat.</p><p>These are needed because with time, you can build up frustration and anger. The rests above will do nothing about these emotions, and if you let them build up with time, they can be the main source of your burnouts. And what better way to remove anger than hitting 100kg on the bench (the weight of 885 cheeseburgers, for all my American readers).</p><p>What I&apos;ve learned from successful people is to space your work between these active stress removers. Simply, wake up -&gt; work -&gt; gym -&gt; work. This will help with the workload, as if your work is more dense and requires large quantities of focus, splitting it into 2 will give you two 4-5 hour work sessions with about 2 hours of &quot;rest&quot; in between.</p><p>That&apos;s all for today. Also, if you enjoyed it, feel free to share it on Twitter and tag me at <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0x3b338">0x3b</a>.</p>]]></content:encoded>
            <author>0x3b@newsletter.paragraph.com (Pyro | 0x3b)</author>
            <enclosure url="https://img.paragraph.com/cdn-cgi/image/format=auto/https://storage.googleapis.com/papyrus_images/eceb8d39e15a67b906901c05a2af6061098dfad0e9d0fc165197848824a57181.png" length="0" type="image/png"/>
        </item>
    </channel>
</rss>