A Gentle Introduction
Welcome to the MegaStrategy Codex — a comprehensive manual for the digital volatility engine powering the largest onchain treasury of Ethereum.
This Codex serves as the authoritative reference for MegaStrategy's system architecture, mechanisms, and operational procedures. Whether you're a developer examining the protocol, a strategy token holder exploring the mechanisms, or a researcher investigating our treasury framework — you'll find detailed documentation and technical specifications here.
Navigation
The Codex is organized into several main sections:
- Foundation – Core concepts and architectural overview
- Core Mechanisms – Detailed technical specifications of system components
- Protocol Operations – Governance model and operational procedures
- Integration Guide – Developer documentation and API references
- Resources – Mathematical frameworks, risk analysis, and references
Who MegaStrategy Is For
You’ve found it — the key to harnessing Ethereum’s volatility. While others see fleeting price charts, you see the unstoppable force of cryptographic truth and programmable value.
You recognize what others have forgotten: there is no second best. MegaStrategy is for those who wish to engage with Ethereum not through mere speculation, but with strategic application of adaptive leverage and market mechanics. If you’re ready to participate in the relentless march of the world computer toward global adoption — block by block — then you’ve come to the right place.
MegaStrategy is for you.
Contributing
You can find the source code on GitHub. MegaStrategy relies on the community to add features and update documentation. If you'd like to contribute, please read the CONTRIBUTING guide and consider opening a pull request.
WARNING: The digital volatility engine exhibits extreme gravitational effects. Before interacting with the protocol, thoroughly review the technical specifications and risk framework detailed in this Codex.
Blueprint: The MicroStrategy Precedent
MicroStrategy is the first and largest Bitcoin Treasury Company. Michael Saylor famously pivoted MicroStrategy's corporate treasury strategy toward Bitcoin – setting a bold example for digital asset enthusiasts. The story behind this move provides a conceptual framework for understanding how MegaStrategy harnesses volatility.
A Brief History
Michael Saylor & MicroStrategy
Michael Saylor is the Founder and Chairman of MicroStrategy. While MicroStrategy had been in operation for decades as a business intelligence company, its corporate profile changed in 2020 when it began allocating a substantial portion of its treasury (nearly all of it) into Bitcoin.
The Initial Move into Bitcoin
In August 2020, MicroStrategy announced that it had purchased $250 million worth of Bitcoin as a treasury reserve asset. Saylor cited concerns over fiat currency devaluation and the potential long-term upside of digital assets. This was just the beginning – a series of larger purchases would follow:
For a more in-depth review of their Bitcoin purchases, see the MicroStrategy Portfolio Tracker
Enter Convertibles
Central to MicroStrategy's... strategy (for lack of a better term) is the use of "intelligent leverage" – rather than simply allocating surplus cash into Bitcoin, the company raised debt through convertible notes to purchase even more BTC. Here's a simplified breakdown of the process:
1. Debt Issuance
- MicroStrategy sold convertibles – financial instruments that can be converted into MSTR shares
- Conversion rights help secure lower interest rates on the debt compared to traditional bonds
2. Deployment of Proceeds
- Funds raised from these notes were used to purchase additional Bitcoin
- As the price of Bitcoin appreciated, the overall treasury value increased dramatically
3. Ongoing Strategy
- MicroStrategy repeated this process several times, incrementally raising billions of dollars
- Each new capital infusion was immediately used to acquire Bitcoin at varying price poins
Why This Matters
Exposure to Volatility
MicroStrategy’s approach harnesses Bitcoin’s volatility. While many corporations seek to minimize risk by diversifying treasury assets, Saylor effectively embraced Bitcoin’s price fluctuations. If BTC’s price increases, the leveraged position magnifies gains. Conversely, it also exposes the company to amplified downside risk.
Financial Engineering
Saylor’s use of convertible notes to fund the Bitcoin position introduced a novel financial engineering dimension. MicroStrategy wasn’t just investing – it was creating a perpetual debt-financed position. The company’s confidence in Bitcoin’s long-term price trajectory underpinned this approach.
Market Implications
MicroStrategy’s public stance and recurrent BTC acquisitions bolstered market sentiment, demonstrating that even large corporations could take on significant Bitcoin exposure. It also sparked ongoing debates around corporate risk, governance, and Bitcoin as a treasury reserve asset.
Key Takeaway
By studying how MicroStrategy structured debt, navigated risk, and broadcast its vision for a digital future, we gain insight into how a similar approach can be implemented onchain using decentralized infrastructure. These lessons guide MegaStrategy’s mission to scale, adapt, and thrive in Ethereum’s rapidly evolving financial landscape.
Volatility: Fuel for the Engine
Volatility is more than just price swings – it's the heartbeat of speculative markets, powering opportunities for outsized returns (and sometimes outsized losses). In the context of MicroStrategy, volatility helps drive a feedback loop where both the convertibles and underlying asset feed off each other. This chapter explores how volatility plays into convertible pricing, how MicroStrategy leveraged it, and why it's central to understanding leveraged treasury protocols like MegaStrategy.
Convertible Pricing
What is a Convertible?
A convertible note combines features of traditional debt with an embedded equity option.
- Debt Component: Typically pays a coupon (interest) and returns principal at maturity, similar to a regular bond
- Equity Component: Investors can convert the debt into equity shares if the stock price rises above a certain threshold (the conversion price)
Why Volatility Matters
The embedded option in a convertible is most valuable when the underlying stock is highly volatile. Higher volatility increases the likelihood that the stock price might surpass the conversion price by a significant margin, granting the investor potential for larger upside via equity.
- Option Premium: Just like a standalone call option, the higher the expected volatility → the more valuable the call option becomes
- Interest Rate: Issuers of convertibles can often offer lower interest rates when volatility is high, because investors are attracted to the potential upside in the embedded option
In MicroStrategy's case, Bitcoin's volatility flows through to its stock price. As Bitcoin swings wildly, so does the perceived value of MicroStrategy's treasury – and thus $MSTR. This volatility supports the pricing of MSTR convertibles, influencing how much yield investors demand and how much capital the company can raise at favorable terms.
Key Takeaway
Embrace Volatility
Like MicroStrategy, MegaStrategy capitalizes on volatility as a growth catalyst. However, instead of relying on centralized issuance of corporate debt, MegaStrategy employs onchain mechanisms to achieve leveraged exposure to digital assets.
MicroStrategy Convertibles
Issuance Dynamics
When MicroStrategy issues a convertible note:
- Set a Premium: Conversion price above the current stock price
- Offer Low Interest: Because the option upside is attractive to investors, they accept lower (or no) interest
- Deploy Proceeds: MicroStrategy uses the newly raised capital to buy BTC, which in theory drives the company's perceived value higher
Volatility Flywheel
- If Bitcoin's price rises, MicroStrategy's treasury value grows – pushing its stock price up
- As the stock price appreciates, the embedded call option in the convertible becomes more valuable, reinforcing demand for the notes
- Allows for further convertible issuance at more favorable rates – fueling more Bitcoin accumulation
This feedback loop has turned MicroStrategy from a business intelligence company into a leveraged Bitcoin investment vehicle.
Key Takeaway
Onchain Transparency
Where MicroStrategy’s convertible deals unfold behind closed doors (and eventually in SEC filings), MegaStrategy’s positions, risks, and treasury composition are publicly verifiable onchain. This transparency allows participants and governance token holders to evaluate real-time market risk, protocol health, and future issuance decisions.
Convertible Arbitrage
Delta-Neutral Strategy
Traditionally, hedge funds and sophisticated traders may execute a convertible arbitrage strategy:
- Buy the Convertible: Gain a position in the debt plus the embedded equity option
- Short the Underlying: If the stock price rises, the gains on the convertible’s option can offset the losses from the short position. If the stock drops, the short can offset the convertible’s equity exposure.
- Capture Yield: The goal is to extract a stable return from mispriced convertibles and price swings based on their implied volatility
In the case of MicroStrategy, some market participants aim to trade relationships between the convertible notes and MSTR shares. But the extreme nature of Bitcoin's volatility and MicroStrategy's repeate purchases make this a high-stakes game.
Leverage Amplification
Both the issuer (MicroStrategy) and potential traders often use leverage:
- Issuer Leverage: By borrowing via convertible notes, they amplify exposure to Bitcoin’s price movements (both upside and downside)
- Arbitrage Leverage: Savvy traders may borrow to expand their position in the convertible or the equity short, aiming to magnify returns from price differences and volatility swings
As volatility increases, the potential range of outcomes widens. Gains can be exponential if the trades pan out, but losses can also become overwhelming if the market moves against the leveraged position.
Key Takeaway
Flywheel Effect
If you view MicroStrategy’s stock and convertible market as a feedback loop, MegaStrategy aims to replicate — and expand on — that dynamic with an onchain flywheel. As volatile assets (like ETH) increase in value, the protocol’s treasury expands. A larger treasury can support additional debt issuance, leading to even greater potential exposure to the volatile asset.
But flywheels go both ways – if the price of the underlying asset falls, treasury value shrinks and market confidence may erode (along with demand for convertibles).
Glossary
Below is a Glossary covering key terms used throughout the MegaStrategy documentation. The aim is to clarify concepts used by the protocol, which blends decentralized finance (DeFi – smart contracts, tokens, governance) with advanced concepts from traditional finance (TradFi – convertibles, arbitrage, auctions). Please refer to the CONTRIBUTING guidelines to add terms and consider opening a pull request.
[ A ]
Arbitrage
A trading strategy that exploits price differences between two or more markets or instruments to make riskless (or low-risk) profit. In the context of MegaStrategy, “convertible arbitrage” might involve hedging, shorting equities or tokens, or taking advantage of mispricing in convertible instruments.
[ B ]
Bootstrapping
Process by which the initial protocol conditions are set – treasury backing, token distribution, liquidity – to kickstart the system
[ C ]
Collateral
Assets locked in smart contracts (e.g., ETH, stablecoins, or other tokens) to secure a borrowed position. If the value of collateral falls below a certain threshold, liquidation may occur.
Collateralization Ratio
The ratio of the value of collateral locked to the value of debt issued. A higher ratio often reduces liquidation risk.
Convertible Arbitrage
A strategy that typically involves purchasing a convertible and simultaneously shorting (or otherwise hedging) the underlying to benefit from mispricing between the embedded option and volatility priced into the market.
Convertible
A hybrid debt instrument that can be converted into underlying assets at a specified conversion price. Issuers benefit from lower interest rates, while buyers gain upside from embedded optionality if the underlying asset’s price rises.
Conversion Price
The price at which a convertible can be exchanged for underlying assets. If the market price of the underlying rises above this threshold, conversion becomes more attractive.
[ D ]
Debt Auctions
An onchain mechanism for issuing convertibles to participants. MegaStrategy uses debt auctions to raise capital used to purchase ETH.
[ E ]
Ethereum
A public, permissionless blockchain featuring smart contract functionality. The world computer powers DeFi protocols like MegaStrategy through programmable, self-executing code. There is no second best.
[ F ]
Flywheel
A self-reinforcing feedback loop where each cycle into the next. For MegaStrategy, price appreciation enables further debt issuance for increased leverage — which in turn drives additional volatility.
[ G ]
Governance
The mechanisms by which tokenholders make decisions about protocol upgrades, strategy parameters, or treasury deployment. MegaStrategy governance often involves token-based voting.
[ L ]
Leverage
The use of borrowed capital to amplify potential gains (and losses) on a volatile asset. Leverage raises the stakes in volatile markets, increasing both upside and downside risk.
Liquid Staking Token (LST)
A token that represents staked assets on a blockchain. On Ethereum, LSTs represent staked ETH used to secure its Proof-of-Stake (PoS) consensus mechanism. LSTs allow users to earn staking rewards while maintaining the ability to trade the token.
Liquidation
The forced closure of a leveraged position when collateral falls below a required threshold. External platforms typically sell collateral to repay debt, protecting lenders from insolvency. MegaStrategy does not have short-term liquidation risk, structuring its debt on long-term maturities.
Liquidity
The ease with which an asset can be bought or sold without causing large price movements. In DeFi, liquidity often comes from automated market makers (AMMs) or lending pools, and it’s critical for efficient protocol operations.
Liquidity Pool
A pooled group of tokens that are locked in a smart contract. In DeFi, liquidity pools on decentralized exchanges (DEX) facilitate trades between those assets and traders.
Liquidity Provider
A user (or protocol) who deposits tokens into a liquidity pool to facilite trades between those assets. In return for providing liquidity, users receive a percentage of trading fees proportional to volume and their share of the pooled assets.
Loan-To-Value (LTV) Ratio
This ratio expresses the health of a user's loan, represented by the loans value as a percent of the user's collateral. In TradFi, lenders assess a borrower's creditworthiness. In DeFi, loans are generated algorithmically using collateral on the blockchain.
[ M ]
Market Operations
Activities for DeFi protocols that involve token swaps, liquidity provision, price discovery, and potentially arbitrage among different pools or exchanges. MegaStrategy performs market operations for its native tokens based on market conditions and its treasury strategy.
[ O ]
Option
A financial instrument giving the holder the right (but not the obligation) to buy or sell an asset at a certain price on or before a specific date. Convertibles function similarly with the embedded conversion option on the underlying asset.
[ S ]
Smart Contracts
Self-executing code on the Ethereum blockchain that automates financial transactions and enforces protocol rules. In MegaStrategy, smart contracts custody treasury assets, execute market operations, and initialize lending markets.
[ T ]
Treasury
The collection of assets held by MegaStrategy, consisting of ETH, LSTs, stablecoins, and other tokens. The protocol’s mechanisms revolve around managing, growing, and leveraging this treasury.
[ V ]
Volatility
The magnitude and frequency of price movements in an asset or market. High volatility increases both the potential return and the risk of leveraged positions, and it often enhances the value of convertible instruments.
Strategy Token
The MegaStrategy Token (MGST) is the protocol's core governance and treasury exposure token. MGST grants holders:
- Proportional exposure to MegaStrategy's onchain
treasury (primarily denominated in ETH) - Voting rights in all major protocol decisions
Below is a breakdown of how MGST works, the benefits it provides to holders, and the risks involved.
Design Principles
Leverage Exposure to ETH

MGST is first and foremost a strategy token – designed to capture leveraged upside to ETH via the protocol's treasury holdings. As MegaStrategy employs various mechanisms (convertible auctions, market operations, liquid staking, etc.) to grow the treasury, MGST holders receive exposure to those gains – reflecting both the capital inflows and onchain strategies.
Governance Utility
Beyond financial exposure, MGST doubles as a governance token. Holders can propose and vote on protocol upgrades, strategy parameters, and treasury management decisions. The more MGST you hold, the greater your voting weight – aligning economic incentives with decision-making power.
Transparent & Decentralized
MGST is minted, burned, and transferred via smart contracts built in the Ethereum ecosystem. All transactions and holdings are publicly verifiable onchain, ensuring trustless operations and community oversight.
Leverage Mechanics
What Leverage Exposure Means
MegaStrategy's treasury accumulates ETH through its suite of mechanisms. Some of these assets are financed via debt instruments, effectively creating leverage in the treasury. MGST holders indirectly inherit that leverage:
- As ETH's price rises, the treasury's holdings grow as well
- Meanwhile, debt remains constant – denominated in stables
- This amplified growth flows to MGST's value, since it represents a claim on the treasury
However, leverage is a double-edged sword: if ETH's price falls, the treasury's losses are also magnified.
Adaptive Leverage
When the treasury issues debt or performs market operations, MGST may be minted to bring more ETH into the system. The minting process is governed by protocol rules and subject to community oversight, ensuring there isn't excessive dilution. Conversely, if the protocol rebalances the treasury or repurchases debt, MGST may be burned to maintain accurate accounting between the token supply and the treasury's net position. This allows the protocol's leverage to adapt to different market conditions and opportunities.
Governance
See Governance for more details on the governance process and structure.
Each MGST token represents a vote in governance proposals. These proposals might include:
- Adjusting protocol strategy (ex: market operations, debt issuance)
- Allocating treasury funds toward specific strategies (ex: staking, liquidity)
- Updating onchain parameters (ex: lending markets)
Incentive Alignment
Governance rights ensure that the people with the most at stake – those holding MGST – are motivated to maintain the protocol's long-term health. A well-managed treasury should benefit both the value of MGST and the stability of MegaStrategy.
Key Risks
- Price Volatility – Leverage magnifies both gains and losses, so MGST can exhibit substantial price fluctuations
- Market Liquidity – In periods of market stress, liquidity for MGST may thin out, making large trades difficult without slippage
- Protocol Security – As with any DeFi project, smart contract risks and potential governance attacks may exist
- Treasury Solvency – When the protocol takes on debt, those obligations must be repaid before MGST holders. Over the long term, failure to manage debt maturities and interest can jeopardize the solvency of the treasury – ultimately impacting MGST holders.
Convertible Tokens
MegaStrategy's Convertible Tokens (CVs) are onchain debt instruments that blend yield characteristics with an embedded conversion option, allowing holders to convert their debt into treasury exposure (MGST). This design is modeled after traditional convertible notes and uses auction technology pioneered by Axis for issuance.
Below is a breakdown of how convertibles work, the benefits they provide to holders and the protocol, and the risks involved.
Design Principles
Cost-Effective Capital

Convertibles enable MegaStrategy to raise funds at potentially lower interest rates compared to standard lending models. By granting holders upside participation via conversion, the protocol can access cheaper capital for expanding its treasury or repurchasing existing debt. Convertibles also have longer time horizons than typical onchain debt markets.
Embedded Conversion
These tokens come with an embedded conversion option to exchange debt for exposure to the protocol's treasury (MGST tokens). This structure offers holders downside protection (the debt claim on treasury assets) plus strategy upside if the protocol's treasury grows significantly
Digital Volatility
MegaStrategy thrives on volatility. By leveraging ETH's volatility, convertible holders can see their conversion option become more valuable as volatility increases. This design complements the broader strategy, where leveraged treasury growth and amplified volatility intertwine to drive onchain capital formation.
Issuance
MegaStrategy issues CVs via sealed-bid batch auctions, a mechanism used heavily for offchain debt issuance (ex: US Treasury Auctions). In these auctions:
- Participants Submit Bids – Bidders submit private bids stating how much they're willing to pay for CVs, alongside the principal amount. Bid prices remain sealed until the auction concludes.
- Uniform Price Settlement – Once the auction concludes, all winning bids pay the same final price. This uniform price mechanism is similar to the one used by Treasury Direct to auction US government debt, ensuring fairness for all participants.
- Capital Injection – The protocol receives the proceeds in exchange for newly minted CVs. This capital is used to bolster the treasury's ETH holdings and fuel its adaptive leverage strategy.
By using sealed-bid auctions, MegaStrategy discourages bid sniping and promotes a more even playing field. The uniform clearing price simplifies expectations for participants, ensuring they only pay their maximum price. This auction mechanism fosters transparent price discovery and helps the protocol find competitive rates for debt issuance.
Redemption
There are two scenarios where redemption may occur:
- Maturity Redemption – At maturity, holders can redeem each CV 1-to-1 for the underlying stable asset (ex: USDC)
- Voluntary Conversion – Before maturity, holders can convert their CVs into MGST at a fixed conversion rate (ex: X MGST per CV)
MegaStrategy emphasizes volunatry redemption for its initial convertible design, allowing holders to choose if and when they redeem their convertibles. This approach:
- Empowers CV Holders: By retaining full control over the timing of conversion, CV holders can respond to market conditions – redeeming for stables if MGST’s price is unattractive or converting to MGST if they see upside potential.
- Minimizes Complexity: Traditional convertibles can include features like callable provisions or forced conversion, which can be advantageous to issuers but may complicate early-stage adoption. MegaStrategy’s design keeps things straightforward, ensuring a simpler user experience while the protocol gains initial traction.
Through this voluntary mechanism, CV holders effectively balance security and opportunity – they have the stability of a debt instrument while preserving the option to participate in MGST’s upside if they so choose.
Key Risks
- Price Volatility – While convertibles offer some downside protection, the embedded conversion can lose value if the protocol’s treasury growth slows or if MGST underperforms
- Market Liquidity – Liquidity for convertibles may be limited, though the protocol may choose to buy back debt under certain circumstances
- Protocol Security – As with any DeFi project, smart contract risks and potential governance attacks may exist
- Treasury Solvency – If the treasury suffers large losses, the protocol may struggle to honor redemptions – though debt obligations are prioritized above MGST holders
Bootstrapping
The MegaStrategy bootstrapping event raises wrapped ETH (wETH) to build the initial treasury of the protocol. This is structured as a fixed-price sale, powered by the Axis protocol.
At the end of the event, the following takes place:
- successful buyers can claim their MGST tokens
- unsuccessful buyers can claim their wETH deposit
- any unsold MGST tokens are automatically burned by the callback contract
- the callback contract deposits 10% of the wETH (and a corresponding amount of MGST) into a Uniswap V3 pool
- the remaining wETH proceeds are transferred to the
TRSRY
module
This diagram illustrates the bootstrapping process:
flowchart TD B[Buyers] subgraph Protocol P[Protocol MS] T[TRSRY] end subgraph Axis["Axis"] A[AuctionHouse] C[Callback Contract] end U[UniswapV3 wETH-MGST] P -->|1\. Provides MGST| A B -->|2\. Provide wETH| A A -->|3\. At settlement:<br />wETH + MGST| C C -->|4\. Deposit 10% wETH + MGST<br />as liquidity| U C -->|5\. Remaining wETH| T A -->|6\. Claim MGST| B style Protocol fill:#4169e1,stroke:#333 style Axis fill:#b7410e,stroke:#333
Liquidity
MegaStrategy relies on Uniswap v3 to provide onchain liquidity for both MGST and Convertible Tokens. By pairing these tokens with ETH, the protocol ensures that price discovery remains closely tied to Ethereum’s broader market dynamics — particularly important given MGST’s leveraged exposure to ETH and the CV’s embedded option on MGST.
Why ETH Pairing?
Simple – there is no second best.
Sure, that's a nod to Ethereum's dominance in DeFi – but here are more practical reasons:
Strategy Synergy
- Because MGST and CVs gain or lose value in tandem with ETH, this pairing reduces impermanent loss compared to other assets (where price fluctuations in ETH would incur bigger divergence)
- Pairing with ETH also means we don’t have to reserve stablecoins for CV liquidity pools. This maximizes the protocol’s leverage and preserves any stables the treasury may hold for more appropriate activities – such as buying ETH or repurchasing debt.
CV Pricing
- When ETH's price spikes, CVs trade increasingly like MGST. Anchoring liquidity in ETH accommodates this shift, as both assets tend to move in the same direction.
- Conversely, if ETH's price plunges, the CV becomes more stable – trading near its redemption value. By managing liquidity ranges, the pool can facilitate price discovery even in distressed scenarios.
Providing Liquidity
MGST/ETH Pool
- MGST is inherently a leveraged play on ETH, so an MGST/ETH pair keeps MGST’s value aligned with its core driver
- Liquidity providers can set a price range on Uniswap v3 that suits their risk tolerance, accounting for MGST’s volatility
CV/ETH Pools
- Convertible Tokens can behave more stable or volatile depending on the price of MGST relative to the CV's conversion price
- By positioning liquidity in a targeted range, LPs can capture fees from trades against ETH – reflecting the CV's transition from stable to volatile
Protocol-Owned Liquidity
MegaStrategy provides liquidity for MGST and CV tokens for efficient price discovery.
- MGST liquidity proportional to 10% of circulating supply
- CV liquidity proportional to 5% of each tranche
The protocol does not plan to offer liquidity mining incentives for MGST or CV liquidity. Instead, each pool's liquidity is expected to arise organically from traders and arbirageurs who see opportunities in the protocol's strategies.
Risks
Impermanent Loss
- Even with correlated assets, IL can occur if price moves outside the chosen range
- However, the correlation may help reduce IL relative to pairing with stablecoins, where ETH volatility typically inflicts higher IL
Price Volatility
- ETH volatility can translate into wider swings for MGST and CVs
- LPs must be prepared for rapid movements, especially if ETH rallies or collapses sharply
Distress Scenarios
- If the treasury becomes distressed (ex: ETH tanks and debt is high), CVs may trade near their lower tick on Uniswap v3
- Lower liquidity levels at these ranges requires swift action from governance to adjust liquidity or perform market operations
Key Takeaway
ETH is the Right Pairing
By aligning liquidity with ETH, MegaStrategy ensures that both MGST and Convertible Tokens remain fluid and accurately priced across market cycles — from bullish expansions (where convertibles behave like MGTS) to bearish downturns (where convertibles revert to more stable behavior).
Debt Auctions
As mentioned in convertibles, MegaStrategy achieves leveraged exposure to ETH by issuing convertible debt (CVs). This is achieved through a debt auction mechanism, which is powered by the Axis protocol.
flowchart TD B[Buyers] subgraph Protocol Banker[Banker] P[Protocol MS] T[TRSRY] end subgraph Axis["Axis"] A[AuctionHouse] end Banker -->|1\. Provides cvUSDC| A B -->|2\. Provide USDC, price per cvUSDC| A A -->|3\. At settlement:<br />USDC| Banker Banker -->|4\. Deposits USDC| T A -->|5\. Claim cvUSDC| B T -->|6\. Withdraws USDC| P P -->|7\. Buys wETH| T style Protocol fill:#4169e1,stroke:#333 style Axis fill:#b7410e,stroke:#333
Auction Parameters
When the debt auction is established, the following parameters are provided:
- The token ("quote token") that will be deposited by bidders (e.g. USDC)
- The quantity of quote tokens that will convert to 1 CV token (e.g. cvUSDC)
- The quantity of CV tokens that will be sold
The auction is structured as a price discovery sale (using a sealed bid auction format), where the auction will settle at the same price per CV token.
Bidding
Bidders will provide an amount of quote tokens they wish to bid, and their desired price per CV token.
Market Operations
MegaStrategy’s Market Operations encompass various strategies to manage and stabilize its token markets – MGST (the Strategy Token) and Convertible Tokens (CVs). These operations include:
- At-The-Market (ATM) Operations
- Optimizing Token Liquidity
- Strategic Debt Buybacks
- MGST Buybacks & Guardrails
Each mechanism aims to preserve the treasury’s solvency, optimize leverage, and ensure transparent price discovery.
ATM Operations
At-The-Market Operations refer to minting new MGST tokens and selling them directly into the open market — particularly when MGST trades at a premium to its underlying claim on the treasury’s ETH. By taking advantage of favorable market sentiment, the protocol can inject fresh capital into the treasury, mirroring how MicroStrategy issues new shares to bolster its Bitcoin holdings.
Benefits
- Capturing Premium – If MGST commands a valuation above its treasury holdings, issuing new tokens at market price locks in that premium. This inflow of ETH (or stables) fortifies the protocol’s treasury
- Accumulating ETH – Proceeds expand the treasury’s ETH position, providing more collateral to back future debt issuance or to repurchase existing debt at opportune times
- Lowering Leverage – With additional ETH on hand, the protocol’s Debt-to-Treasury ratio may decrease, reducing the risk profile for all participants (MGST and CV holders)
Mechanics
- ATM Proposal – An ATM proposal specifies the maximum number of MGST tokens to be issued, the time window for sales, and any limiting conditions (ex: only execute above certain premium)
- Execution – If approved, the protocol's smart contracts opens MGST issuance markets in exchange for ETH (or stables) which flows into the treasury
- Deployment - The newly raised funds may be used to increase ETH holdings or pay down debt
- Timing - By carefully timing ATM issuances, MegaStrategy captures capital under favorable market conditions without significantly discrupting MGST price
Optimizing Token Liquidity
MegaStrategy provides liquidity for MGST and CVs against ETH on Uniswap. Periodically rebalancing or shifting these liquidity ranges ensures healthy price discovery, particularly if MGST or CV tokens move significantly in either direction.
Furthermore, adjusting liquidity profiles may be more optimal than executing direct operations (ATM or buybacks) in certain conditions. Any major liquidity adjustments or expansions require a governance vote detailing how much treasury capital is allocated to the liquidity pool and over what price range.
Strategic Debt Buybacks
Purpose
- Reducing total debt obligations can be more beneficial for the treasury’s long-term health than immediately buying back MGST
- By repurchasing outstanding CV tokens (sometimes at a discount if market sentiment is bearish), the protocol can reduce its leverage ratio and minimize future redemption costs
Mechanics
- Buyback Proposal – A governance proposal specifies the amount of debt to purchase, the price range, and the source of funds (ETH, stablecoins, etc.)
- Execution – If passed, the treasury repurchases CVs from liquidity pools or via a specialized buyback contract—retiring debt tokens and alleviating future obligations
- Retirement - Repurchased CV tokens are retired (burned), reducing the outstadning debt load
- Treasury Impact – Debt buybacks lower the protocol’s Debt-to-Treasury ratio, freeing capacity for future strategic maneuvers
MGST Buybacks & Guardrails
Note: While the protocol carries outstanding debt, MGST does not have a “Risk-Free Value” (RFV). Any potential capital for buybacks must first account for the senior claim of creditors (CV holders).
Prerequisites
- Debt-to-Treasury Ratio – In order to execute MGST buybacks, the treasury must be below the protocol's D/T Hard Cap (set by governance)
- Debt Service – Prior to executing MGST buybacks, the protocol can repurchase debt to reduce the D/T Ratio
- Buyback Proposal - Provided the D/T threshold is met, buyback proposals must also demonstrate how the protocol will maintain adequat coverage for remaining debt
Strict guardrails protect the treasury from being raided for short-term MGST price support.
Key Takeaway
By adopting a disciplined approach to ATM operations, liquidity management, and buybacks, MegaStrategy can maintain solvency while capitalizing on market premiums. These dynamics empower the protocol to navigate volatility, sustain market confidence, and ultimately grow the treasury over time.
Lending
MegaStrategy leverages Morpho — a permissionless lending protocol — to create onchain lending markets for MGST and CV tokens. By integrating with Morpho, MegaStrategy unlocks additional utility for both tokenholders, enabling more sophisticated strategies and greater capital efficiency.
Morpho
Morpho is a decentralized protocol built for overcollateralized lending and borrowing. It stands out by allowing permissionless market creation, each market having:
- One collateral asset (ex: MGST or CV)
- One loan asset (ex: USDC or MGST)
- Liquidation Loan-to-Value (LLTV) threshold
- Interest Rate Model (IRM)
- Pricing oracle
Crucially, Morpho's code is immutable once deployed – meaning each market's parameters cannot be changed or halted by governance. This design offers higher collateralization factors and improved efficiency without requiring large multi-asset pools like traditional lending platforms (ex: Aave or Compound).
Why Morpho?
Permissionless Market Creation
- Anyone can deploy a new market — no external governance approval needed
- Each market’s parameters are set at creation
Trustless & Immutable
- Morpho’s code is immutable, meaning no upgrades or admin keys can alter existing markets
- This ensures the protocol remains transparent and consistent over time
High Capital Efficiency
- Isolated markets support higher LLTVs and more targeted risk parameters
- By focusing on one collateral-loan pair, Morpho can offer more competitive interest rates
MGST Markets
MGST is the protocol's strategy token with leveraged ETH exposure. Creating an MGST↔USDC market on Morpho benefits tokenholders in several ways:
Unlock Liquidity
MGST holders can deposit their tokens as collateral and borrow stablecoins without selling their leveraged ETH position. This allows them to pursue additional DeFi strategies — while maintaining upside exposure to MGST.
Shorting or Hedging
On the flip side, users can deposit USDC and borrow MGST – effectively shorting the token if they expect near-term price drops or want to hedge an existing position.
CV Markets
Convertible Tokens (CVs) are stable-denominated debt instruments with an embedded option to convert into MGST at a fixed, predictable rate. This fixed-rate conversion effectively secures the underlying redemption value of CVs, allowing them to be used as collateral.
CV↔MGST markets on Morpho unlocks the following for convertible holders:
Delta-Neutral Strategy
CV holders can deposit their tokens as collateral and borrow MGST. By selling the borrowed MGST for stablecoins, a user offsets much of the CV’s exposure to MGST price movements, creating a delta-neutral position. This approach lets convertible holders harness volatility while minimizing direct risk from ETH price swings.
Convertible Leverage
Users can also tap into MGST lending markets to increase their CV exposure. After depositing CV as collateral and borrowing stablecoins, a user can purchase additional CV and re-deposit it — thereby leveraging their position. This approach can be repeated multiple times, magnifying both potential gains and liquidation risks. Users should carefully monitor their health factor and overall market conditions before employing this strategy.
Risks
Liquidation Risk
If collateral drops in value or if a borrower’s debt exceeds the LLTV threshold, positions can be liquidated. Volatile assets like MGST warrant careful management.
Interest Rates & Liquidity
Each market is isolated; if few users supply MGST or CV, interest rates can spike or borrowing capacity may be limited. Low liquidity also increases slippage on liquidations.
Oracle Dependence
Morpho requires a reliable price feed. Malfunctions or extreme market conditions could lead to mispriced collateral.
Smart Contract Risk
Though Morpho’s code is intentionally minimal and immutable, all DeFi protocols carry potential risks from exploits, unexpected interactions, or governance-driven events.
Contract Addresses
Base
Contract | Address |
---|---|
Kernel | 0x0000000000000000000000000000000000000000 |
Policies | |
Banker | 0x0000000000000000000000000000000000000000 |
Emergency | 0x0000000000000000000000000000000000000000 |
Issuer | 0x0000000000000000000000000000000000000000 |
MegaTokenOracle | 0x0000000000000000000000000000000000000000 |
PriceConfigV2 | 0x0000000000000000000000000000000000000000 |
RolesAdmin | 0x0000000000000000000000000000000000000000 |
TreasuryCustodian | 0x0000000000000000000000000000000000000000 |
Modules | |
PRICE | 0x0000000000000000000000000000000000000000 |
ROLES | 0x0000000000000000000000000000000000000000 |
TOKEN | 0x0000000000000000000000000000000000000000 |
TRSRY | 0x0000000000000000000000000000000000000000 |
PRICE Submodules | |
ChainlinkPriceFeeds | 0x0000000000000000000000000000000000000000 |
SimpelPriceFeedStrategy | 0x0000000000000000000000000000000000000000 |
UniswapV3Price | 0x0000000000000000000000000000000000000000 |
System Architecture
Design
MegaStrategy is built using a modular architecture that separates core state (Modules) from business logic (Policies). Each module manages a specific set of state variables and access control, while policies define how users and external contracts interact with this state. The entire system is coordinated through a central Kernel contract that manages module installation, policy activation, and access control.
This architecture follows the Default Framework.
Overview
Our implementation consists of four core modules: PRICE
(oracle system), ROLES
(access control), TOKEN
(protocol token), and TRSRY
(treasury management). These modules store and manage all protocol state. Seven policies - Banker
, Emergency
, Issuer
, MegaTokenOracle
, PriceConfig
, RolesAdmin
, and TreasuryCustodian
- define the business logic for interacting with this state.
Each policy's permissions are explicitly defined and enforced by the Kernel, ensuring that state changes only occur through approved pathways.
This strict separation between state and logic provides several benefits: it makes the codebase more maintainable by isolating concerns, enables granular access control through the Kernel, and allows for selective upgrades of business logic without disrupting core state management. The diagram below illustrates these relationships:
graph TD %% User at the top User((User)) Council((Council)) Morpho((Morpho)) %% Policies in the middle subgraph Policies Banker[Banker] Emergency[Emergency] Issuer[Issuer] MegaTokenOracle[MegaTokenOracle] PriceConfig[PriceConfig] RolesAdmin[RolesAdmin] TreasuryCustodian[TreasuryCustodian] end %% Kernel in the middle Kernel[Kernel.sol] %% Modules at the bottom subgraph Modules PRICE["PRICE"] ROLES["ROLES"] TOKEN["TOKEN"] TRSRY["TRSRY"] end %% Connect user to policies User --> Banker User --> Issuer %% Connect council to policies Council --> Banker Council --> Emergency Council --> Issuer Council --> PriceConfig Council --> RolesAdmin Council --> TreasuryCustodian %% Connect morpho to policies Morpho --> MegaTokenOracle %% Connect policies to kernel Banker --> Kernel Emergency --> Kernel Issuer --> Kernel MegaTokenOracle --> Kernel PriceConfig --> Kernel RolesAdmin --> Kernel TreasuryCustodian --> Kernel %% Connect kernel to modules Kernel --> PRICE Kernel --> ROLES Kernel --> TOKEN Kernel --> TRSRY %% Style classDef user fill:#fff,stroke:#333,stroke-width:2px,color:#000; classDef module fill:#e6f3ff,stroke:#3182ce,stroke-width:2px,color:#000; classDef policy fill:#f0fff4,stroke:#38a169,stroke-width:2px,color:#000; classDef kernel fill:#fff5f5,stroke:#e53e3e,stroke-width:2px,color:#000; class User user; class Council user; class Morpho user; class PRICE,ROLES,TOKEN,TRSRY module; class Banker,Emergency,Issuer,MegaTokenOracle,PriceConfig,RolesAdmin,TreasuryCustodian policy; class Kernel kernel; click Banker "#banker" "Go to Banker policy"; click Emergency "#emergency" "Go to Emergency policy"; click Issuer "#issuer" "Go to Issuer policy"; click MegaTokenOracle "#megatokenoracle" "Go to MegaTokenOracle policy"; click PriceConfig "#priceconfig" "Go to PriceConfig policy"; click RolesAdmin "#rolesadmin" "Go to RolesAdmin policy"; click TreasuryCustodian "#treasurycustodian" "Go to TreasuryCustodian policy"; click PRICE "#price" "Go to Price module"; click ROLES "#roles" "Go to Roles module"; click TOKEN "#token" "Go to Token module"; click TRSRY "#treasury" "Go to Treasury module";
Permissions
The Default framework uses a permissions model to control access to the protocol. It has the following characteristics:
- Policies are external-facing, with functions that can be open or gated to particular roles.
- Modules can gate access to their functions by using the
permissioned
modifier. This ensures that only Policies can access them. - If a policy needs to access a
permissioned
function in a Module, it must define those functions in therequestPermissions()
function. The Kernel will then ensure that the Policy only uses those functions.
The protocol currently has two standard roles that are shared across all policies:
manager
: Operational management of the protocol, such as creating CV token auctions.admin
: Administration of the protocol, including the initialization of Policy parameters and management of the treasury. Typically held by the council multi-sig or on-chain governance.
Policies
Banker
A policy that manages convertible debt token (CV) auctions and the debt lifecycle. It coordinates with the TRSRY and TOKEN modules to handle the issuance, maturation, and conversion of CV tokens.
Certain actions are restricted to the admin
and manager
roles.
Major Features
Convertible Token Creation
- Creates new CV tokens using factory pattern
- Assigns unique series numbers for each underlying asset
- Stores and tracks created tokens with
createdBy
mapping
Auction Management
- Launches Encrypted Marginal Price Auctions (EMPA) for CV tokens
- Sets minimum price based on configured max discount
- Controls auction parameters like fill percentage and bid sizes
- Handles auction callbacks for settlement and cancellation
Token Settlement
- Manages CV token redemption after maturity
- Handles conversion of CV tokens to protocol tokens
- Coordinates withdrawal of collateral from TRSRY
- Updates approvals and permissions after settlement
Parameter Management
- Controls auction parameters like max discount and min fill
- Manages referrer fees for auctions
- Configures maximum number of bids per auction
Emergency
The Emergency policy enables a caller with the emergency
role to pause the protocol in case of an emergency. Specifically, it deactivates the TRSRY
and TOKEN
modules.
Issuer
The Issuer policy is responsible for issuing the protocol token (MGST) and option tokens.
MegaTokenOracle
The MegaTokenOracle policy is used by Morpho markets to determine the price of a CV token.
PriceConfig
The PriceConfig policy is used by the protocol to configure the price feeds for the assets that are tracked in the treasury.
RolesAdmin
The RolesAdmin policy is used to grant/revoke roles to/from addresses.
TreasuryCustodian
The TreasuryCustodian policy is used by permissioned callers to withdraw assets from the treasury.
Modules
PRICE
The PRICE module contains the configuration required to determine the price of specified assets. Each asset can be configured with 1 or more sources (a Chainlink price feed or Uniswap V3 pool TWAP at the moment) and an aggregation method.
ROLES
The ROLES module stores the defined roles and addresses that have been granted them.
TOKEN
The TOKEN module is the protocol token and an implementation of the ERC20 standard.
TRSRY
The TRSRY module is the protocol's treasury and stores the protocol's assets.
FAQs
What is a Strategy Token?
Adaptive ETH Leverage – the MegaStrategy Token (MGST) represents the protocol's treasury, providing leveraged exposure to ETH. By design, MGST avoids short-term liquidations typical in DeFi loans, relying instead on longer debt horizons and treasury-based risk management.
What is a Convertible Token?
Active Stable Strategy – Convertible Tokens (CVs) are stable-denominated debt issued by the protocol, featuring an embedded option to convert debt into MGST at a fixed rate. This allows CV holders to capture upside if MGST’s value appreciates.
Where does the leverage come from?
MegaStrategy's leverage comes from the balance between MGST and CV holders. MGST holders seek leveraged upside on ETH, while CV holders provide stablecoins in exchange for debt instruments. The treasury uses these stablecoins to purchase ETH, effectively amplifying MGST’s exposure.
Where does the yield come from?
The protocol executes market operations to grow its treasury, and may hold liquid staking tokens to earn yield on ETH. MegaStrategy’s debt typically has longer maturities, reducing the risk of forced liquidations and creating a more stable environment for compounding treasury growth.
Can I withdraw my funds?
MGST is not directly redeemable for a portion of the treasury. However, the protocol maintains adequate liquidity to allow MGST holders to buy or sell tokens at a market-driven price. If that price deviates significantly from the treasury’s implied value, governance may step in with market operations.
How are new tokens created?
MGST is minted primarly when convertible debt is issued or via market operations. Selling CV tokens for stablecoins injects capital into the treasury, while new MGST is minted for the embedded conversion option. If MGST trades at a premium, governance can approve minting additional MGST and selling it directly on the open market, raising more ETH or stablecoins for the treasury.
How do I buy MGST or CV tokens?
MGST – You can purchase MGST from onchain liquidity pools (ex: MGST/ETH DEX pools)
CV - New CV tokens are typically issued via auctions. If you miss an auction, you can find CVs onchain (ex: CV/ETH DEX pools).
Why doesn’t MegaStrategy face onchain liquidations?
Unlike typical lending protocols that instantly liquidate positions if collateral falls, MegaStrategy issues debt on longer time horizons via convertible debt. This approach avoids forced liquidations, though MGST holders still face leverage risk if ETH’s price collapses for a prolonged period on those time horizons.
What happens if ETH’s price collapses?
A major ETH drawdown can:
- Devalue the Treasury – Lower ETH prices shrink the treasury’s value
- Strain Debt Coverage – CV redemptions become more challenging to honor if the treasury’s collateral has lost value
- Trigger Governance Intervention – If certain leverage ratios or risk thresholds are breached, the community can vote on corrective actions like debt buybacks or halting new MGST issuance
What happens if ETH's price increases?
A major rally in ETH can:
- Expand the Treasury – Higher ETH prices boost the overall value of the treasury
- Strengthen Debt Coverage – With more capital available, it becomes easier to redeem debt, reducing the protocol’s leverage risk
- Enable Growth-Oriented Strategies – If certain leverage or coverage thresholds are exceeded, the community can vote on actions like repurchasing debt, authorizing MGST buybacks, or funding further strategic expansions
Who can submit governance proposals?
Any sufficiently large MGST holder (meeting the proposal threshold) can submit proposals. Smaller holders can join forces or delegate their MGST to a representative. Once submitted, proposals go through a voting period, and if they pass, they’re executed by the protocol’s smart contracts.
Have more questions?
Reach out on the official MegaStrategy channels or check our GitHub to propose your own FAQ additions.
Security
Security Reviews
Initial Audit (2025-01)
MegaStrategy's initial set of smart contracts were audited by Trust Security at commit a76d727.
Read the audit report.
Bug Bounty
Coming soon™
Contributors
Here is a list of the contributors who help maintain the MegaStrategy Codex:
If you feel you’re missing from this list, feel free to add yourself in a PR.