<?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 FΞLD | ( 🍌,🍌) | mrbayc.eth on Medium]]></title>
        <description><![CDATA[Stories by FΞLD | ( 🍌,🍌) | mrbayc.eth on Medium]]></description>
        <link>https://medium.com/@Feld4014?source=rss-f56d82019835------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*C-xwo74vV-7FvcYi.jpg</url>
            <title>Stories by FΞLD | ( 🍌,🍌) | mrbayc.eth on Medium</title>
            <link>https://medium.com/@Feld4014?source=rss-f56d82019835------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 02:38:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Feld4014/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[Manage Risk by Using Different Wallet Addresses.]]></title>
            <link>https://medium.com/@Feld4014/manage-risk-by-using-different-wallets-bc19f67705e2?source=rss-f56d82019835------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc19f67705e2</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[FΞLD | ( ,) | mrbayc.eth]]></dc:creator>
            <pubDate>Sun, 12 Dec 2021 05:03:32 GMT</pubDate>
            <atom:updated>2021-12-13T05:28:00.346Z</atom:updated>
            <content:encoded><![CDATA[<p>Smart Contract Risk, Accidents, and Carelessness prevention.</p><h3>Ethereum Wallet Security Primer</h3><p>By now I’m sure you’ve heard the horror stories, the hacks, and enough scams that if you have been around the Ethereum ecosystem long enough to know what ‘gwei’ means, you probably should be using a hardware wallet by now. If not, check out <a href="https://medium.com/@ppman/a-quick-guide-to-crypto-cold-storage-for-ethereum-nft-holders-d23f3f913b1a">PPMan’s guide to setting up a hardware wallet</a>. There have been all kinds of twitter threads on why you should get a hardware wallet, and <a href="https://twitter.com/richerd/status/1403728108084023296">the inspiration to finish this post came from a most recent one by Richerd on twitter</a>. However, this post is going to cover what happens after that, and what smart contract risk is, and how you can avoid it! <strong>BUT </strong>— <strong><em>A hardware wallet is not a security magic bullet. It is only the first step!</em></strong></p><h3>But First, How Do Approvals Work?</h3><p>In order to understand why we would even want to do this, we need to understand how Smart Contract approvals work. In order for <strong><em>any</em></strong> smart contract to interact with anything other than ETH (including <a href="https://www.coinspeaker.com/guides/what-is-wrapped-ethereum-weth/">WETH or ‘Wrapped Ethereum’</a>) you MUST give it an approval to do so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*h5EOESiKtXBjqfL5xCdCeQ.png" /><figcaption>Figure 1 — Example of an approval transaction on etherscan.</figcaption></figure><p>Whatever you approve, generally stays on your account forever. If you give ‘<strong>INFINITE APPROVAL’</strong><em> </em>(A Security no-no, but still common) to a contract, it will make interacting with that contract cheaper, since you won’t have to do gas approvals every time you want to transact. However, you are sacrificing a bit of security when you do this. A common example of this is making WETH offers on Opensea. If you have already done it once, it is gasless, and if your offer gets accepted, the WETH is pulled straight from your account. No transaction required. Cool… and scary, right?</p><h3>So Then, Why Use Separate Wallets?</h3><p>There are many reasons but the first of which is <strong>risk management</strong>. The biggest risk we are trying to avoid here is smart contract risk! I have several different wallets, and they are configured in a sort of “<a href="https://csrc.nist.gov/glossary/term/air_gap">air-gapped</a>” fashion from each other. See the illustration below for an example of what I mean:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*GBXJ3eTzw02e7m2H" /><figcaption>Figure 2 — Diagram taken from <a href="https://twitter.com/drakedanner">@Drakedanner</a> on twitter illustrates the concept quite well.</figcaption></figure><p>Notice how the ‘Large Holdings’ is never interacting with smart contracts directly. This wallet does not mint, it does not stake, claim, Add/Remove Liquidity. It should not be initialized on Opensea, and if it is, you sure as hell shouldn’t be signing any messages with random strings in it (more on this later)! A good mental model for this is to think of your Active Wallet as what you’d be willing to carry around in your pocket at any given time, and your ‘Large Holdings’ cold storage as your Bank Account.</p><p>Sometimes it makes sense to have <strong>multiple</strong> “large holdings” wallets as a DeFi power user, especially if you want to protect yourself from interacting with new smart contracts that might do unexpected things. I actually suggest at least 3 wallets for the crypto native who has a large amount of DeFi and NFT value on the blockchain. Keep in mind you can have all of these wallets on one hardware wallet. You don’t have to buy multiple hardware wallets to protect yourself from these types of risk! The three different wallets are as follows:</p><ol><li>1+ Wallets for minting new things and interacting with high risk DeFi protocols. If any of these become worth anything, you can transfer them out to different wallets later.</li><li>1 Wallet where you put high value NFTs you don’t plan to sell, or large balances to park and not interact with smart contracts with (not all of your crypto has to be earning yield and farming, y’all, sheesh!). Do not initiate an Opensea, rarible, or any other kind of profile here. Do not list high value NFTs from here. Transfer them back out to another wallet when you plan on selling them.</li><li>1+ Wallets where you interact with only the most trusted protocols and websites, with higher value balances/NFTs that you plan to sell. Some folks even have multiple of these wallets just in case.</li></ol><h3>Seems a Bit Overkill, No?</h3><p>Everyone has their own risk tolerance, so do your own research, and manage your own risk accordingly. I’m just here to point out some of the risks. However, it is not just purely theoretical. This is one of the largest attack vectors around, especially for users with a hardware wallet already. I was recently a victim of a hacked front-end that caused me to approve 2.5WBTC to a malicious address. <a href="https://medium.com/@Feld4014/whelp-i-got-hacked-986224ff12c4">Read more about that here</a>.</p><p>If you are more of an NFT user, a recent scam/hack that has was able to scam a few people out of their high value NFTs was taking advantage of Opensea’s transaction API. Essentially, when you went to this website to “sign a message to prove you own this wallet”, what you were ACTUALLY signing was an Offer acceptance transaction, basically selling your high value NFT’s for 0.00001ETH. The <a href="https://medium.com/u/b7346f3882bb">OpenSea</a> API twitter posted about it here:</p><h3>OpenSea API on Twitter: &quot;⚠️ We&#39;ve received reports of a 3rd party site tricking users into creating orders on OpenSea.We&#39;ve disabled API access to order creation until we finish our investigation into the matter. / Twitter&quot;</h3><p>⚠️ We&#39;ve received reports of a 3rd party site tricking users into creating orders on OpenSea.We&#39;ve disabled API access to order creation until we finish our investigation into the matter.</p><p><strong>Warning: </strong>I know, I’m telling you to never sign anything. But I know some of you will sign something anyway. However, you should be very careful with what you sign. Have you ever seen a signature request that looks like the one below? Well if so, you should <strong>NEVER SIGN IT!</strong> If it is simply a hash, you have no idea what it is you are signing. It could be instructions to OpenSea to sell your most valuable NFT for 0.00001, or it could be leveraging some smart contract you’ve given approval to already to steal your funds through it! Stay vigilant!</p><h3>AndyJiang on Twitter: &quot;Please share the original message which your website requests me to sign.If you can not provide the original message, then your website is very suspicious. !!!!!!!!!!!!!!!!!!!!! pic.twitter.com/DgXFfDIGtj / Twitter&quot;</h3><p>Please share the original message which your website requests me to sign.If you can not provide the original message, then your website is very suspicious. !!!!!!!!!!!!!!!!!!!!! pic.twitter.com/DgXFfDIGtj</p><h3>Conclusion:</h3><p>The NFT/DeFi landscape is a scary place. We’ve seen an absolute maddening amount of increase scams using phishing links, etc. Make sure you don’t sign malicious approvals, learn to check the smart contract inputs on your approvals just in case! Also, if your approvals look anything like my old minting wallet (below), probably best to just abandon it if possible. Revoking permissions does cost gas, so depending on how bad it is, maybe its best to just move your funds to a new wallet all together!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_IWarzp-cS17OOW-q-SVLw.png" /><figcaption>Figure 5 — Too many approvals on an old minting wallet. This is what you don’t want to see!</figcaption></figure><p>If you feel you may have some approvals you shouldn’t have, you CAN in fact revoke them! A few resources in doing so are here:</p><ul><li><a href="https://debank.com/profile/[your-address]/approve">DeBank ｜ DeFi Wallet for Ethereum Users</a></li><li><a href="https://revoke.cash/">Revoke Your Token Approvals on Over 60 Networks | Revoke.cash</a></li></ul><p><a href="https://etherscan.io/tokenapprovalchecker">https://etherscan.io/tokenapprovalchecker</a></p><p>Anyway, feel free to <a href="https://twitter.com/feld4014">reach out to me on twitter</a> or discord if you ever feel paranoia about your own security status. I live to keep this space safe, but I need everyone’s help to do it! Cheers y’all!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc19f67705e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Whelp, I Got Hacked!]]></title>
            <link>https://medium.com/@Feld4014/whelp-i-got-hacked-986224ff12c4?source=rss-f56d82019835------2</link>
            <guid isPermaLink="false">https://medium.com/p/986224ff12c4</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[badgerdao]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[hacks]]></category>
            <dc:creator><![CDATA[FΞLD | ( ,) | mrbayc.eth]]></dc:creator>
            <pubDate>Tue, 07 Dec 2021 17:29:18 GMT</pubDate>
            <atom:updated>2021-12-09T04:12:16.964Z</atom:updated>
            <content:encoded><![CDATA[<p>Badgers, Bitcoins, and Bad UIs!</p><p>So one of my worst fears happened. Getting hacked in a Web3 world, with a very Web2 exploit. So what happened? Well lets just say the words “Increase Allowance” will always make me shudder from this point forward. Apologies to my future children 😭…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LvK3fpKR_uAMqsypcllN_g.png" /><figcaption>Fig 1 — Increase Allowance Method</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CCK_JO3N2QSRP-D4lG40dQ.png" /><figcaption>Fig 2 — The Inputs of the transactions I neglected to read.</figcaption></figure><p>As shown above, I approved a transaction that essentially gave permission to the listed wallet under [0]: 1fcdb04d0c5364fbd92c73ca8af9baa72c269107 full spend rights (that arbitrarily large number at the bottom) to my Curve ibBTC/sBTC staked LP tokens (This contract, for those that are curious: <a href="https://etherscan.io/address/0xae96ff08771a109dc6650a1bdca62f2d558e40af">https://etherscan.io/address/0xae96ff08771a109dc6650a1bdca62f2d558e40af</a> )</p><h3>But How?!?!</h3><p>It all came down to a compromised Cloudflare API Key. Cloudflare defines itself as a product that “secures and ensures the reliability of your external-facing resources such as websites, APIs, and applications”. So you can imagine, getting access to the crown jewels as an attacker is pretty bad for the website owner! What it essentially allowed the hacker to do is inject a script into the UI of badger.com and as you can imagine, that is when this got really ugly.</p><p><em>“The malicious script would interact with the injected web3 provider and intercept any web3 transactions. When it did that, </em><strong><em>it would search the API for the user’s highest sett balance, and request approval for that sett for the hacker’s address</em></strong><em>.</em></p><p><em>They ran this for 1–2 hours, then removed the script, and ran that at random intervals to avoid detection.”</em></p><p>So these folks actually queried to see which one of my deposits was the highest, and took that one? Sheesh, rude! So this meant, whenever a user went to do <strong>any</strong> transaction on badger.com this approval would sneak itself in there. And the worst part? It was damn effective too!</p><p><strong>Update:</strong> <a href="https://badger.com/technical-post-mortem">The full technical post mortem has been released here</a>.</p><h3>The Impact</h3><p>The estimated losses are somewhere in the ballpark of 2.1k BTC (0.01% of the total supply of BTC!) and 151ETH. My personal impact was just north of .1% of the total damage, but still very painful! Check out the full summary of the assets taken here:</p><h3>PeckShield Inc. on Twitter: &quot;Here is the current whereabouts as well as the total loss: $120.3M (with ~2.1k BTC + 151 ETH) @BadgerDAO pic.twitter.com/fJ4hJcMWTq / Twitter&quot;</h3><p>Here is the current whereabouts as well as the total loss: $120.3M (with ~2.1k BTC + 151 ETH) @BadgerDAO pic.twitter.com/fJ4hJcMWTq</p><p>Thankfully these types of transactions can only give hackers access to a single token in your wallet (other than ETH), so the damage was limited to that single token, for badgers, many of us hold quite a bit of WBTC or ibBTC or their deposited derivatives, so for some, it was a total wipeout.</p><h3>How Could This Have Been Prevented?</h3><p>Well, the investigation is ongoing, and the obvious answer is “Well, maybe if Badger had better Cloudflare API key management, eh? Well, yes and no. In fact, the hacker took advantage of several inefficiencies and weaknesses in transaction flow and wallet software that made this attack be able to go on for WEEKS, <strong><em>almost</em></strong> undetected¹.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*1MHDSWQBgOF5B_apq4lWMQ.png" /><figcaption>¹Figure 3 — A community member bringing the issue up with the team, unfortunately getting brushed off.</figcaption></figure><p><strong>What Wallets Could Do</strong></p><ol><li>Wallets should make transaction outcomes human readable. Trezor, Ledger, Metamask, all of them: How many of you swipe through your Trezor that just shows a mess of hex strings and go “Whelp, hope that’s right!”? Unfortunately probably most of us. Whether its through a premium service that allows <a href="https://www.blocknative.com/blog/what-is-simulation">transaction simulation</a> , or just figuring out a way to decipher the transaction more efficiently for users would be a huge start. Give the right tools to the end user to be judicious with their transactions.</li><li>Have a reputation system for protocols. If you are connecting to a new smart contract, or one that isn’t run by known protocol? Just throw up a little red box! ezpz, right? Managing that list would be a full time job at first, but could be automated with some rules and API calls to protocols like zapper, etc.</li><li>Throw up a BIG FAT WARNING when a protocol is requesting infinite permissions to any asset. Yes it can be annoying to re-auth funds every-time you wanna stack your farms, but you know what else is annoying? Having some malware query your wallet and give itself INFINITE ALLOWANCE to whatever ERC-20 token you have the most of, in terms of value, in your wallet.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*FsSJh7LS2mEYsJx-lixTcA.gif" /><figcaption>Fig 4 — What the world should be saying about infinite allowances.</figcaption></figure><p><strong>What You Can Do</strong></p><ol><li><strong>Audit your permissions!</strong> Doing occasional housekeeping on your address, especially for those pesky infinite permissions is necessary! Try searching <a href="https://debank.com/profile/[YOURADDRESS]/approve">https://debank.com/profile/[YOURADDRESS]/approve</a> to see what all you’ve approved. Some things aren’t entirely obvious what they are either (took me a while to figure out what Project Wyvern was, for example).</li><li><strong>Slow down. </strong>Learn how to read what your transactions are doing. Badger user <em>fewture</em> was able to see something was off by checking the input data and seeing that the approval was requesting was some random address. It may sound like a lot of work, but for wallets containing a lot of funds, take the time. Make sure you are dealing with the correct contract, and be suspicious of any approval request.</li><li><strong>Use a hardware wallet.</strong> Although it wouldn’t have helped in this particular case, too many people are not taking security seriously enough in this space. As a mod in the BAYC server, I’ve seen at least 50 apes/mutants hacked/stolen. Don’t become another statistic. Protect yourself. 90% of those attacks could be prevented with one simple trick: Buying a hardware wallet!</li></ol><h3>So, What Now?</h3><p>Well, the investigation is ongoing. If you’d like to follow this exploit’s resolution, check back to <a href="https://badger.com/exploit/updates">https://badger.com/exploit/updates</a> periodically for more. In the mean time, use a hardware wallet, be judicious with your approvals, and stay tuned for my next article about protecting yourself from smart contract risk through wallet separation, cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=986224ff12c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>