<?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 Jack on Medium]]></title>
        <description><![CDATA[Stories by Jack on Medium]]></description>
        <link>https://medium.com/@JackLongarzo?source=rss-d489f2f42d16------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*l9g0BZFAwbHXc0-BTTurnQ.png</url>
            <title>Stories by Jack on Medium</title>
            <link>https://medium.com/@JackLongarzo?source=rss-d489f2f42d16------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 06:17:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@JackLongarzo/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[Fuse Exploit Post Mortem]]></title>
            <link>https://medium.com/@JackLongarzo/fuse-exploit-post-mortem-76ce18d8974?source=rss-d489f2f42d16------2</link>
            <guid isPermaLink="false">https://medium.com/p/76ce18d8974</guid>
            <dc:creator><![CDATA[Jack]]></dc:creator>
            <pubDate>Sat, 14 May 2022 21:47:55 GMT</pubDate>
            <atom:updated>2022-05-14T21:47:55.564Z</atom:updated>
            <content:encoded><![CDATA[<p>On Saturday April 30 at around 2:20 AM PT seven Fuse pools (8, 18, 27, 127, 144, 146, and 156) were exploited in quick succession. When alerted, the Rari Capital team executed its emergency response plan and paused borrowing globally. This prevented the exploit from being executed on other pools saving tens of millions of dollars. A total of approximately $80 million was stolen from these seven Fuse pools. <a href="https://rari-hack-report.vercel.app/">Here</a> is a more detailed report of how much was lost in each pool, each market, and by each major stakeholder.</p><p>The analysis below addresses the nature of the vulnerability, the additional steps taken by the team, the available options to get these seven Fuse pool functional again, and additional security measures the team is taking.</p><p><strong>Analysis of the Vulnerability and Attack</strong></p><p>The attack relied on borrowing ETH which used .call.value()(), allowing for arbitrary code execution and unlimited gas spend in a fallback function. The attacker was able to call exitMarket() on the comptroller in the reentrancy which was a function not protected by the local/global reentrancy lock on most of the Fuse codebase. Thus the attacker was capable of executing an ETH borrow and releasing their collateral before the borrow state of the account was updated. As ETH was not borrowable in this pool, the exploited pool on Arbitrum relied on reentrancy on ETH redemption.</p><p>In order to steal as much of the available liquidity as possible the attacker executed the following across all 7 pools. Using 3 accounts per pool, the attacker first flashloaned ETH as supply on account 1 and flashloaned stablecoins as supply on accounts 2 and 3. Then, the attacker was able to use accounts 2 and 3 to borrow all of the pre-attack ETH liquidity plus the flashloaned ETH amount via the described reentrancy exploit. They received back both their borrow amounts and collateral and thus were able to repay the ETH and stablecoin flashloans on all accounts. Finally, the attacker was able to borrow most of the remaining available stablecoin liquidity in each pool by leveraging the non-existent, but accounted ETH supply balance on account 1.</p><p>The attacker’s 3 accounts were then left in the following states: Account 1 had a supply balance of ETH and various stablecoin borrows which represent most of the bad debt in the pool. Accounts 2 and 3 had a combined ETH borrow balance equal to the amount of the ETH flashloan plus the pre-attack ETH liquidity in the pool.</p><p><strong>Mitigation Steps</strong></p><p>After immediately pausing borrowing the team executed additional mitigation steps. Given the final state of the 7 pools following the exploit, the utilization for ETH and stables was extremely high and thus interest rates were as well. To combat this, interest rates on Tribe DAO managed Fuse pools were set to a flat 3% rate. Other pool operators affected by the exploit were encouraged to do the same and all have done so. These rates will remain while the affected pools have bad debt and remain paused.</p><p>Subsequent steps were more complicated and required altering the internal accounting of the affected pools. In order to return the affected pools to a healthy state, the attacker’s ETH supply and borrow balances for accounts 1, 2, and 3 were merged into account 1 so that all of the attacker’s bad debt will exist on a single account. This removed the flashloaned ETH collateral and subsequent borrow leaving only one account left with solely the bad debt. The graphic below shows the previous state of the hackers accounts and the current state following this adjustment. The next step is to remove this bad debt from the attacker’s account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yRXVqQSkLyTCcS6x" /></figure><p><strong>Immediate and Future Security Measures</strong></p><p>A fix to the reentrancy vulnerability has been deployed. In the CEther contract, .call.value()() which has no gas limit has been replaced with .transfer() which has a hard 2300 gas limit. This prevents any potential for reentrancy logic to be executed. Additionally, the checks-effects-interactions pattern has been corrected so that the borrow state of the account is updated prior to the transfer logic. This fix will remove the possibility of this exploit or any reentrancy exploit in the future.</p><p>The next step to rebuilding trust between the Fuse protocol and its users is for Fuse to undergo additional security measures. Any differences from the Compound codebase will be heavily reviewed and scrutinized internally over the next few weeks. Fuse E2E and integration testing will also be migrated to a modern Foundry environment.</p><p>The team is also building additional security tooling. This entails a new alert system which will send an alert upon certain triggers. Such triggers could include vast price swings in an oracle or vast amounts of liquidity being moved in or out of a Fuse pool. This will enable quicker response time in the case of any future attack. The team is also building additional infrastructure which will enable borrowing to be paused globally or on any one pool with ease.</p><p>It will be up to the community to discuss any additional security measures they would like to see either prior to or after reenabling borrowing. This may include one or multiple external security audits. These audits could be on the entire Fuse codebase or have a more narrow focus on the differences between the Compound codebase and their implications.</p><p>In the future, Fuse activity and growth will transition to Fuse v2. Fuse v2 will move away from the Compound codebase and be a new money market unlike any that exist today. It will be a far simpler and smaller codebase designed specifically for permissionless markets. Fuse v2 will use a module architecture giving pool creators even more flexibility and customizability. Modules will enable pool operators to swap in custom security parameters which could disable flashloans, limit the amount that can be borrowed in a given period of time, and more.</p><p><strong>Next Steps for the community</strong></p><p>The community has a number of critical decisions to make in order to move forward from the exploit. The first decision is to decide upon issuing a reimbursement for Fuse users affected by the exploit. Discussions on this are currently being held in the <a href="https://tribe.fei.money/t/the-path-forward-from-the-fuse-exploit/4165">Tribe forums</a> and the proposal recently went to <a href="https://snapshot.org/#/fei.eth/proposal/0x17f4d3b0f4d54296b4c36e79fa186d6379d0c0a1ac2b27a599780b5db853de43">Snapshot</a>.</p><p>Second, the community must decide how to resume Fuse activity in the exploited pools. If a vote to reimburse is passed, the DAO can pay back debt on behalf of the hacker. This would restore pools to a healthy state. If the DAO votes for another option that doesn’t reset the bad debt, there are significant technical challenges associated with reactivating these pools.</p><p>Next, there will be a discussion on additional Fuse security measures and the ramifications of waiting for an external audit to reenable borrowing. The Tribe community, Fuse users, current pool creators, and parties intending to create pools should all be involved in this discussion.</p><p>Finally, there will be a discussion on the future of the Tribe DAO insuring Fuse pools. Following the vote to reimburse the recent exploit there will be no insurance on Fuse. Any future insurance will be an explicit policy from the DAO. This may entail select pools being insured or none being insured. This decision will be up to the community to discuss, identify, and vote on.</p><p><strong>To the Community and Security Researchers</strong></p><p><a href="https://github.com/Rari-Capital/compound-protocol/pull/10/files">This pull request</a> encompassing the changes discussed in this article is in scope for the <a href="https://immunefi.com/bounty/tribedao/">Tribe DAO bug bounty</a> as a major change to the Fuse codebase. There is a $2.2m payout for critical vulnerabilities which applies to this change and anything else in the scope of the bounty, see the official ImmuneFi report for scope and additional terms</p><p>The Rari Capital roadmap is evolving quickly. The success of permissionless money markets mandates significant changes to the status quo. To build trust with a subset of Fuse pools and more accurately reflect the permissionless nature of the protocol, the branding of an isolated lending market will grow to become more closely tied to its operator. This separation mandates significant changes to the Rari Capital dApp and branding of the Fuse protocol. There will be an isolated and comprehensive post to discuss these changes at length in the near future.</p><p>Thank you to the Tribe community, Fuse users, and victims of the exploit for your continued patience and support as we work through these challenges together. There are many good paths forward from here that can lead us to a brighter future for the Tribe.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76ce18d8974" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rari Capital: Fuse Security Upgrade Report]]></title>
            <link>https://medium.com/@JackLongarzo/rari-capital-fuse-security-upgrade-report-e5d154c16250?source=rss-d489f2f42d16------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5d154c16250</guid>
            <dc:creator><![CDATA[Jack]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 18:16:48 GMT</pubDate>
            <atom:updated>2022-04-10T18:40:14.224Z</atom:updated>
            <content:encoded><![CDATA[<p>Security researchers actively participating in Tribe DAO’s Discord security channel, raised concerns about a security issue relating to Fuse pools. The Rari Capital team executed our pre-established emergency response plan and immediately fixed the vulnerability. Because of the identification of the vulnerability, and the quick actions in response, no funds were lost. This article will address the nature and identification of the vulnerability as well as the remediation steps executed by the Rari Capital team.</p><p>While security has always been a priority in Rari Capital’s projects, Rari Capital’s capabilities have come a long way since its inception. Rari started as a fair launch project with next to no resources and a team of scrappy yet talented engineers. Today, as a highly experienced group of contributors and a part of the Tribe DAO, the Rari Capital team has exceptional resources enabling it to implement the most extensive security measures. Rari now has contributors who are some of DeFi’s top smart contract engineers, a robust network of security auditing professionals and organizations, and a thriving relationship with the white hat community. However, some of the initial Fuse contracts were written prior to having access to these resources and were not scrutinized like contracts are today.</p><p><strong>The Vulnerability</strong></p><p>At around 4:30 PM PT on March 3rd security researchers including @<a href="https://twitter.com/samczsun"><strong>samczsun</strong></a><strong>,</strong> @<a href="https://twitter.com/HRitzdorf"><strong>hritzdorf</strong></a>, and @<a href="https://twitter.com/YSmaragdakis"><strong>YSmaragdakis</strong></a><strong> (</strong>of @<a href="https://twitter.com/dedaub"><strong>Dedaub</strong></a><strong>)</strong> identified a vulnerability across multiple Fuse pools. Pools 0 to 32 with the exception of Pool 6 were at risk. The Rari Capital team was informed, and the admin multisig immediately paused borrowing across all Fuse pools.</p><p>The vulnerability was on an old version of the cToken and comptroller implementations. Specifically, the vulnerability was on the cEther contract which used .call.value to transfer ETH instead of .transfer like Compound. This is one of a handful of audited changes from the Compound codebase. Unfortunately audits aren’t a silver bullet and this vulnerability slipped through the cracks. It allowed for a cross-asset reentrancy upon cEther redemption where all assets in vulnerable pools could be borrowed for free. This was because the cEther state hadn’t fully been updated with the effects of the redemption before the ETH transfer. As a result all borrowable assets could have been stolen from those pools.</p><p>In late 2021, the Fuse contracts were upgraded to a version which contained a pool-wide check for reentrancy. All pools deployed after pool 32 used the upgraded contracts. Pool admins who deployed prior to the update had an option to upgrade to the latest Fuse contracts from the UI. Of the 32 pools that were deployed with this version of Fuse, only pool 6 was upgraded by its admin.</p><p><strong>The Rari Capital Response</strong></p><p>Upon being contacted by the researchers about the possible vulnerability in the platform, the Rari Capital team initiated processes to identify, confirm, and validate the issue. Per the incident response playbook, it was determined from a set of available actions to immediately pause borrowing globally. An extensive review of the vulnerability took place, which included a PoC, and review of available remediations options. Once the solution was developed, validated, and tested, the team acted fast to expedite the implementation of the fix.</p><p>Each Fuse at risk pool was upgraded to the latest cToken and Comptroller implementations, which prevents this or similar reentrancy vulnerabilities from being exploited. All pools were re-tested to confirm the vulnerability was remediated and borrowing was re-enabled the next morning. All of this occurred within 16 hours of identifying the vulnerability.</p><p><strong>Future Security Measures</strong></p><p>In the past the Rari Team has ensured that all code in production is scrutinized and goes through an extensive auditing process. In response to the identified vulnerability Rari will be taking a series of enhanced security measures. First, Rari Capital engineers are currently conducting extensive internal reviews of the Fuse codebase. Rari Capital and Fei Protocol have also merged their respective Immunefi bug bounties into one joint <a href="https://immunefi.com/bounty/tribedao/">Tribe DAO bug bounty</a>.</p><p>Rari greatly appreciates the relationship and collaboration with the white hat community and with many of DeFi’s top security engineers. Thank you to all who assisted in identifying and nullifying this vulnerability and to the community who continues to contribute and support as we move forward stronger than ever.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5d154c16250" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>