<?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 Andy Pavia on Medium]]></title>
        <description><![CDATA[Stories by Andy Pavia on Medium]]></description>
        <link>https://medium.com/@AndyPavia?source=rss-824f660de551------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ybFtRcOggXJRGsIF1wMMtg.jpeg</url>
            <title>Stories by Andy Pavia on Medium</title>
            <link>https://medium.com/@AndyPavia?source=rss-824f660de551------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:09:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@AndyPavia/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[Three Potential Swans in Crypto]]></title>
            <link>https://medium.com/@AndyPavia/three-potential-swans-in-crypto-881a69825408?source=rss-824f660de551------2</link>
            <guid isPermaLink="false">https://medium.com/p/881a69825408</guid>
            <dc:creator><![CDATA[Andy Pavia]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 07:19:16 GMT</pubDate>
            <atom:updated>2026-06-25T08:49:15.753Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Leverage, Yield, and Asymmetry — Three Fragilities, One System</strong></p><blockquote><strong>Disclaimer:</strong> This analysis does <em>not</em> represent the views of Swissblock or any other company. It represents the unfiltered thoughts of someone who has had too much coffee, perhaps spent too long in the crypto trenches, and possesses not enough risk aversion. Follow along at your own risk — preferably with a helmet and a stop-loss.</blockquote><p>Crypto thrives on reinvention. It creates new forms of money, new market structures, and new ways to move capital. But underneath this innovation lies the same old gravity: leverage, yield, and information. These forces drive growth — and they quietly embed fragility as most systems that fight entropy.</p><p>Across this landscape, three projects stand out as symbols of those forces. They are fascinating, unprecedented economic experiments. They are not equal in the risk they pose. One sits at the center of the crypto economy, holding enough of its core asset to drag the entire market down if it stumbles. The other two are powerful and growing fast, but their failure would be disruptive rather than catastrophic.</p><p>These are the three potential swans in crypto:</p><ul><li>Ethena — the Swan of Synthetic Yield</li><li>Hyperliquid — the Swan of Information Asymmetry</li><li>MicroStrategy — the Swan of Leverage</li></ul><h3>Ethena — the Swan of Synthetic Yield</h3><p>Ethena is a bold and fast-growing system that functions as a kind of camouflaged cash-and-carry fund that lets investors exchange fully regulated stablecoins like (USDT) for an equal amount of Ethena’s stablecoin (USDe), which entitles them to earn yield denominated in USDe. Behind the scenes, the deposited USDT is deployed across several yield-generating strategies, including:</p><ul><li>native (ETH) staking yields</li><li>cash-and-carry basis trades</li><li>indirect exposure to U.S. Treasury bills through USTB</li></ul><p>Among these, the most lucrative has consistently been the cash-and-carry trade, which relies on supplying collateral to meet the demand for leverage on centralized exchanges such as Binance. In this setup, USDT serves as collateral for linear-margined perpetual futures contracts, where part of the USDT is swapped for (BTC) or ETH to form the spot, or “hold,” leg of the trade. In inverse-margined perpetual contracts, the USDT is first converted into BTC or ETH, which is then used as both margin and the held asset. As long as there is sustained demand for leverage in perpetual markets and a persistent tilt toward long positioning, the strategy can generate a positive yield by holding the underlying asset while simultaneously shorting it to maintain a delta-neutral exposure.</p><p>Let’s examine the composition of the treasury, as it is paramount to both maintaining the stablecoin’s peg and its ability to generate the yield that sustains the protocol. The chart below illustrates the composition and growth of Ethena’s system backing throughout 2025, showing how its collateral base has evolved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*9sVvKMDkrDM2FvkLVdJRUg.png" /><figcaption><a href="https://app.ethena.fi/dashboards/transparency">https://app.ethena.fi/dashboards/transparency</a></figcaption></figure><p>After holding relatively steady at around $5–6 billion in collateral early in the year, mostly and with smaller allocations in ETH liquid staking tokens (LSTs), liquid stablecoins, and a minor amount of Solana. Ethena’s reserves began expanding rapidly from late July onward, doubling to more than $12 billion by mid-September. As of September 11, 2025, the system’s collateral mix included approximately $3.85 billion in Bitcoin, $1.22 billion in Ethereum, $500 million in ETH LSTs, $58 million in Solana, and the biggest portion, $7.51 billion in liquid stablecoins. The sharp increase in stablecoins as a share of the total suggests a deliberate move toward a more liquid and defensive posture, while the continued presence of BTC and ETH shows that Ethena is still fundamentally leveraging volatile crypto assets to support its structure.</p><p>This acceleration in stablecoin accumulation is a positive signal. It suggests that it can de-risk its collateral base while still sustaining competitive yields for stakers. Of the roughly $12 billion in issued, less than half (about $5.8 billion) is currently staked, which decreases pressure since only staked USDe (sUSDe) can claim the yield.</p><p>The chart below highlights the distribution of positive versus negative funding days for Ethena over the past year, offering insight into the prevailing market conditions that underpin the bulk of its yield generation model. It shows that during this period, funding rates were positive on 91% of all days and negative on only 9%. This indicates that traders were paying to hold long perpetual futures positions for the vast majority of the time, which in turn allowed Ethena’s cash-and-carry strategy — long spot and short perpetuals — to consistently capture positive funding income.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*IICB3HzYuGthbdUmDh_t-g.png" /><figcaption><a href="https://app.ethena.fi/dashboards/transparency">https://app.ethena.fi/dashboards/transparency</a></figcaption></figure><p>The dominance of positive funding days suggests that market sentiment has largely favored bullish positioning, creating a favorable environment for Ethena’s mechanism to generate yield. Negative funding days, when shorts are paid to hold their positions, have been relatively rare and short-lived, which limits the periods when Ethena’s strategy could become unprofitable or require adjustments. Overall, the positive funding supported the stability and profitability of Ethena’s system over the observed timeframe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*TNF4hcOEqCdhVHUwZ3Ljpg.png" /><figcaption><a href="https://app.ethena.fi/dashboards/transparency">https://app.ethena.fi/dashboards/transparency</a></figcaption></figure><p>The chart above shows the three-month trend of protocol APY and sUSDe APY for Ethena, illustrating how both yields have moved in close correlation while experiencing notable fluctuations. Starting from relatively modest levels around 3–4% in mid-June, yields climbed steadily through July, peaking above 12% around July 26 before briefly dropping back near 2% at the start of August. After this sharp dip, both rates rebounded strongly and showed heightened volatility throughout August, with multiple surges above 10%. In early September, yields stabilized somewhat, hovering between 5% and 9% while still showing short-term spikes. The close alignment between protocol and sUSDe APY underscores the consistency of yield transmission from the core mechanism to sUSDe holders — though it’s worth noting that protocol APY has been slightly lower, suggesting that stakers have been paid in excess, likely fueled by the appreciation of non-delta-neutral positions such as BTC and ETH.</p><p>While this yield performance is attractive, it is important to recognize that some of its non-delta-neutral positions and the operational machinery required to sustain Ethena introduce significant risk. The system’s core design depends heavily on funding dynamics, margining practices, and the liquidation infrastructure of centralized exchanges, which brings several layers of market exposure. Its yield comes primarily from cash-and-carry trades, where collateral is posted on large trading venues to capture positive perpetual funding rates. If these funding rates turn negative for a prolonged period, or if demand for leverage evaporates, the strategy’s core engine could stall. In parallel, the use of leverage exposes the system to margin collateral risk: sudden price drops could rapidly erode collateral values and trigger forced liquidations. While risky, these mechanisms run on infrastructure that remains liquid and stable, as most global crypto trading still flows through large centralized exchanges like Binance, which have shown resilience.</p><p>More concerning, however, is Ethena’s reliance on custodial solutions to hold the backing assets for USDe. These custodians represent single points of failure and are vulnerable to censorship, asset freezes, or legal seizures if targeted by regulators or compromised by internal failures. This custodial layer is often overlooked but introduces systemic fragility to what is otherwise marketed as a decentralized protocol. Yet the greatest risk lies in Ethena’s regulatory positioning. Because it offers a yield-bearing product backed by active financial strategies and marketed as an investment vehicle, regulators could classify USDe or its staked variant sUSDe as securities. Such a determination would subject Ethena to securities laws, forcing registration, disclosures, and compliance obligations that could fundamentally disrupt or even halt its operations. This intersection of custodial dependence and regulatory exposure represents the protocol’s most acute vulnerability, overshadowing the more familiar market risks embedded in its design.</p><p>Ethena is ambitious and elegantly engineered, yet its risk profile is largely sectoral rather than systemic. If it were to fail, it would primarily impact its users, but not the broader crypto ecosystem. Ethena is best described as a grey swan, potentially dangerous, but unlikely to trigger widespread contagion. Much of its residual risk stems from questions of censorship resistance and legal positioning rather than structural fragility. In practice, most USDe can be redeemed for USDT, and as the cash-and-carry trades become less attractive, the protocol’s treasury policy is to increasingly lean on USTB (tokenized U.S. Treasury bills issued by Coinbase), therefore increasing its stablecoin percentage.</p><p>Relying on less censorship-resistant trading venues would lower the risk of being censored. However, these trading venues would need to have deep liquidity and low slippage. Interestingly enough, something that the next potential swan offers.</p><h3>Hyperliquid — the Swan of Information Asymmetry</h3><p>Hyperliquid has quickly taken the crypto community by storm, building a strong brand and loyal following through its open and transparent design, aggressive airdrop campaigns, and rapid, sustained growth in trading volume that is now beginning to rival Binance. The chart belows shows that Hyperliquid was able to capture 13% of the perp swap volume in August 2025.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_4VqgPP7DfXGqg1P4FchQ.png" /><figcaption>provided by the Block</figcaption></figure><p>Hyperliquid is interesting because of its architecture. It operates as a replicated state machine that runs a central limit order book (CLOB). This approach has been attempted in the past, but never with this level of success. It aims to bring the efficiency of a CLOB while retaining some of the decentralization benefits that have made automated market makers (AMMs) popular. AMMs function particularly well for retail traders and as components of smart contracts that require guaranteed on-chain liquidity.</p><p>Most decentralized exchanges today use AMMs, where liquidity is pooled from multiple providers and trades are executed directly against these reserves. Prices are determined algorithmically using the constant product formula (x × y = k), ensuring that reserves stay in balance. This model is considered “capital efficient” because liquidity is always available and fully utilized, unlike in traditional order books where capital can sit idle waiting for matches. However, AMMs come with major drawbacks: liquidity providers are exposed to impermanent loss when asset prices diverge, and traders face slippage — especially on large orders — because prices shift as they consume liquidity. These structural issues, along with susceptibility to maximal extractable value (MEV), have made AMMs unattractive to larger, more sophisticated participants who are unwilling to take on these risks just to provide liquidity.</p><p>This is where Hyperliquid diverges<strong>.</strong> Instead of relying on AMMs, it uses a CLOB architecture that resembles the infrastructure of major centralized exchanges such as Binance. Rather than passively providing pooled liquidity, traders place bids and asks that are matched by the system, allowing them to control execution prices and avoid impermanent loss. This design delivers lower slippage and a more predictable trading experience, which appeals to larger players and market makers. Hyperliquid achieves this in a decentralized manner by running its own high-performance replicated state machine off-chain, settling trades without requiring users to bridge funds or switch networks. This architecture combines the performance of centralized exchanges with the self-custody and permissionless access of on-chain systems, offering a fundamentally different alternative to the AMM model.</p><p>The diagram below illustrates this difference, contrasting a traditional single state machine with Hyperliquid’s replicated state machine to show how its decentralized CLOB architecture operates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*foufJoF-nllo2i_1hNmmZQ.png" /></figure><p>On the left, the single <strong>state machine</strong> shows a traditional centralized setup: all trading activity is processed by a single node. Inside that node lives the entire market state, including the order book (bids and asks), active orders, executed trades, and other exchange data. Because everything runs on one machine, all users rely on this single point of execution and truth. This is how most centralized exchanges work: there’s one canonical source of market data and matching logic.</p><p>On the right, the <strong>replicated state machine</strong> shows the decentralized model. Instead of relying on one node, multiple nodes each maintain a <strong>copy of the same state;</strong> the same bids, asks, orders, and trades. These nodes continuously communicate and synchronize to ensure their local state remains identical. This replication allows the system to operate without a central operator while preserving the determinism and consistency required for order matching. In essence, it distributes the same high-performance trading engine across multiple independent participants, ensuring fault tolerance and decentralization without sacrificing speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZWgoTKKzzi9UIFlldSWrg.png" /></figure><p>Because network design directly shapes how quickly and evenly market data propagates, it also determines where information asymmetries arise. The diagram above contrasts a canonical decentralized network architecture with the private network architecture used by Hyperliquid, highlighting how information reaches clients in each mode and how this affects who can act on it first.</p><p>In the canonical decentralized network (top), multiple <strong>validator (full) nodes</strong> form a peer-to-peer network where each node independently validates transactions and maintains the full state. These validators are openly accessible, and anyone can run one. <strong>Reader (partial) nodes</strong> connect to this network to retrieve data, and <strong>clients</strong> connect to these readers via <strong>RPC endpoints</strong> to submit transactions or query state. This structure is typical of public blockchains like Ethereum, where the network is permissionless and data access is fully transparent and distributed.</p><p>In contrast, the lower section shows how <strong>Hyperliquid operates as a private replicated state machine network</strong>. It also runs a set of full validator nodes that synchronize state among themselves, but these nodes are part of a <strong>closed, permissioned cluster</strong> rather than an open network. Instead of exposing a public RPC interface directly to the validator network, external users connect only through a <strong>REST server</strong>. This REST layer sits between clients and the internal validator network, meaning users can query data or submit orders without directly accessing the underlying nodes. While this setup allows for high performance and controlled coordination, it also means <strong>only validators inside Hyperliquid’s private network have full visibility into the order book and internal state</strong>, unlike in a fully decentralized network, where anyone can inspect the system directly via public RPC.</p><p>Hyperliquid’s design offers a lot of advantages, such as:</p><ul><li><strong>High performance and low latency</strong>: permissioned validators can coordinate efficiently, enabling real-time central limit order book (CLOB) matching.</li><li><strong>Scalable throughput</strong>: avoids the computational overhead of permissionless consensus, supporting high trading volumes similar to Binance.</li><li><strong>Enhanced privacy</strong>: only validators see full order flow and state, reducing front-running risk from public mempools; privacy is vital for institutions and having their entire positions completely inspectable would prevent them from participating</li><li><strong>Reduced attack surface</strong> — the private validator cluster is isolated from the open internet, lowering the risk of exploits.</li></ul><p>On the other hand, the system has the following disadvantages:</p><ul><li><strong>Centralization risk and censorship potential:</strong> the validator set is permissioned, concentrating control and decision-making in the hands of a small group; the infrastructure is relying on a private network, which needs to be operated by a centralized team, which can be attacked.</li><li><strong>Opaque state access</strong>: external users cannot run their own full nodes or directly verify the order book via public RPC.</li><li><strong>Information asymmetry</strong>: validators have privileged access to complete market data, which can create unfair advantages over regular traders.</li><li><strong>Governance capture risk</strong>: with a small validator set, collusion or coordinated manipulation becomes more feasible.</li></ul><p>Hyperliquid’s network operates a <strong>central limit order book (CLOB)</strong> that intentionally <strong>exposes no public RPC interface</strong>, primarily for privacy and security reasons. In a typical decentralized network, an open RPC endpoint allows anyone to query the full state, but that level of transparency can create exploitable attack vectors. If the entire order book were publicly inspectable in real time through an unprotected RPC, sophisticated adversaries could identify large positions, front-run orders, or deliberately trigger liquidations. By restricting direct access to the underlying state, Hyperliquid prevents external actors from gaining this kind of informational edge.</p><p>However, this design also creates a <strong>sharp information asymmetry</strong>. Only validators who run full nodes inside the private replicated network can observe the entire order book, including all bids, asks, and position data. Becoming a validator requires an extremely high barrier to entry: roughly <strong>$100 million in staked capital </strong>(at current price points) and an estimated <strong>$4 million operational contribution</strong>, yet the <strong>financial yield is only about 4 basis points on the total stake</strong>. From a purely economic perspective, this return is negligible, which means the real incentive to operate a validator is <strong>not financial but political</strong> — a way to secure privileged access to information and influence over the system.</p><p>Because only the <strong>top 20 validators are active</strong>, they form a <strong>highly concentrated inner circle</strong> with a comprehensive view of all market activity. This gives them a powerful — if unofficial — advantage. They can see where large positions are clustered, which addresses belong to major players, and when liquidation thresholds are approaching. In essence, they have a level of <strong>market visibility no ordinary participant can achieve</strong>, enabling potential anticipatory strategies that would be impossible without full access to the CLOB’s internal state. This structural asymmetry is both what makes the system performant and what makes it uniquely sensitive to governance trust: it depends entirely on validators choosing not to exploit their privileged vantage point.</p><p>This structural imbalance could, however, be mitigated by <strong>realigning the validator incentive model</strong> and <strong>making the informational dynamics more transparent to the broader community</strong>. Instead of offering a uniform, minimal return of just a few basis points, Hyperliquid could <strong>allocate a larger share of trading fees to validators</strong>, creating a more meaningful financial reward that attracts new node operators. By increasing the economic upside, participation would no longer be driven primarily by political or strategic motives, and the validator set could become more diverse and decentralized over time.</p><p>At the same time, <strong>educating the community about the informational advantage validators currently hold</strong> would help close the awareness gap. If traders understand that validators have full visibility into positions, order flow, and liquidation points, they can factor this into their risk models and demand governance mechanisms or safeguards that curb abuse. Combining <strong>stronger economic incentives</strong> with <strong>greater transparency about the existing asymmetry</strong> would transform validator roles from privileged insiders into competitive market participants, reducing the risk of collusion and restoring a fairer balance of information within the network.</p><p>Unlike FTX where Sam Bankman-Fried could secretly manipulate balances and positions without oversight, Hyperliquid’s replicated state machine requires consensus from its top validators to update the order book state. While this gives the current top 20 validators an outsized informational edge, it also prevents unilateral tampering: no single actor can move customer funds, fabricate collateral, or hide liabilities as was done at FTX. There is always some risk of potential exploits, and Hyperliquid has not yet benefited from the long Lindy effect of older systems, but the broader community has years of experience building Byzantine fault tolerant (BFT) networks, and mature open-source consensus engines like Tendermint show that such architectures can be made robust. As a result, the technology risk is lower than it would have been a few years ago. If Hyperliquid disappeared tomorrow, the market would reprice and move on — it does not anchor crypto’s monetary base or collateral structure.</p><h3>MicroStrategy — the Swan of Leverage</h3><p>Michael Saylor has turned Strategy (previously known as MicroStrategy) into something unprecedented: a <strong>Digital Asset Treasury (DAT)</strong> company. A DAT is a public firm that accumulates digital assets on its balance sheet, offering investors indirect exposure through equity and debt. It is a way for capital that can’t or won’t hold crypto directly to participate in its upside.</p><p>The engine is simple but dangerous. Strategy raises cash from the market, uses it to buy Bitcoin, and as Bitcoin rises, its stock price climbs, allowing it to raise even more capital on better terms. This is financial reflexivity: balance sheet growth fuels market value, which fuels more balance sheet growth.</p><p>The flywheel runs on <strong>convertible notes</strong>. These bonds give investors downside protection through repayment at maturity — while giving them upside if MSTR rallies. If the stock trades above 130% of a tranche’s conversion price, note holders can convert to equity, and the company can settle in either cash or shares.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AhI7MByH9UCFBcAAzmNMg.png" /><figcaption>Table from Strategy August 2025, FORM 10-Q (<a href="https://www.strategy.com/financial-documents">https://www.strategy.com/financial-documents</a>)</figcaption></figure><p>Each convertible note has a set maturity date, at which point investors can demand repayment. In theory, this offers downside protection. However, if repayment coincides with severe market stress, there is no guarantee the company will be able to fully repay in cash. If the company’s stock price rises above 130% of the note’s conversion price for a sustained period, Strategy can choose to settle the notes either in cash or in newly issued shares, at its discretion. The conversion price varies across tranches, and over time, many of these tranches have already moved deep into the money.</p><p>As of June 2025, Strategy had a market capitalization of roughly $93.5 billion and held 597,325 BTC on its balance sheet. By early September 2025, its Bitcoin position had increased to 638,460 BTC — worth about $72.8 billion at current prices — representing just over 3% of the total Bitcoin supply that will ever exist. The company’s average purchase price stands at approximately $73,880 per BTC. With $8.16 billion in outstanding convertible notes, this results in a BTC-to-note ratio of about 9:1, which appears relatively healthy since there’s ample buffer for converting all notes into cash through BTC liquidations. It’s worth noting that all maturities were fixed at issuance and lenders could not select their own, which simplifies the analysis. The distribution of these tranches is skewed toward nearer maturities, which can be considered healthier given that the company’s share price has risen significantly over the past few years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*1djyK6hXGZRLpxamVLnlKA.png" /></figure><p>This structure is especially appealing to highly regulated institutions that are prohibited from holding Bitcoin directly under their mandates but can hold equity or fixed-income instruments. The convertible note functions much like a call option on Bitcoin, offering upside if the price rises while retaining principal protection if it does not. This payoff can even be replicated synthetically by combining a risk-free bond with a long-dated call option on MSTR (excluding the cost of the option in this conceptual view).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*7GjE3a9Ih_C6oMK-A2pi8w.png" /></figure><p>However, the entire mechanism relies on Bitcoin’s price not collapsing and staying depressed for an extended period. If Bitcoin were to crash more than 90% (which has happened before) and remain at those levels (less likely), it could trigger a liquidity crisis. Investors could demand repayment in dollars, forcing Strategy to liquidate a portion of its Bitcoin holdings at fire-sale prices. Such sales could further depress the market, creating a reflexive downward spiral and amplifying panic among investors. Given that Strategy holds over 3% of all Bitcoin, such a scenario could have catastrophic consequences for the broader market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*QIW6X-O1P30IEu6sJ3Tfhg.png" /><figcaption>data by Glassnode</figcaption></figure><p>This makes Strategy one of the only <strong>points of systemic failure</strong> in the crypto ecosystem. If Bitcoin were to crash 90% and stay depressed, the loop would unwind in reverse: noteholders would demand repayment, forcing the company to liquidate billions in Bitcoin, which would drive the price down further and amplify panic. No other entity could trigger a liquidation cascade of this scale. If Strategy breaks, <strong>the whole market could go with it</strong>.</p><p>This makes Strategy one of the only points of systemic failure in the crypto ecosystem. If Bitcoin were to crash 90% and stay depressed, the loop would unwind in reverse: noteholders would demand repayment, forcing the company to liquidate billions in Bitcoin, which would drive the price down further and amplify panic. No other entity could trigger a liquidation cascade of this scale. If Strategy breaks, the whole market could go with it.</p><p>At this point, <strong>there is no imminent danger</strong> — but if Bitcoin continues appreciating alongside rising M2 money supply, a more dovish Federal Reserve, and a surging MSTR price, its average entry cost could climb toward a level that increases systemic risk if we enter euphoria stage, which we have entered many times, but never with these mechanisms in place.</p><h3>🪶 Conclusion — Fragilities in Flight</h3><p>Ethena, Hyperliquid, and Strategy each reveal a different attract mechanism with its own set of risks. Some might be faults growing beneath the surface of crypto’s rapid growth. They are fascinating and unprecedented economic experiments, yet they embody three distinct kinds of fragility: Ethena’s dependence on positive funding and regulatory ambiguity, Hyperliquid’s concentration of privileged information within a small validator elite, and Strategy’s extreme reflexive leverage that ties its fate directly to that of Bitcoin itself.</p><p>They are not equal in the danger they pose. Ethena could disrupt funding markets if it unravels, and Hyperliquid could compromise market integrity if its information asymmetry is abused. But if Strategy were forced to liquidate its holdings, it would unleash billions of dollars of sell pressure on Bitcoin, likely triggering a reflexive collapse across the entire crypto market.</p><p>These swans glide on the same waters yet cast very different shadows. Two are grey: fragile but containable. One is black: singular, reflexive, and capable of pulling the whole ecosystem down with it. Understanding where these fragilities sit — and how they might fracture — is essential to understanding the real shape of risk in crypto.</p><p>— — — — — — — — — — — — — — — — — — — — — -</p><p>Thanks to the following champs for proof reading:<br>* Daniel Kohlsdorf<br>* Mihai Grigore<br>* Alejandro Angeli</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=881a69825408" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Secure Your Team’s Funds with Safe Multisig]]></title>
            <link>https://medium.com/@AndyPavia/how-to-secure-your-teams-funds-with-safe-multisig-4a857809beb6?source=rss-824f660de551------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a857809beb6</guid>
            <dc:creator><![CDATA[Andy Pavia]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 20:07:12 GMT</pubDate>
            <atom:updated>2025-03-31T11:36:32.285Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Better Secure Your Team’s Funds with Safe Multisig</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*5Qm9FqskxEa4yRaPQoBgcQ.png" /></figure><p>In light of the recent Bybit attack, I wanted to consolidate my thoughts on multisig security in one place. Security is <strong>holistic</strong> — it requires the right combination of <strong>technology, tools, and operational practices</strong> to keep your assets safe. No system is completely immune to risks, so taking proper precautions and designing your on-chain self-custody strategy is crucial.</p><p>In this post, we’ll go through key principles and actionable steps to help anyone using multisigs — whether you’re an individual, a team, an enterprise, or a DAO — <strong>enhance security and better protect their assets.</strong> Let’s dive into how you can strengthen your approach and minimize vulnerabilities.</p><h3>Convenience vs. Higher Security</h3><p>Avoid using high-value multisigs for low-value transactions. The <strong>risk of signing a transaction is the same</strong>, regardless of the amount being moved. Instead, establish <strong>separate multisigs with dedicated budgets</strong> for routine transactions. This allows:</p><ul><li><strong>Smaller, high-frequency transactions</strong> to be executed with more flexibility</li><li><strong>High-value Safes</strong> to remain highly secure but <strong>less frequently accessed</strong></li></ul><p>Your <strong>primary Safe</strong> should prioritize security, while <strong>secondary Safes</strong> should prioritize convenience for daily operations.</p><h3>Enhancing the Security of Your Safe</h3><p>Safe has <strong>built-in mechanisms</strong> that can significantly enhance security. Two key contract types can help:</p><ul><li><strong>Guard Contracts</strong> — Perform pre- and post-transaction checks.</li><li><strong>Module Contracts</strong> — Allow specific contracts to execute transactions on behalf of the Safe.</li></ul><p>Some practical security enhancements you can implement through these mechanics:</p><p>✅ <strong>Timelocks</strong> — Delay transaction execution, preventing immediate actions</p><p>✅ <strong>Allow Lists</strong> — Restrict interactions to predefined addresses</p><p>✅ <strong>Spending Limits</strong> — Cap transaction amounts to align with intended use</p><p>For example, if your ecosystem fund is only meant for grants under $100K, set a spending limit accordingly. If your treasury doesn’t require instant decision-making, enforce a timelock to prevent rushed transactions. If you know the addresses you interact with, set an allow list.</p><h3>Leveraging Compartments Effectively</h3><p>One of <strong>Safe’s</strong> greatest strengths is its open-source, free-to-use model, making it accessible to anyone. You should <strong>leverage this flexibility to compartmentalize risk by using multiple Safes.</strong> Make sure to:</p><ul><li><strong>Identify high-frequency transactions</strong> — Determine which transactions occur most often, who should execute them, and the value involved. This can help you strategize the compartments (i.e. Safe multisigs) you should use. Group high-frequency transactions handled by the same people within a dedicated multisig to streamline approvals and reduce operational friction.</li><li><strong>Avoid signing fatigue.</strong> If you’re working with multiple people, make sure you don’t necessarily involve yourself in every single transaction on every multisig. Over-signing leads to exhaustion, reducing your attention to detail.</li><li><strong>Delegate strategically.</strong> Design your Safe setup to distribute responsibilities while maintaining oversight, ensuring efficiency without compromising security.</li></ul><p>By <strong>segmenting responsibilities across multiple Safes</strong>, you empower your team, reduce inefficiencies, and enhance risk management</p><h3>Empowering People with the Right Level of Control</h3><p>People join and leave groups all the time — it’s natural. You should <strong>plan for changes in membership</strong> by ensuring a <strong>structured approach</strong> to adding and removing signers.</p><ul><li><strong>Avoid adding yourself to every multisig</strong> — if your private key is ever compromised, you’ll need the flexibility to revoke your address.</li><li>Use hierarchical structures, like <strong>Palmera’s module</strong>, where one Safe controls other Safes. This setup allows you to modify permissions at the root Safe, automatically <strong>propagating changes</strong> across all connected Safes.</li></ul><h3>Using an Embedded Safe for High-Value Multisigs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*uIMTpkktKH4dnNuSApiP9A.png" /></figure><p>For high-value Safes, consider implementing an <strong>embedded multisig structure</strong>, where one multisig acts as an owner of another. This approach enhances security by requiring a user to sign transactions with multiple private keys stored in different form factors before they are presented to the main multisig for final approval.</p><h3>Leveraging Hardware Wallets and Extension Wallets</h3><p>A good security practice is to use a <strong>combination of hardware wallets and extension wallets</strong> to balance security and usability.</p><ul><li><strong>Hardware wallets</strong> (e.g., Ledger, Trezor, Keystone) store private keys offline, protecting them from certain malware and phishing attacks</li><li><strong>Extension wallets</strong> (e.g., Rabby, MetaMask) offer quick access but are more exposed to attacks</li></ul><p>Make sure you follow these principles:</p><p>✅ <strong>Multisig Composition</strong>: Use <strong>a mix of hardware wallets and extension wallets</strong> within your Safe’s signers to distribute risk.</p><p>✅ <strong>Cold Signing for High-Value Transactions</strong>: For large transactions, require <strong>signing from a hardware wallet</strong> to ensure keys never touch an internet-connected device.</p><p>✅ <strong>Reduce Exposure</strong>: Avoid keeping <strong>high-value assets in a Safe</strong> where all signers use <strong>only extension wallets</strong> — at least one signer should use a hardware wallet.</p><p>✅ <strong>Use Different Devices</strong>: Never store both your extension wallet and hardware wallet seed phrases on the same computer.</p><p>By leveraging both hardware and extension wallets, you maximize security without sacrificing usability, ensuring your Safe remains secure yet functional.</p><h3>Validating Transactions Across Multiple Platforms</h3><p>For high-value Safes and transactions, make sure to:</p><ul><li><strong>Verify the transaction payload across multiple devices and front ends from different providers to </strong>minimize the risk of signing a compromised transaction</li><li><strong>Use front-end interfaces that offer human-readable transaction data,</strong> and you should perform independent precomputation of the Safe transaction hash for added security</li><li><strong>Double-check your wallet’s payload</strong> — ensure it matches exactly with what the front-end displays before signing</li></ul><h3>Conclusion</h3><p>I hope you find these tips useful. Multisigs are incredibly powerful tools, but their effectiveness depends on how you implement them. By structuring your Safes correctly and how your team is organized, you can <strong>significantly reduce risks</strong> while maintaining operational efficiency.</p><p>If you have any questions or need help, please feel free to reach out. And most importantly — <strong>stay Safe!</strong> 🚀🔐</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a857809beb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nexus Mutual: the democratization of risk assessment]]></title>
            <link>https://medium.com/@AndyPavia/nexus-mutual-the-democratization-of-risk-assessment-70876faff2e5?source=rss-824f660de551------2</link>
            <guid isPermaLink="false">https://medium.com/p/70876faff2e5</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[defi]]></category>
            <dc:creator><![CDATA[Andy Pavia]]></dc:creator>
            <pubDate>Tue, 22 Feb 2022 14:32:40 GMT</pubDate>
            <atom:updated>2022-02-22T14:37:00.197Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>** Not financial advice **</strong></p><p>Nexus Mutual is one of the first “insurance” protocols in Web3. They allow users to have some downside protection in case-specific events happen, such as a DeFi DApp or a centralized exchange getting hacked.</p><p>The following blog post will give you a high level of Nexus Mutual. Keep in mind that I write primarily to structure the way I think about topics, so read at your own risk 😉. I always recommend digging into the documentation yourself.</p><h3>Why is Nexus Mutual necessary?</h3><p>Smart contracts are still in flux, and software engineers are still learning how to build things securely with smart contracts. Many investors have been victims of hacks, and Nexus Mutual allows investors to get some downside protection in case something goes wrong.</p><p>As most investors know, the key to smart investing is understanding returns and risks. The risks in Crypto are hard to understand since (in some cases) protocols are built by anons, unregulated entities audit the contracts, and DApps leverage other protocols that might contain their own attack vectors. Nexus Mutual allows you to structure your positions better with partial downside protection for some black swan events.</p><p>A new DApp might offer good yield, but you might be unsure whether it’s worth risking your principal. Nexus Mutual can help protect the downside to some degree. However, you must understand the protocol to know how protected you are.</p><h3>How does the claim assessment work?</h3><p>Nexus Mutual shies away from saying that your funds are “insured”. The protocol does not have an algorithmic mechanism to detect when something has been hacked (I’m unsure how anybody could build something like that in a reliable way). Instead, they leverage their claim assessment community to indicate when something has been hacked and to validate that someone was affected by the hack.</p><p>For the protocol to work, Nexus Mutual issues its own tokens called NXM. The claim assessors are incentivized with NXM rewards for doing work and the assessor needs to stake NXM to have skin in the game. If an assessor behaves like a bad agent, the advisory board can slash her stake, therefore creating a strong disincentive against this behavior. Assessors should behave correctly since all members mutually benefit from the platform’s success.</p><h3>The Tokenomics of Nexus Mutual</h3><p>To understand Nexus Mutual’s model, you first need to understand the concepts below:</p><ul><li><strong>Capital Pool: </strong>this refers to the funds available in the protocol to pay for any claims; there is only one Capital Pool</li><li><strong>Minimal Capital Requirements (MCR): </strong>this is the level of funds required to be very confident that all claims can be paid</li></ul><p>The protocol always needs to have enough funds in the Capital Pool to meet the MCR and will use these two factors to modulate the price of NXM to attract more capital into the fund. NXM can only be transferred to other Nexus Mutual members and can only be bought through the Nexus Mutual Smart Contracts.</p><p>The Capital Pool is shared across the different covers to provide greater diversification benefits. This ensures efficient capital usage, lowers prices, and provides more resilience to claims shocks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rxDb479qDcqWmnAgRg6DTA.png" /></figure><p>As seen above, the token price decreases when the Capital Pool gets closer to the MCR and increases when it goes in the opposite direction. Below is the formula that dictates the NXM price in Ether terms using a Bonding Curve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*XZSupHNiuMybCPq08v4zmA.png" /></figure><p><strong>TP</strong> = Token Price in Ether</p><p><strong>MCRETH</strong> = The minimum amount of capital required to support existing covers, Minimum Capital Requirement, in Ether. The MCR is calibrated to a 99.5% solvency level. The Capital Model is explained in a lower section of this post.</p><p><strong>MCR%</strong> = Ratio of Capital Pool funds to the Minimum Capital Requirement.</p><p><strong>A and C</strong> = Fixed constants</p><p>It should be quite clear that MRCETH is the variable that drives the value in the equation.</p><p>Additionally, no holders can redeem their NXM token unless the following criteria are met:</p><ul><li>Capital Pool needs to be above the MCR</li><li>Capital Pool must have enough liquidity in Ether</li><li>Redemption price is 2.5% below purchase price</li></ul><p>All of these clauses protect the capital pool from going under the MCR if there’s a run on the bank.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*133NP3f2Pg8s12BEqf1ufw.png" /></figure><h4>Liquidity Decreasing Events</h4><ul><li>Purchasing cover: Member tokens can be used (“burned”) to purchase cover</li><li>Risk Assessment Stake</li><li>Claims Assessment Stake</li></ul><h4>Liquidity Increasing Events</h4><ul><li>Claims Assessment Rewards</li><li>Risk Assessment Rewards</li><li>Governance Incentives</li><li>Staking rewards</li></ul><h3>Mechanics</h3><p>Users willing to buy cover need to become members and select the number of days, currency, and max amount they want protection for. The percentage you need to pay to protect your funds depends on the risk of the cover. The risk assessors use their stake to vote on what covers are more or less risky.</p><p>The treasury funds are kept in ETH and DAI, and the covers are offered both in Ether and DAI terms as well. The Capital model is calculated in Ether terms so there is some FX impact when ETH price goes up or down since the DAI value remains constant. Therefore, the treasury needs to be able to have enough funds to cover all risks in both currencies. The Capital Model described in the next section takes into account some discrete scenarios (e.g. Ether goes 50% down in DAI terms) to calculate a reasonable MCR.</p><p>The treasury participates in certain strategies to generate yield, such as Lido stETH. This should increase the funds in the Capital Pool. This could be an additional risk, but perhaps necessary for the sustainability of the model.</p><h3>Capital Model</h3><p>In order to be capital efficient, you need to be able to calculate how much money you need in the capital pool to cover damages with a certain level of confidence.</p><p>In the white paper, Nexus Mutual leverage some concepts from the Solvency II (SII) standard, which is a harmonized risk-based Capital regime for insurance and reinsurance companies in the EU. This is essentially a framework for insurance companies to act in a financially responsible manner in terms of how they balance reserves and liabilities. The logic is that the insurer will be able to withstand the worst annual loss expected over the next 200 years. In other words, the group should be able to withstand events in a year with a 99.5% probability.</p><p>The protocol <strong>opted against</strong> this method and is now leveraging a flatter approach. This way they can add the Capital Model calculation on-chain if necessary. The steps in the Capital Model are the following:</p><ol><li>Get Cover Amount(i), where each i is a risk, converted to ETH</li><li>Correlation matrix of every risk to each other risk. This is how likely each risk requires cover at the same time as other risks. The time series is the amount that risk assessors stake over time.</li><li>Do the square root of the sum of the squares of cover amount and the correlation (see formula below; MCR(l) is cover amount for l risk i.e. asset l)</li><li>Do the calculation in step 3 multiple times using various currency scenarios, e.g. ETH price down 50% vs USD. Take the max value of all the scenarios as the selected value.</li><li>Add a buffer to the selected value</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L8d00lQSjuj1NMMGP-bG2g.png" /><figcaption>Formula for step 3</figcaption></figure><p>The formula in layman’s terms is essentially increasing the minimum capital requirements if two risks are highly correlated and would potentially require funds at the same time.</p><h3>Conclusion</h3><p>Nexus Mutual is an interesting mechanism to provide downside protection. One thing is essential to understand: anybody can be a risk assessor. The staking amount given by the risk assessors is used as a proxy to quantify what is risky and what’s not risky. If people lose or gain confidence over the same covers, then the capital model will dictate that is more likely that both risks might materialize simultaneously.</p><p>The whole model is built on crowdsourcing the probability of affording cover for a risk and using this time series to infer the correlation. However, this might be problematic since there could be a high yield on these covers, and it is challenging to assess the risk of a protocol without a lot of expertise and time to evaluate all the dependencies.</p><p>In this model, risk assessors and investors could be the same person. When the market becomes irrational, investors could ignore the underlying risk to get yield, which might add noise to what is truly risky.</p><p>It’s also important to ask ourselves: “What does the general community understand about the inner working of closed source models such as Coinbase, Binance, or other centralized solutions?” The community could be voting blindly without quantifiable data or operational know-how into how these institutions operate. Everyone at some point thought that Mt. Gox was secure, and the results of that speak for themselves.</p><p>On the other hand, you don’t know who is staking and what sort of informational edge they have over other parties or you. So, for example, it might be that a centralized exchange might be deploying capital there to shape the narrative of their company or provide certainty to its investors.</p><p>All in all, it’s beneficial to have a number used to quantify the risk of protocols, custodians, and centralized exchanges that are community-driven. The protocol cover fee can be a risk metric for different players in the space, but it should be leveraged with a grain of salt. Overall, this is a fascinating protocol to consider for downside protection.</p><p>Thanks, Daniel Kohlsdorf, for reviewing this post!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70876faff2e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[At what price point is OHM a safe buy?]]></title>
            <link>https://medium.com/@AndyPavia/at-what-price-point-is-ohm-a-safe-buy-59ffe02bcd4c?source=rss-824f660de551------2</link>
            <guid isPermaLink="false">https://medium.com/p/59ffe02bcd4c</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[olympus-dao]]></category>
            <dc:creator><![CDATA[Andy Pavia]]></dc:creator>
            <pubDate>Mon, 24 Jan 2022 18:45:23 GMT</pubDate>
            <atom:updated>2022-01-26T06:43:02.423Z</atom:updated>
            <content:encoded><![CDATA[<p>** Not financial advice **</p><p>The volatility in Crypto in the last couple of days has been larger than usual. This has affected many projects, but one of the most heavily affected projects is Olympus. OHM V2 fell by 95% in the last 3 months. The current price is hovering in the 60s while 3 months ago the price was above $1000. The current blog post will attempt to walk you through the mechanics of Olympus V2 along with a framework to understand the size of the opportunity that Olympus currently offers.</p><h3>Olympus fundamental mechanisms</h3><p>Some high level features of Olympus that are key to highlight:</p><ul><li>Each OHM is backed by $1 in the treasury</li><li>The protocol rewards stakers with more OHM at a reward rate that can be modulated by the DAO</li><li>The protocol is able to pay high APY’s by selling OHM to buyers at a price higher than $1</li><li>A portion of the treasury is always used to back newly minted OHMs that are awarded to stakers</li></ul><p>It is key to understand that the treasury is not affected by what happens with the market price of OHM. The majority of assets in the treasury, unless the protocol is hacked, will be leveraged to incentivize the stakers.</p><p>When evaluating investments, it is always useful to look at the worst case scenarios. Assuming that OHM price remains the same or declines, the future earning that can be derived from the protocol are directly related to the reward yield and the runway available. The runway available answers the questions of how many days that the DAO can sustain paying the stakers with the current yield. The current yield on staking OHM is 2,684%, and the DAO can sustain this rate for the next 380.4 days.</p><h3>Some simple math</h3><p>Now, let’s assume that going forward Olympus is not able to capture any more funds in the treasury due to market sentiment. Now, if this happens, it’s fair to assume that the market price of OHM should gravitate towards its risk free value (RFV) of $1 over time.</p><p>Therefore, we need to calculate at what time would our investment be paid back assuming the OHM price will be $1 at the end of our investment window (using a pessimistic scenario). The first piece to answer that question is to calculate the reward rate given every 8 hours. Using the number of periods in a year (1095) and the current APY (2684%), we can obtain the reward rate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VssX3XHK4P_cmdJGw2VE1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rrBO01jxPNsZzR0b8UCpg.png" /><figcaption>formula to find the current reward rate per 8 hour time period</figcaption></figure><p>Based on this formula, the reward rate every 8 hours is roughly 0.003 or 30 basis points. Now, we can obtain the number of time periods to get 62 OHM since we hypothetically bought at $63. If we gain 62 OHM from our investment, we can ensure that we have $63 in the treasury that are guaranteed by the smart contracts and that we can claim it in a permissionless manner. Obtaining the 62 OHM would be the only really way to obtain our investment back in this pessimistic scenario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6wWKDxHeOH-JUHcK_AiBtg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Txd8hxByBVi1UZNgl4iN6g.png" /><figcaption>Formula to get number of periods to recover initial investment</figcaption></figure><p>Using 30 basis points as the reward rate, the result is 1378 periods, which translates to <strong>459</strong> days. This means that we would need to stake 1 OHM for 459 days in order to get 62 more OHMs.</p><h3>Conclusion</h3><p>If you were to buy OHM at $63, it would take 459 days to recover your investment if the protocol were to collapse. The current runway is 380 days meaning that, unless the DAO is able to attract more investment, you would only recover 30.4 OHMs or $30.4. Therefore, OHM’s current RFV (without taking into account the discount rate of time and risk) is $31.4 since your initial investment has $1 in the treasury that you can claim.</p><p>However, given the current APY offered by the protocol, the question is whether you think the market will wait until hitting this RFV or whether the market will just “ape” in. Using the couple last years as a frame of reference, I think most readers will get to the same conclusion.</p><p>Some edge cases that would make this analysis void:</p><ul><li>The DAO changes how the treasury is used</li><li>The EVM is hacked</li><li>One of the ERC20’s in the treasury has an attack vector</li><li>Olympus V2 smart contracts have an open attack vector</li></ul><p>Thanks Daniel Kohlsdorf for reviewing this post!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59ffe02bcd4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Cream Finance Hack]]></title>
            <link>https://medium.com/@AndyPavia/swissblock-post-mortem-cream-finance-hack-7c1caff4335c?source=rss-824f660de551------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c1caff4335c</guid>
            <category><![CDATA[creamfinance]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Andy Pavia]]></dc:creator>
            <pubDate>Fri, 29 Oct 2021 13:04:56 GMT</pubDate>
            <atom:updated>2022-02-22T15:27:07.013Z</atom:updated>
            <content:encoded><![CDATA[<h3>TLDR</h3><p>The Cream Finance attack consisted of a flash loan transaction leveraging a price oracle vulnerability in the Cream Finance protocol. The total amount stolen was <strong>$130M</strong> with most of the pools being completely drained in the Ethereum mainnet.</p><p>Cream started as a fork of Compound. However, the protocol has taken aggressive steps in providing a wider distribution of smaller cap tokens as well as derivate LP tokens such as yUSD. Some of these assets required a custom oracle proxy created by the Cream team, which introduced the attack vector.</p><h3>Protocols Involved In The Hack</h3><p>This hack was elegant and fatal. To understand it, we need to go deeper into some other protocols that were involved. It’s important to understand Cream, Yearn, and Curve as well as how they were interlinked in the hack. The hack was solely based on exploiting weaknesses in the Cream Finance protocol, and the other protocols were not manipulated or abused and worked just as expected.</p><p><strong>Cream Finance</strong> is a decentralized protocol that provides lending and borrowing capabilities in a permissionless manner. Cream has a lending pool where you can provide liquidity with yUSD tokens, as well as use these yUSD tokens as collateral to borrow other assets.</p><p><strong>yUSD</strong> is an LP token that represents a share of a Yearn Finance vault referred to as <strong>Curve yCRV</strong> in the Yearn UI’s listing of vaults. The vault is a stable coin fund that accrues value from interest, swap fees, and demand for the underlying tokens. The yUSD vault consists of four stable coins: yDai, yUSDT, yTUSD and yUSDC. The principal strategy of the vault is to allocate assets into the Curve<strong> 4Pool</strong> pool of yDAI, yUSDC, yUSDT, and yTUSD (aka “4Pool’’ or simply “Y”, as it is called on the Curve UI).</p><p><strong>CREAM yUSD Pool</strong></p><p>Cream Pool YUSD contract: <a href="https://etherscan.io/address/0x4BAa77013ccD6705ab0522853cB0E9d453579Dd4#readProxyContract">https://etherscan.io/address/0x4BAa77013ccD6705ab0522853cB0E9d453579Dd4#readProxyContract</a></p><p><strong>yUSD</strong></p><p>Underlying in Cream Pool yUSD contract -&gt; <a href="https://etherscan.io/token/0x4b5bfd52124784745c1071dcb244c6688d2533d3">Curve Y Pool yVault (yUSD)</a>: <a href="https://etherscan.io/address/0x4b5bfd52124784745c1071dcb244c6688d2533d3">https://etherscan.io/address/0x4b5bfd52124784745c1071dcb244c6688d2533d3</a></p><p><strong>CURVE 4Pool</strong></p><p><a href="https://etherscan.io/address/0xdf5e0e81dff6faf3a7e52ba697820c5e32d806a8">https://etherscan.io/address/0xdf5e0e81dff6faf3a7e52ba697820c5e32d806a8</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fax5lW5j9wvIvXIK" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6blin-JusMRZ5ncI" /></figure><h3>Anatomy of the hack</h3><p>The hacker used a flash loan attack that took advantage of a badly implemented oracle price proxy. The oracle proxy calculated the pricePerShare using on-chain calls in 4Pool and yUSD contracts. Below is a high level of all the steps in the hack prepared by the experts at BlockSec within hours of the hack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9L-C-M5jp04SL24N" /><figcaption>Courtesy of BlockSec @BlockSecTeam w/ some extra notes from Swissblock</figcaption></figure><p>In section 1, you can see how the price oracle computes the yUSD price. In line 1.2, you can see that yUSD.pricePerShare is calculated by taking the percentage that yUSD (Yearn Vault) owns of 4 Pool and dividing it by the total number of LP tokens of yUSD. In other words, this is giving what percentage of 4 Pool does each yVault LP token own. If you multiply this by the price of 4 Pool tokens, you will get the price of yUSD in USD terms.</p><p>The attacker used an attack vector in the price definition in step 1.2 inside the oracle proxy. The attacker sent a token to the contract address directly instead of passing through the defined contract calls that keep track of the accounting properly. By sending the 4Pool token directly to the yUSD contract, he was able to:</p><ul><li>increase the numerator in step 1.2 since the ERC20 4Pool contract will return that yUSD owns more LP tokens</li><li>maintain the denominator in step 1.2 the same since no new yUSD token was minted since the attacker didn’t use the established smart contract method to deposit into yUSD</li></ul><p>This allowed the attacker to manipulate the price, therefore using yUSD to borrow from many markets. Below is a table that goes through each step explaining how it affects the numerator and denominator of step 1.2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/0*0k0tbNdUrt2tBqi-" /></figure><h3>Could this hack be prevented?</h3><p>Price oracle hacks are nothing new, and there’s a good amount of documentation around this topic. It’s worth noting that the Price Oracle proxy vulnerability was included in the Cream Finance audit as seen below in the table. Leveraging a proper oracle to get the price will definitely protect against this attack. It would be ideal if the prices are provided through TWAP to avoid market manipulation in a similar fashion as <strong>mark price</strong> add market manipulation protection in perpetual swap instruments.</p><p>Additionally, the Cream team could have avoided using tokens in the protocol that can easily be burnt or minted and that are interlinked with other protocols since this increases the complexity heavily. With increasing complexity, it’s harder to be able to foresee all edge cases.</p><p>Another good measure would be to add a fund limit per pool in USD that a specific party can do within a certain time frame. This would act as a fail-safe, which if triggered would allow the protocol and 3rd parties to have some time to react in case something goes wrong. There’s no reason to allow one party to take away the entire liquidity of all pools within one transaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*WBr4CR_6TFVf_GbJ" /></figure><p>CREAM Finance audit: <a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKJWcUfnKdJ1BjWKoMM-3555916521%2Fuploads%2Fgit-blob-1dd4323e898465d6750e678f0000f254227453b9%2FCREAMSummary.pdf?alt=media">https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKJWcUfnKdJ1BjWKoMM-3555916521%2Fuploads%2Fgit-blob-1dd4323e898465d6750e678f0000f254227453b9%2FCREAMSummary.pdf?alt=media</a></p><h4>Open questions</h4><ul><li>How will CREAM Finance address the issue? If they choose to solve the issue, where will they obtain the funds from?</li><li>Are there any funds within the contracts that are redeemable and can be liquidated to pay the affected parties?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NDrK1CZ_bYD3WwRbYGMH4g.png" /><figcaption>post hack TVL &amp; reserves according to Cream Finance UI</figcaption></figure><h4>Important Links</h4><p>You can see the infamous transaction below: <a href="https://etherscan.io/tx/0x0fe2542079644e107cbf13690eb9c2c65963ccb79089ff96bfaf8dced2331c92">https://etherscan.io/tx/0x0fe2542079644e107cbf13690eb9c2c65963ccb79089ff96bfaf8dced2331c92</a></p><p>Exploiter Externally Owned Address: <a href="https://etherscan.io/address/0x24354d31bc9d90f62fe5f2454709c32049cf866b">https://etherscan.io/address/0x24354d31bc9d90f62fe5f2454709c32049cf866b</a></p><p>The hacker’s flash loan interacted with the contract on the link below. The contract was deployed specifically for the hack. The contract was deployed at 13:22 UTC and the attack started 20 min afterward. <a href="https://etherscan.io/address/0x961d2b694d9097f35cfffa363ef98823928a330d">https://etherscan.io/address/0x961d2b694d9097f35cfffa363ef98823928a330d</a></p><h3>Acknowledgment</h3><p>This post was a collaborative effort by Daniel Kohlsdorf, Oscar Berger, and myself. We would also like to thank BlockSec for sharing their insights early on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c1caff4335c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>