# Welcome

Welcome to MAHA and ZAI, the stable money of the Ethermind.

MAHA (previously known as MahaDAO) is a community-powered decentralized organization focused on creating a better stable economy.

At the heart of the ecosystem are two main tokens - MAHA and ZAI.

## What is MAHA?

MAHA is the governance and utility token that regulates the protocol, the MAHA community, and other products governed by the DAO.

MAHA token holders can vote to allocate MAHA towards grants, strategic partnerships, governance initiatives, additional liquidity mining pools, and a host of other programs. The tokenomics are designed to promote self-sustaining community interest, developer engagement, and ecosystem adoption.

* **Vote on Governance Decisions** – Influence protocol parameters, partnerships, and incentive allocations.
* **Earn Revenue Share** – MAHA LP stakers get a portion of the protocol’s earnings.
* **Boost Your Rewards** – Staking MAHA gives a boost to your rewards across various programs.
* **Exclusive Access** – Gain early access to governance proposals and yield opportunities.

## Governance&#x20;

The MAHA token isn’t just about holding—it’s about using it to shape the ecosystem. Here’s how MAHA governance works:

1. **Protocol Parameters** – Vote on risk models, collateral types, fees, and operational budgets for JeremyAI.
2. **Incentive Allocation** – Direct liquidity mining rewards, staking boosts, and AI-driven incentives.
3. **Strategic Partnerships** – Support integrations with protocols like Pendle, Ethena, and AI platforms like DeepSeek.
4. **Safety Pool Management** – Help govern slashing parameters and bad debt recovery strategies.

### Introducing JeremyAI

JeremyAI is changing the game by bringing automation and intelligence to DeFi governance. Instead of relying on manual votes for routine decisions, MAHA holders can leverage AI-powered insights to optimize incentives and maximize efficiency.

#### What JeremyAI Does:

* **Automates Incentives** – Allocates MAHA emissions dynamically to maximize returns and liquidity impact.
* **Recommends Strategies** – Publishes AI-driven reports with data-backed governance proposals.
* **Ensures Transparency** – All transactions and decisions are executed on-chain for full auditability.

**Example:**

Say there’s a proposal to allocate MAHA to a new Pendle PT pool. JeremyAI runs the numbers—analyzing potential ROI, liquidity impact, and user demand—so voters make decisions based on real insights rather than guesswork.

### ZAI: The Lending-Focused Stablecoin

ZAI is the lending-focused stablecoin that powers MAHA’s DeFi ecosystem. Unlike traditional stablecoins, ZAI is optimized for leverage and yield generation, enabling users to maximize their liquidity across various DeFi platforms.

#### Why ZAI?

* **Minimalistic & Scalable** – Designed with a lightweight architecture that scales efficiently.
* **Strong Peg Stability** – Maintained through a Peg Stability Module with a collateral basket of stable assets.
* **Instant Lending Liquidity** – Supplied to lending protocols for borrowing and leverage opportunities.
* **AI-Optimized Incentives** – JeremyAI dynamically manages liquidity incentives to ensure efficient market conditions.

### What’s Next?

MAHA is evolving, and JeremyAI is just getting started. Here’s what’s coming next:

* **Real-Time Market Analysis** – AI-driven insights that adapt to shifting DeFi conditions.
* **Autonomous Execution** – Automated deployment of liquidity mining and incentive programs.
* **DeFi Integration** – Soon, users will be able to interact with JeremyAI directly to find the best yield opportunities.

With MAHA, ZAI, and JeremyAI, we’re building a smarter, more efficient DeFi ecosystem—one where governance is transparent, incentives are optimized, and every decision is backed by AI-driven insights.

Check out **Distribution & Inflation** to know more MAHA's tokenomics


# Roadmap

This page details a simple roadmap for the MAHA protocol.

The following is a rough roadmap for the ZAI stablecoin:&#x20;

## Phase 0: Early Bootstrap Mode

In this phase, we focus on bootstrapping liquidity for ZAI and aim to grow its liquidity and market valuation to $500k—$1mn.&#x20;

Users can mint ZAI using stablecoins and will be incentivized with MAHA emissions. Accepted stablecoins will be USDC, DAI, USDe and ZAI will be minted using the [Peg Stability Module](/stablecoin-zai/peg-mechanics/peg-stablility-module-psm).

Once the protocol reaches the $500k—$1mn liquidity mark, we will proceed to Phase 1.

## Phase 1: Early Lending Stage

In this phase, we will launch ZAI into a few lending markets using the [Direct Deposit Module](/stablecoin-zai/peg-mechanics/direct-deposit-module-ddm) and accept a few assets as collateral so that ZAI can be borrowed against them.&#x20;

Initially, the protocol will limit the amount of ZAI minted to lending protocols to be no more than 50% of the available liquidity on DEXes. This is kept to ensure that there's strong peg support as borrowers sell their ZAI for leveraged exposure.

In this phase, the protocol starts to generate lending and borrowing revenue, which starts to go back to LP stakers.

This phase will last for 2-3 months and can get extended depending on the growth of the protocol. In this phase, we will also stop any MAHA emissions used to bootstrap liquidity and focus solely on [revenue incentives](/governance-maha/revenue-share) for liquidity incentives.

## Phase 2: MAHA Airdrop & Points

{% hint style="info" %}
The MAHA Airdrop is currently kept behind closed doors and will be revealed to the community when the time is right.&#x20;
{% endhint %}

{% hint style="success" %}
The earliest contributors to the protocol will earn the most amount of points. Even prior to launch.&#x20;
{% endhint %}

## Phase 3: Cross-chain expansion

We start to expand to ZAI to multiple chains and provide liquidity to lending protocols across other chains allowing leverage traders to borrow ZAI.

In this phase, we will also aim to enable cross-chain native re-staking, which will allow users to mint ZAI with native USDC/USDT minted on these chains.

***

Within these four phases, we aim to convert ZAI into a fully functioning stablecoin with deep liquidity and integrations within the DeFi ecosystem.


# MAHA Overview

This section briefly summaries the MAHA token.

{% hint style="info" %}
The MAHA Token is currently deployed over at:\
[0x554bba833518793056CF105E66aBEA330672c0dE](https://basescan.org/address/0x554bba833518793056cf105e66abea330672c0de)
{% endhint %}

**MAHA** is the governance and utility token that regulates the protocol, the MAHA community, and **AI-driven products** governed by the DAO.

MAHA token holders vote to allocate MAHA toward grants, strategic partnerships, governance initiatives, liquidity mining pools, **and JeremyAI’s incentive campaigns**.

The tokenomics are designed to promote self-sustaining community growth, developer engagement, and **AI-optimized ecosystem adoption**.

#### Key Governance Roles: &#x20;

1\. Protocol Parameters: Vote on ZAI’s risk models, collateral types, fees, and JeremyAI’s operational budget (e.g., 1,000 MAHA allocated every two days). &#x20;

2\. Incentive Allocation: Approve liquidity mining pools, staking boosts, and AI-driven incentive strategies executed by JeremyAI. &#x20;

3\. Strategic Partnerships: Govern integrations with protocols like Pendle, Ethena, and **AI platforms** like DeepSeek. &#x20;

4\. Safety Pool Management: Adjust slashing parameters and bad debt resolution mechanisms.

## Why MAHA?

There are many reasons why a user would want to buy, hold, and stake the MAHA token.

* **Governance**: MAHA holders vote and make decisions on the protocol.
* **Revenue Share**: MAHA LP stakers get a portion of the protocol revenue (see [revenue share](/governance-maha/revenue-share)).
* **Staking Boosts**: Users who stake MAHA get a boost on all their rewards (see[ staking boosts](/governance-maha/staking-boosts)).
* **Exclusive Access**: Holding the MAHA token and staking it gives exclusive access within the community.
* Updated:\
  **AI-Driven Protocol**: MAHA holders govern JeremyAI’s parameters, including budget allocation and incentive strategies.

  **Revenue Share:** Stakers earn a portion of protocol revenue, now amplified by JeremyAI’s efficient capital deployment.

  **Exclusive Access:** MAHA stakers gain early access to JeremyAI’s yield opportunities and governance proposals.

## Integration with JeremyAI

**JeremyAI** (@jpowellxbt) enhances MAHA’s governance by: &#x20;

1\. Automating Incentives: Dynamically allocates MAHA emissions to pools with the highest ROI, replacing manual voting for routine liquidity programs. &#x20;

2\. Proposing Strategies: Publishes on-chain reports (e.g., [Jan 30th Report](https://jpowell.ai/report?id=679ac11ebdbcc6bdc030ea92)) with AI-modeled recommendations for governance votes. &#x20;

3\. **Enforcing Transparency**: Every incentive decision is executed on-chain and auditable via transaction hashes in JeremyAI’s reports. &#x20;

#### Example: &#x20;

A governance proposal to allocate MAHA to a new Pendle PT pool is first analyzed by JeremyAI, which simulates ROI, liquidity impact, and user demand. &#x20;

MAHA holders vote based on JeremyAI’s findings, reducing guesswork and improving capital efficiency.&#x20;

### Key Features

* **Real-Time Analysis:** Tracks liquidity flows, user behavior, and market conditions to model optimal incentives.
* **Autonomous Execution**: Deploys liquidity mining programs, yield boosts, and growth campaigns without manual intervention.
  * **Phase 1 (Live):** MAHA uses JeremyAI to scale ZAI’s liquidity. &#x20;
  * **Phase 2 (Coming Soon)**: Users interact directly with JeremyAI to discover yields across DeFi.

To learn more about MAHA's tokenomics, view [Distribution & Inflation](https://github.com/mahaxyz/docs/blob/master/governance/distribution.md).

{% embed url="<https://youtu.be/TUk17M6Ww-I>" %}
Everything you need to know about MAHA.
{% endembed %}


# Token Distribution

This section details about the distribution of the MAHA token over time.

The MAHA token is a limited supply token with no more than 10 million tokens that will ever be circulated. A vast majority of MAHA tokens have been allocated to community and ecosystem-related activities, which underpin MAHA's dedication to being a coin that is governed and controlled by its people.

Furthermore, the supply of MAHA is stretched out across a period of 10 years to ensure that token holders are as distributed and decentralized as possible. No one entity should be capable of controlling more than 1% of the supply over the course of the next few years.

<figure><img src="/files/p3axwJA8t6wERQBw8zPB" alt=""><figcaption><p>Over 67% of the MAHA token's supply is allocated towards community and growth related activities.</p></figcaption></figure>

On December 17th, 2020, MahaDAO conducted its very first private sale and IDO, releasing approximately 8% of the supply into circulation.

## A 10-year Distribution Period

The MAHA token is unique in the fact that the token is gradually released into circulation over 10 years. This is done to ensure that the MAHA token's supply stays as evenly distributed as possible, keeping the entire protocol and the ecosystem secure from whale manipulation.

![A pictogram showcasing how the token supply gets released over time.](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjczJvfPpF-kD-T8JCr%2Fuploads%2FUIb7wIKBf3zrIj01pRSo%2Ffile.png?alt=media)

Tokens are released into circulation through a linear distribution to ensure that there is no concentration of tokens amongst early adopters (Except for the first year when private and seed token holders are continuously vested).

*(It is estimated that by year 3 or 4, the token distribution will be spread out as evenly as possible so that no single entity can control more than 1% of the MAHA supply).*

*After 10 years, the annual inflation rate drops to 2% per year.*

## Month by Month Breakdown

For those who would like to take precise numbers on how much MAHA will get added into the circulation, month by month, an excel sheet (linked [here](https://docs.google.com/spreadsheets/d/1MY3___VHDXJc-I4mTNPFQghmVCUo4gONT882QlCSuX4/edit?usp=sharing)) has been created, which goes into depth on how many new tokens get added into circulation.

{% embed url="<https://docs.google.com/spreadsheets/d/1MY3___VHDXJc-I4mTNPFQghmVCUo4gONT882QlCSuX4/edit?usp=sharing>" %}
An interactive excel sheet which showcases token supply month by month
{% endembed %}


# Staking Boosts

This page explains about staking boosts and how users.

Initially inspired by the staking boosts implemented on Curve finance, the MAHA protocol also implements its own version of a staking boost, incentivizing liquidity providers who are participating within the ecosystem to also become MAHA stakers.

Every staking pool contract in the protocol implements a staking boost mechanism that gives liquidity providers who [stake MAHA](/governance-maha/staking), a boost of upto 5x depending on how much MAHA has been staked.

Staking boosts not just apply to MAHA emissions but also all revenue eanred from the protocol as well.

{% hint style="success" %}
Staking boosts go all the way up to 5x and apply to all incentive contracts! The more MAHA a user stakes, the larger the boost that they get.
{% endhint %}

## How is the Boost Calculated?

Staking boost goes all the way up to 5x depending on the following variables:

1. **How much total voting power does the pool have?** The more users who have a voting power and are staking in a pool, the more competitive boosts become.&#x20;
2. **How much voting power does a user have?** Depending on the percentage of the participating voting power a user has in a pool, the boost gets calculated. If a user has staked more tokens then he/she is entitled a larger share of the boosts.

The formula for the boosts is then calculated as follows considering the following variables. First we understand how much percentage of the voting power a user has in the pool.

$$
votingShare(x, pool) = \dfrac{votingPower(x)}{totalVotingInPower(pool)}
$$

If a pool has no voting power (which means that no one participating in the pool has staked any MAHA), then everyone gets the same level of boost.&#x20;

<table><thead><tr><th>Voting Power of User</th><th>Voting Power in the Pool</th><th width="143">Effective Voting Share</th></tr></thead><tbody><tr><td>0 veMAHA</td><td>0 veMAHA</td><td>100%</td></tr><tr><td>5,000 veMAHA</td><td>100,000 veMAHA</td><td>5%</td></tr><tr><td>5,000 veMAHA</td><td>5,000 veMAHA</td><td>100%</td></tr></tbody></table>

Once we have the `votingShare` of a user in a pool, we then roughly give a boost based on how much supply of the pool the user has.

$$
supplyShare(x, pool) = \dfrac{balanceOf(x)}{totalSupply(pool)}
$$

The final boost is calculated as the following.

$$
todo
$$

The following table gives a rough idea of how staking boosts are calculated depending on the variables mentioned above.

<table><thead><tr><th>Voting Share</th><th width="143">% of Pool </th><th>Effective Boost</th></tr></thead><tbody><tr><td>0%</td><td>1%</td><td>1x</td></tr><tr><td>50%</td><td>5%</td><td>2x</td></tr><tr><td>100%</td><td>1%</td><td>5x</td></tr><tr><td>50%</td><td>1%</td><td>5x</td></tr></tbody></table>

## Source Code

The following source code is taken from the [MultiStakingRewardsERC4626](https://github.com/mahaxyz/contracts/blob/master/contracts/core/utils/MultiStakingRewardsERC4626.sol#L322-L342) contract, which is used by all the staking contracts within the protocol. Boosts are used in reward calculations only and do not affect user deposits.

Boosts are updated every time a user either stake, withdraws or claims rewards from the contracts.

```solidity
function _calculateBoostedBalance(address account) internal view returns (uint256 boostedBalance_) {
  // how much tokens a user has staked
  uint256 balance = balanceOf(account);
  
  // how much total tokens have been staked
  uint256 totalSupply = totalSupply();

  // reduce the balance by 1/5th; anyone that has not staked any tokens
  // will always have their reward balances at 1/5th the original value
  boostedBalance_ = balance / 5;
  
  // modify the balance depending on how much share of the voting power the user has
  if (_totalVotingPower > 0) {
    boostedBalance_ += totalSupply * _votingPower[account] / _totalVotingPower * 4 / 5;
  }

  // cap the new balance to the original balance effectively 
  // giving a 5x if theuser has enough voting power
  boostedBalance_ = Math.min(balance, boostedBalance_);
}
```


# Revenue Share

This page talks about how MAHA users benefit from revenue earned from the protocol.

The MAHA ecosystem has various sources of revenue, which are collected at a single place and distributed across various entities. Revenue comes from the following channels:

1. **Borrowing Fees**: Users that borrow ZAI pay a borrowing interest in the form of ZAI. This is the main focus for scaling the protocol.
2. **Redemption Fees:** Any time a user redeems ZAI for the underlying stablecoins, a 1-3% redemption fee is charged in the stablecoin.

### Key Innovations:

* **Dynamic Fee Allocation:** JeremyAI shifts fee shares between pools weekly based on utilization rates. &#x20;
* **Anti-Fragile Safety Pool:** Fees scale with redemption pressure, deterring speculative attacks. &#x20;
* **AI Sustainability:** 10% funding ensures JeremyAI operates independently without draining MAHA’s fixed supply.&#x20;

{% hint style="info" %}
Users who have staked MAHA get a 5x boost in their revenue share! Read more about [staking boosts](/governance-maha/staking-boosts).
{% endhint %}

## How Revenue Gets Distributed

Once revenue is collected, it is sent to various sources to grow the protocol. A large portion of the revenue is redirected to liquidity pools, as without liquidity, the protocol cannot scale.

For the ZAI stablecoin, all revenue will be converted into USDC and distributed back to stakeholders.

<table><thead><tr><th width="212">Recipient</th><th width="123">Allocation</th><th>Comments</th></tr></thead><tbody><tr><td>ZAI/USDC Liquidity Providers</td><td>60%</td><td>Used to grow liquidity for ZAI. Gets the lion share of the revenue.</td></tr><tr><td>MAHA Stakers</td><td>20%</td><td>Used to grow liquidity for MAHA and get more MAHA locked.</td></tr><tr><td>Treasury &#x26; Operations</td><td>10%</td><td>Used by the DAO to pay for various expenses</td></tr><tr><td>Safety Pool</td><td>10%</td><td>Used to repay off any bad debt</td></tr></tbody></table>

| Category            | Allocation | Managed By       | Key Purpose                                            |
| ------------------- | ---------- | ---------------- | ------------------------------------------------------ |
| Borrowing Fees      | 60%        | JeremyAI         | Optimize LP incentives                                 |
| Redemption Fees     | 20%        | Safety Pool      | Mitigate bad debt risks                                |
| AI Operations       | 10%        | JeremyAI  Budget | JeremyAI Budget  \| Fund automation & growth campaigns |
| Governance Treasury | 10%        | DAO              | Strategic partnerships & emergencies                   |

DeFAI - first page

MAHA section

Talk more about MAHA

* access, earn share of the rev
* why MAHA

ZAI<br>


# Voting Power (veMAHA)

This section of the site talks about vote-escrowed MAHA.

veMAHA is a representation of the voting power a user gets when they either lock their MAHA or their MAHA/ETH LP tokens. It is calculated using two metrics:

* How long is the MAHA locked for?
* How much MAHA is locked?

The goal of this kind of mechanism is to create a fair and decentralized distribution of voting power that gives as much power to the common man as compared to a whale.

In most cases, smaller holders will tend to lock their tokens for longer periods of time to get the same amount of voting power as whales, who will tend to larger amounts of tokens but for lesser periods of time. This allows participants to have their voices recognized better by simply locking their tokens for longer periods of time.

## How is veMAHA Calculated?

veMAHA is a combination of the voting power from&#x20;

* **Single-staking MAHA:** Users can directly stake their MAHA without any risk of impermanent loss. The max lock duration for single-staking MAHA is 4 years as there's less risk with single-staking MAHA (vs LP staking)
* **LP staking MAHA/ETH:** Users can add liquidity to the MAHA/ETH liquidity pool on Curve. Due to the risks of impermanent loss, the max lock duration for LP staking is 1 year.

The voting power from a pool is calculated as a function of&#x20;

* **How many tokens have been locked:** The more tokens that have been staked, the more the voting power.
* **How long have the tokens been locked for:** The longer the tokens have been staked for, the more the voting power.
* **What is the max lock duration for the pool:** The longest duration a lock can be made for.

$$
locked(x, maxLockDuration) = \frac{\text{totalLocked(x)}}{averageLockDuration(x) / maxLockDuration}
$$

Given the above formula, the final formula is just the sum of the voting power of single staking of MAHA (with a 4-year max lock duration) and LP staking of MAHA/ETH (with a 1-year max lock duration).

$$
\text{veMAHA}= locked(\text{MAHA, 4 years}) + locked(\text{MAHA/ETH, 1 year})
$$

The below table showcases an example of how much veMAHA a person receives, given 1000 MAHA that is locked across various intervals of time. However, note that a user can choose any interval between 2 weeks to 4 years.

<table><thead><tr><th width="361">For 1000 MAHA locked</th><th>Lock Duration</th></tr></thead><tbody><tr><td>1000 veMAHA</td><td>4 years</td></tr><tr><td>250 veMAHA</td><td>1 year</td></tr><tr><td>127.4 veMAHA</td><td>6 month</td></tr><tr><td>63.7 veMAHA</td><td>3 month</td></tr><tr><td>21.23 veMAHA</td><td>1 month</td></tr><tr><td>4.79 veMAHA</td><td>1 week</td></tr></tbody></table>

<figure><img src="/files/MuXvCe8TdyoTuQUYUn3M" alt=""><figcaption><p><em>A graph showcasing the</em> <code>veMAHA</code> <em>power (y-axis) across the number of days locked (x-axis) for 1000 MAHA</em></p></figcaption></figure>

## Voting power that decays over time <a href="#voting-power-that-decays-over-time" id="voting-power-that-decays-over-time"></a>

One of the most important properties of a true democracy is the right of members to secede from the group. Transitioning of power is an important aspect of any future footed governance. Current participants need to give space for newer participants to come forward.

First-mover advantages within the MAHA ecosystem can lead to governance structures centralized to early adopters, making it harder for power to secede successfully.

This is why having the voting power decay slowly over time is important in creating future-footed governance.

Unless staked, every `veMAHA` NFT has its voting power, decay over time if it is not participating in active governance. This creates an incentive for holders to not just stake their NFTs but also have voting power that secedes if unstaked.

The end goal is to have a fully decentralized governance model that is evenly spread out and allows room for new participants to join in.


# Staking NFTs

This page talks about how NFTs are created for every user-stake in the protocol.

{% hint style="info" %}
NFTs, unless staked, have no functionality within the governance platform. These include benefits like earning fees, exercising voting power, providing legitimacy to a group of individuals, and so on.
{% endhint %}

Once an NFT is staked:

* It cannot be moved to another wallet address, and its voting power (MAHAX balance) is frozen
* It also cannot be traded on third-party marketplaces such as [OpenSea](https://opensea.io/)
* It can be unstaked at any point in time
* It will start earning fees and can be used for governance, voting, and boosting

Unstaking an NFT removes all the restrictions above, but at the same time unfreezes the voting power (MAHAX balance) which will start to decay over time.

To claim the underlying MAHA behind an NFT or to merge an NFT with another NFT, they both need to be unstaked.

{% hint style="info" %}
When a MAHAX NFT lock is created, the user gets an option to decide if he/she wishes to also stake the NFT in the same transaction. By default this is enabled.
{% endhint %}

## Merging NFTs

MAHAX NFTs can be merged into one another, allowing for voting power to get combined and a greater MAHAX balance.

When an NFT has merged, the following steps take place:

* A check is run if both NFTs are staked or not. Merging happens only if both NFTs are unstaked
* The first NFT is burnt
* The second NFT is updated with the combined underlying MAHA balances for both NFTs
* The second NFT is updated with a lock duration that is longer than the two NFTs

{% hint style="info" %}
Merging NFTs creates more powerful NFTs with a net combined voting power.
{% endhint %}

## Role of Governance

### Governance <a href="#governance" id="governance"></a>

The MAHAX NFT locker has various parameters that can be controlled by Governance:

* **The minimum amount of MAHA required for a lock:** This is currently set at `99 MAHAX` (or rather approximately `100 MAHA` locked for 4 years). If the cost of minting an NFT becomes higher, then ideally, lowering the minimum mint floor will allow for more NFTs to be minted as the cost of minting a piece becomes lower.
* **NFT minting privileges:** Currently only used for the migration of NFTs from the polygon, this function allows addresses/contracts to mint NFTs at will. Only to be used in rare scenarios.

## FAQs

**Can I make multiple locks using a single wallet?**&#x20;

Yes, you can create multiple locks as long as each meets the minimum criteria (currently set at 100 MAHAX).

**What happens if my lock expires?**

When a lock expires, your voting power drops to 0. The NFT does not get burnt unless you choose to do so.

**Do I lose my voting power over time?**

Yes, MAHAX decays over time unless staked, which freezes the voting power. If you unstake, extend your lock, or lock more MAHA, the voting power is recalculated.

**What happens if an NFT is staked but also listed on an NFT marketplace like OpenSea?**

Staked NFTs cannot be transferred. If listed on OpenSea, the transaction will fail, and a function will kick the NFT from staking to allow the sale to proceed. This prevents unwanted floor price manipulation.


# ZAI Overview

ZAI - The Stable Money of the Ethermind.

{% hint style="info" %}
The ZAI Stablecoin is currently deployed on Base at: [0x69000dFD5025E82f48Eb28325A2B88a241182CEd](https://basescan.org/address/0x69000dfd5025e82f48eb28325a2b88a241182ced)
{% endhint %}

**ZAI (ZAI)** is a decentralized stablecoin within the MAHA ecosystem designed to maintain a 1:1 peg with the US Dollar (USD). Its core innovations are now amplified by **JeremyAI**, which ensures liquidity incentives are dynamically aligned with protocol growth.

ZAI aims to provide stability and liquidity without relying on traditional liquidation mechanisms or stability pools. Users can mint ZAI against traditional stablecoins, such as USDC and DAI, and leverage ZAI in various DeFi protocols and liquidity pools.

## The ZAI Feedback Loop

<figure><img src="/files/bvLl6wiesvC0gpN4oIPo" alt=""><figcaption><p>The ZAI Feedback Loop</p></figcaption></figure>

To support the growth of the ZAI stablecoin without the need for heavy inflationary rewards from MAHA, a feedback loop between liquidity providers and borrowers is created, ensuring that Liquidity providers who provide liquidity to ZAI are paid by borrowers who leverage their yields by borrowing ZAI.

This is why ZAI mainly caters to two kinds of users.

* **Liquidity Providers:** Users who mint ZAI using stablecoins and provide liquidity to the ZAI/USDC pair across various DEXes. Liquidity providers earn MAHA rewards and fees earned from leverage borrowers.
* **Leverage Users / Borrowers:** Users who borrow ZAI to leverage themselves across various asset classes. Borrowers pay an interest fee in ZAI which goes back to liquidity providers for providing liquidity.
* The feedback loop between liquidity providers and borrowers is now ***powered by JeremyAI***, which:

  1\. Dynamically adjusts MAHA rewards for liquidity providers based on real-time demand.

  2\. Allocates 1,000 MAHA every two days to optimize ZAI’s liquidity across DeFi.

  3\. Promotes incentives via SocialFi channels like X (Twitter) to maximize visibility.

***

## Open Source & Decentralized

ZAI is a decentralized stablecoin, and the source code is completely open-source (Under the GPL-3 license). The source code for ZAI can be found in the below Github repo:

{% embed url="<https://github.com/mahaxyz/contracts>" %}

ZAI is completely decentralized, with ownership of the token controlled by the [MAHA governance](/governance-maha/maha-overview).


# Peg Mechanics

This page explains how the ZAI stablecoin maintains it's peg

The pegging mechanism of ZAI ($ZAI) ensures that it maintains a 1:1 ratio with the US Dollar. This is achieved through a combination of collateralization, algorithmic adjustments, and market incentives.

<figure><img src="/files/kpmz8rdPSDoFXGyeCmh7" alt=""><figcaption></figcaption></figure>

There are two core modules that allow for ZAI to achieve stability and scale.

* [The Peg Stability Module](/stablecoin-zai/peg-mechanics/peg-stablility-module-psm): Focused on stability, the ZAI PSM allows users to mint/redeem ZAI for stablecoins at a 1:1 ratio. This ensures stability for ZAI at the 1$ price mark.
* [The Direct Deposit Module](/stablecoin-zai/peg-mechanics/direct-deposit-module-ddm): Focused on growth, the ZAI DD module allows the protocol to mint large amounts of ZAI into lending protocols that allow borrowers to take over-collateralized loans in ZAI, generating interest for users.

***

## Peg Mechanics

At no point in time does ZAI become under-collateralized. It is either backed by stablecoins via the Peg Stability Module (PSM) or it is backed by over-collateralized loans via the Direct Deposit Module (DDM).

* **When ZAI is trading above $1,** arbitrageurs can simply mint more ZAI by depositing USDC (or other stablecoins) onto the [PSM](/stablecoin-zai/peg-mechanics/peg-stablility-module-psm) module and sell the newly minted ZAI into the open market bringing the peg back to $1. At the same time the protocol can also issue more debt (priced at $1) to encourage users to borrow ZAI and sell it in the open market.
* **When ZAI is trading below $1**, arbitrageurs can simply buy back the ZAI from the open market and redeem USDC (or other stablecoins) from the PSM, bringing the peg back to $1. If the PSM does not have enough liquidity to maintain the peg, then the protocol can recall the loans issued by the [Direct Deposit Module](/stablecoin-zai/peg-mechanics/direct-deposit-module-ddm), forcing borrowers to repay their loans in ZAI.

Because in both mechanisms, ZAI is either minted using the PSM or lent using the DDM, and the positions are always over-collateralized, ZAI will be able to maintain its peg at $1.

Please read the [risks section](/security/risks) to understand more deeply about situations when this is not the case.


# Peg Stablility Module (PSM)

This section of the document describes the PSM and how it contributes to the stability of ZAI

The Peg Stability Module (PSM) is a crucial mechanism for minting ZAI, designed to maintain its peg to the USD. Inspired by MakerDAO's [PSM for DAI](https://mips.makerdao.com/mips/details/MIP29), the ZAI PSM allows users to mint and redeem ZAI at a 1:1 ratio with supported stablecoins like USDC and DAI.

The modules gives the advantage to ZAI holders that the protocol is stable at the $1 peg; but it also brings in the disadvantage in that ZAI becomes nothing more than a wrapper for other stablecoins. However this is offsetted with the introduction of the Direct Deposit Module, which allows ZAI to be backed by over-collateralized crypto loans.

## **Market Arbitrage keeps the peg at $1**

To understand how the fixed exchange rate provided by the PSM encourages arbitrage and maintains the peg at $1 we explore the following two scenarios.

If ZAI trades above $1, arbitrageurs can exchange USDC for ZAI through the PSM and sell ZAI on the open market, increasing the supply of ZAI and pushing its price back toward $1.&#x20;

If ZAI trades below $1, arbitrageurs can buy ZAI cheaply on the open market, exchange it for USDC through the PSM, and sell USDC at a profit, reducing the supply of ZAI and pushing its price back up toward $1.

## Fees to prevent misuse of allocation

Optionally to prevent a possible misuse of allocation, supply and redemption fees can be applied to the PSM. These fees can be used to either encourage/discourage the use of the PSM module.

However they also have direct impact on the stability of ZAI. If a 2% redemption fee is applied to redemptions, then arbitrageurs will not participate in maintaining the peg at $1 unless the price goes below $0.98.

Any fees charged by the PSM go directly back to the protocol (See [Revenue Share](/governance-maha/revenue-share)).

## Source Code and Technical Documentation

The source code for the PSM can be found on the GitHub link below.

{% embed url="<https://github.com/mahaxyz/contracts/tree/master/contracts/core/psm>" %}

The technical documentation can be found on the [GitHub wiki pages](https://github.com/mahaxyz/contracts/wiki/PegStabilityModule), and the unit tests for the PSM can be found on the [`PegStabilityModuleTest.sol`](https://github.com/mahaxyz/contracts/blob/master/test/foundry/PegStabilityModuleTest.sol) file.


# Direct Deposit Module (DDM)

This page explains the Direct Deposit Module (DDM) and how it works.

The ZAI Direct Deposit Module (DDM) integrates ZAI with various lending pools and other DeFi protocols. This allows the MAHA ecosystem to generate ZAI dynamically to instantly meet the liquidity demands of borrowers across various lending protocols.

## Meet Demand & Scale Revenue

The main focus of the DDM is to meet the demand for leverage using ZAI and scale revenue for the protocol.

By allowing the protocol to mint unbacked ZAI into lending protocols to allow borrowers to take out over-collateralized loans in ZAI, we allow borrowers to get instant liquidity to ZAI at low-interest fees.

Borrowers can then use the borrowed ZAI to leverage themselves on various assets (and possibly earn an extra yield) by selling their ZAI for more exposure.

This brings various use cases into the picture:

* **Borrowers can leverage their yields:** For example, if a ZAI/USDe lending pool exists and it allows users to borrow ZAI at a 95% LTV with a 5% interest fee and if users natively earn a 15% yield on USDe, then by borrowing at 95% LTV and looping multiple times, users get a leveraged exposure of upto 20x ie (300% yield) at a cost of 100% interest (which gives a net yield of 200%).
* **Borrowers can take loans against their illiquid assets:** For certain asset classes, the protocol can decide to give out loans in ZAI (at much higher interest rates) to give borrowers liquidity against these assets.
* **Traders can short ZAI**: Whilst not beneficial to the protocol, traders can also choose to short ZAI by borrowing it from the open market.

All of these use-cases generate revenue to the protocol which then gets distributed back to liquidity providers (see [revenue share](/governance-maha/revenue-share)).

## Risk Management

Like any lending protocol, there is active risk management that takes place with the Direct Deposit Module. Because ZAI is being used as debt to lend out across multiple other assets, active risk management is needed to ensure that the protocol does not incur any bad debt from these operations.

Lending out ZAI against non-stablecoin assets can generate revenue but also carries the risk of bad debt, which can potentially create a de-peg event.

In such situations, the DAO/Risk Managers need to make the risk-reward analysis to sufficiently decide on the various assets to give loans.

In the event that the risk managers and liquidations don't sufficiently stop the protocol from incurring any bad debt, [the safety pool](/stablecoin-zai/safety-pool) can be used to write off any bad debt.

See [Risks](/security/risks) for more details.

## Peg Stability with Lending Debt

Historically, lending-backed stablecoins ([as seen with GHO](https://blockworks.co/news/gho-aave-peg-stablecoin-arbitrage)) have had a hard time maintaining the peg because the repayment mechanisms for when the stablecoin is trading below the peg haven't been strong enough to encourage arbitrageurs to get the peg back to the $1 mark.

Nevertheless, in the case of ZAI, when the peg goes below the $1 mark, the risk managers of the protocol can trigger a recall of debt by withdrawing any available ZAI liquidity from lending pools, forcing interest rates to rise and hence getting borrowers to unwind their positions and repay their debt.

While this has a weaker effect in retaining the peg when compared to the [arbitrage mechanism](/stablecoin-zai/peg-mechanics/peg-stablility-module-psm#market-arbitrage-keeps-the-peg-at-1usd) that happens in the PSM module, the DDM is mainly responsible for scaling ZAI across other markets. So as long loans are given out with proper risk management, in most cases a de-peg can be prevented.&#x20;

## Source Code and Technical Documentation

The source code for the DDM can be found on the GitHub link below.

{% embed url="<https://github.com/mahaxyz/contracts/tree/develop/contracts/core/direct-deposit>" %}

The technical documentation can be found on the [GitHub wiki page](https://github.com/mahaxyz/contracts/wiki/DDHub), and the unit tests for the DDM can be found on the [`DDHubTest.simple.sol`](https://github.com/mahaxyz/contracts/blob/master/test/foundry/DDHubTest.simple.sol) file.


# Liquidity Incentives

This page explains the various incentives given to liquidity provides

Liquidity is one of the protocol's key aspects. Without liquidity, the ecosystem cannot leverage itself.

Within the entire protocol, there are 3-4 kinds of incentives given to liquidity providers.

1. **MAHA Emissions:** Managed entirely by **JeremyAI**, which allocates emissions to high-impact pools to ensure sustainable growth.&#x20;
2. **Protocol Revenue:** 60-80% of revenue is distributed to liquidity providers, now optimized by AI-driven strategies.. See [revenue share](/governance-maha/revenue-share).
3. **Points & Airdrop:** More information about an airdrop will be [coming soon](broken://pages/Qqb4mIKK8xkUDqD7gnMu)[ 👀.](#user-content-fn-1)[^1]
4. **AI-Powered SocialFi**: Incentives are promoted across social platforms to attract targeted users.

{% hint style="info" %}
Users who have staked MAHA get a boost in all their liquidity incentives of up-to 5x! Read more about [staking boosts](/governance-maha/staking-boosts).
{% endhint %}

Staking in various pools comes with its own risks and rewards. See [risks](/security/risks) for more details.

## How to Earn Liquidity Incentives?

There are many different kinds of liquidity incentive programs within the ecosystem that will allow users to earn points, MAHA emissions, protocol revenue, or even partner incentives. We detail a few of these programs here.

### ZAI/USDC LP Staking

The [ZAI/USDC pair on curve](https://curve.fi/#/ethereum/pools/factory-stable-ng-213/deposit) is the most important liquidity pair for the protocol. All liquidity supplied is used to allow borrowers to leverage gets executed within this pool.

This is why most of the protocol incentives and rewards are redirected to this pool for LP staking.&#x20;

Besides protocol level incentives, liquidity providers also earn trading fees from borrowers when the open/close their positions.

{% hint style="success" %}
There is no withdrawal delay when unstaking from this pool and there is very little impermanent loss as both assets are pegged to 1$.
{% endhint %}

### Safety Pool Staking

The [Safety Pool](/stablecoin-zai/safety-pool) is a single-token staking contract that allows ZAI holders to stake and earn a portion of their fees and revenue by providing enough backstop liquidity to cover off any bad debt from the protocol.

Users who supply ZAI into this pool will earn 10% of all protocol revenue and emissions in MAHA and earn points!

There is a 10-day withdrawal delay when unstaking from this pool.

{% hint style="info" %}
There is a 10 day withdrawal delay when unstaking from this pool however there is no impermanent loss as only one asset is staked in this pool.
{% endhint %}

### MAHA/ETH Staking

The MAHA/ETH pair is crucial for allowing the governance token to have enough liquidity to allow traders to speculate on the MAHA token. Stakers can lock their MAHA/ETH curve tokens for a lock duration anywhere from 2 weeks up to 1 year.

Stakers in this pool also earn voting power, which is used in governance and earns a staking boost.

There is no withdrawal delay when unstaking however every stake has an unlock time that needs to be passed before a deposit can be unstaked.&#x20;

{% hint style="warning" %}
This pair could be subject to impermanent loss as both assets (MAHA & ETH) in the pool are very volatile.
{% endhint %}

{% hint style="success" %}
Staking in this pool will increase your [staking boosts](/governance-maha/staking-boosts)! 🎉
{% endhint %}

### MAHA Staking

Alternative to the MAHA/ETH LP Staking, users can also choose to simply stake MAHA without having to provide liquidity into a DEX. Stakers can lock their MAHA tokens for a lock duration anywhere from 2 weeks up to 4 years.

Stakers in this pool also earn voting power, which is used in governance and earns a staking boost.

There is no withdrawal delay when unstaking however every stake has an unlock time that needs to be passed before a deposit can be unstaked.&#x20;

{% hint style="success" %}
Staking in this pool will increase your [staking boosts](/governance-maha/staking-boosts)! 🎉 and there is no impermanent loss in interacting with this pool.
{% endhint %}

[^1]:


# ZAI Staking (sZAI)

The staking pool is a pool for ZAI that accumulates all the yield from the protocol and is used to pay off any bad debt.

One of the major risks of any lending market is the accumulation of bad debt in the protocol. In this document we describe the Safety Pool, a ERC4626 vault that is used to cover any bad debt that might accumulate in the protocol.

{% hint style="warning" %}
Slashing in the Safety Pool is only used as a means of last resort and works like an insurance fund where depositors stake their ZAI in return for protocol revenue and MAHA emissions; Staked ZAI can be slashed by the governance to write off any bad debt that the protocol has incurred.
{% endhint %}

{% hint style="info" %}
Users who participate in the Safety Pool and have staked MAHA earn a boost on all their rewards of upto 5x! Read more about [staking boosts](/governance-maha/staking-boosts).
{% endhint %}

## Where does the yield come from?

The yield for the Safety Pool primarily originates from the collateral backing ZAI, specifically through SUSD.

## How does the yield get distributed?

The yield for the Safety Pool comes from Ethena's side, where it is distributed every 8 hours. We then collect this yield every 24 hours and distribute it back to ZAI stakers.

## What is Bad Debt?

Bad debt accrual in a protocol means that one or multiple positions have less collateral than liabilities, which leads to a situation on which the user has no incentive to repay and consequently, if all depositors of the borrowed asset would try to withdraw (or cause a bank run), there would be a deficit in the protocol.

Protecting bad debt has been attempted by many different DeFi lending protocols in the past in various kinds of implementation.

* [Stability Pool](https://docs.liquity.org/faq/stability-pool-and-liquidations) by Liquity &#x20;
* [Safety Module](https://docs.aave.com/aavenomics/safety-module) by Aave&#x20;
* [Insurance Fund](https://ethena-labs.gitbook.io/ethena-labs/solution-design/reserve-fund) by Ethena

While each implementation has its pros and cons, the ZAI Safety Pool takes some of the best ideas of the various models mentioned above and builds a single-staking vault that is built more like a DeFi insurance vault.

## Why a Staking Pool?

Like any lending market, one of the biggest risks is the accumulation of bad debt. While in most cases the bad debt can be prevented with effective risk management, it's not always the case; Especially in situations of a flash crash or a hack, liquidations might not happen quick enough to safely clear off any unhealthy positions in the protocol.

See the following instances in DeFi history where major lending protocols have incurred bad debt.

* [Feature or Flaw? Aave Left With $1.7M in Bad Debt](https://blockworks.co/news/aave-curve-bad-debt) (Aave)
* [Bad Debt Piles up at DeFi Lending Protocols](https://thedefiant.io/news/defi/bad-debt-defi-protocols) (Venus Protocol & Iron Bank)
* [TrueFi's $4M Bad Debt in Limbo Shows Risk of Crypto Lending Without Collateral](https://www.coindesk.com/markets/2022/10/13/truefis-4m-bad-debt-in-limbo-shows-risk-of-crypto-lending-without-collateral/) (TrueFi)&#x20;

This is why, assuming that no matter how safe risk management strategies tend to be, nor how quickly liquidations will clear off any unhealthy positions, a secondary fallback mechanism is needed to pay off any bad debt.

Tackling this efficiently will further allow the protocol to scale and accept assets with higher risk profiles and possibly generate more fees.

## How does ZAI Staking work?

Similar to the concept of insurance vaults, users can stake their ZAI into the safety pool in return for a share in the portion of revenue and a share of MAHA emissions (in return for the risk of being slashed).

The ZAI deposited into the pool can be claimed by governance at any time (using on-chain data) to write off any bad debt that has been accumulated in the protocol.&#x20;

## Design Decisions with the Safety Pool

As documented above, we have made a few design decisions when building the Safety Pool to make sure we take the best of the various models mentioned above.

1. **A 10-day withdrawal period**: 10 days lets the governance make a decision on the debt repayments before liquidity is withdrawn.
2. **Rewards instead of an insurance/reserve fund**: Providing rewards is a much more scalable way of growing the safety pool than maintaining an insurance/reserve fund.&#x20;
3. **Multiple rewards to compensate for the slashing risk:** Since users who deposit into the safety pool go through a risk of slashing, there needs to be enough rewards to incentivize such a high-risk activit&#x79;**.** Rewards in the form of revenue help the safety pool scale along with the protocol.
4. **Designed as an ERC4626 vault**: The ERC4626 standard allows for simplicity in the safety pool design and allows for users to easily move their position across other wallets or allow other protocols to directly integrate with the safety pool.

## Example Scenarios

If users have supplied 1,000,000 ZAI in the safety pool and the protocol is supplying 5,000,000 ZAI into the lending pool, we explore the following scenarios.

1. The protocol incurs a bad debt position of over 10,000 ZAI.
   1. The protocol makes a governance proposal or executes a smart contract function to claim the 10,000 ZAI from the safety pool and square off all the bad debt from the protocol
   2. The balance in the safety pool reduces by 1% and every depositor that supplied to the safety pool will have their deposit slashed by 1%. This means that every depositor will now get 99% of their ZAI back (instead of 100%).
   3. Depositors will continue to earn MAHA and protocol fees for their deposit.
2. No bad debt gets accumulated by the protocol.
   1. In this situation governance nor any smart contract execute any action to claim any ZAI from the safety pool.
   2. No slashing happens and depositors get 100% of their deposit back.
   3. Depositors will continue to earn MAHA and protocol fees for their deposit.


# Native Re-staking

This page explains how ZAI can be minted across various other chains through native re-staking

In collaboration with Connext Network, ZAI Stablecoin is introducing cross-chain Native Restaking to layer-2 networks.

USDC holders can now restake on leading layer 2 chains partnered with ZAI, enhancing liquidity and accessibility while simplifying the complexities associated with traditional re-staking methods.

{% hint style="success" %}
Native re-staking allows ZAI to be minted across mulitple other chains natively with USDC without the user ever having to interact with the Ethereum mainnet.
{% endhint %}

## What is native re-staking?

Native re-staking is a process where staked assets on one blockchain can be securely and efficiently re-staked on another blockchain, enhancing the liquidity and utility of these assets. This approach leverages cross-chain interoperability to allow users to maximize their staking rewards across multiple blockchain ecosystems.

The concept of native re-staking was [first introduced by the Renzo Protocol](https://docs.renzoprotocol.com/docs/integrations/l2-native-restaking). Renzo's innovative approach has set the foundation for this advanced staking method, showcasing how cross-chain interoperability can be leveraged to enhance the utility and profitability of staked assets.

Native re-staking significantly eases the user experience for minting ZAI by abstracting the complexities involved in depositing USDC on layer 2 networks and bridging to the mainnet. The advantages of native restaking are as follows:

1. **User-Friendly Process**: By abstracting the technical complexities, users can easily mint ZAI without needing in-depth knowledge of cross-chain mechanics.
2. **Enhanced Liquidity**: Users can gain immediate access to $ZAI tokens on L2 networks, providing more liquidity options and faster transactions.
3. **Seamless Interoperability**: The integration with Connext and native bridges ensures smooth and secure asset transfers between L2 and mainnet.

## **How Native Re-Staking Simplifies ZAI Minting**

* **User Interaction**: Users initiate the process by depositing USDC into the xZaiDeposit contract on a layer 2 (L2) network.
* **Minting $USDZ**: The [L2DepositCollateral](https://github.com/mahaxyz/contracts/blob/master/contracts/periphery/restaking/connext/L2DepositCollateral.sol) contract mints $ZAI tokens, which are pegged to $ZAI on mainnet and represent the user's deposit on the L2 network. The minted $USDZ tokens are XERC20 tokens and are sent back to the user, providing immediate liquidity on the L2 network.
* **Bridge Trigger**: Periodically, the L2DepositCollateral contract triggers a bridge transaction through Connext or through the native bridge. This action sends all deposited USDC to the [L1BridgeCollateral](https://github.com/mahaxyz/contracts/blob/master/contracts/periphery/restaking/connext/L1BridgeCollateral.sol) contract on the Ethereum mainnet.
* **Bridge Deposit & Minting**: The L1BridgeCollateral contract's bridgeDeposit() function processes the USDC received on the mainnet. The [Peg Stability Module](/stablecoin-zai/peg-mechanics/peg-stablility-module-psm) then handles the USDC, minting ZAI tokens that are sent to the Lockbox contract to be wrapped into $ZAI.


# Use Cases

This page explains the various use-cases that users can use ZAI with.

ZAI is a lending-focused stablecoin designed for **AI-optimized yield leverage.** While pegged to $1, its primary utility lies in enabling users to amplify exposure to crypto-native assets via **dynamic liquidity provisioning** managed by JeremyAI. Governance votes initiate these strategies, but execution is now enhanced by AI-driven risk/reward analysis and incentive allocation. &#x20;

### **Leveraging on Yield-Bearing Assets**

Users leverage yield-bearing stablecoins (e.g., USDe, sDAI, aUSDC) to borrow ZAI, amplifying returns through recursive loops. &#x20;

**AI Enhancement**: &#x20;

JeremyAI monitors real-time yields and adjusts MAHA incentives to ensure ZAI borrowing rates remain competitive. &#x20;

**Example**: If USDe’s yield spikes, JeremyAI allocates extra MAHA rewards to ZAI/USDe pools, attracting liquidity to meet demand. &#x20;

**Ideal Assets:** USDe, sDAI, aUSDC.

### **Leveraging on Pendle PT tokens**

Borrow ZAI against PT tokens (e.g., PT-USDe, PT-sDAI) to supercharge yield-trading strategies. &#x20;

AI Enhancement: &#x20;

JeremyAI identifies underutilized PT markets and deploys ZAI liquidity via the Direct Deposit Module, prioritizing pools with the highest implied yields. &#x20;

Governance proposals are pre-analyzed by JeremyAI, which simulates ROI and risks for voter transparency. &#x20;

**Ideal Assets**: PT-USDe, PT-aUSDC, PT-sDAI.

### Liquidity Against Locked veTokens

A lot of veTokens (such as veCrv and veBal) are not highly liquid but are still financial assets as they are backed by governance tokens, which, upon the expiry of a lock, can become unlocked and traded in the open market.

**Use Case**: Unlock liquidity against illiquid veTokens (e.g., sdCRV, cvxCRV) at higher interest rates. &#x20;

**AI Enhancement:** &#x20;

JeremyAI assesses veToken volatility and protocol revenue potential, adjusting MAHA emissions to offset risk. &#x20;

**Example:** During Curve gauge votes, JeremyAI boosts incentives for sdCRV/ZAI pools to attract governance-focused borrowers. &#x20;

**Ideal Assets:** sdCRV, cvxCRV, sdBAL.

### LP Tokens as Collateral &#x20;

While super risky, LP tokens are complex DeFi tokens and their usage as collateral allows users to leverage up on certain positions.&#x20;

Furthermore, with the introduction of Uniswap V3 vaults such as Ichi and Gamma, this can be further extended to leverage highly capital-efficient Uniswap V3 positions.

**Use Case**: Use concentrated LP tokens (e.g., Ichi/Gamma vaults) to borrow ZAI for leveraged farming. &#x20;

**AI Enhancement:**&#x20;

JeremyAI monitors impermanent loss risks in Uniswap V3 positions, dynamically adjusting LTVs and interest rates to protect protocol solvency. &#x20;

Automated alerts notify governance if a vault’s TVL drops below safe thresholds. &#x20;

**Ideal Assets:** Ichi Vault Tokens, Gamma Vault Tokens.&#x20;

### Memecoins & Short-Term Speculation

A lot of memecoin users are looking for avenues to long/short memecoins with leverage. By providing liquidity to a lending market with these memecoins, traders can now find liquidity to long/short memecoins with leverage.

The protocol can also charge a lot higher interest fees due to the high-risk profiles of these tokens.

**Use Case:** Traders borrow ZAI to long/short volatile memecoins (e.g., PEPE, Shiba Inu) with leverage. &#x20;

AI Enhancement: &#x20;

JeremyAI detects memecoin liquidity surges and temporarily raises borrowing fees to mitigate risk, while allocating MAHA rewards to stabilize ZAI’s peg. &#x20;

SocialFi campaigns promote ZAI’s availability for trending memecoins, attracting opportunistic traders. &#x20;

**Ideal Assets**: PEPE, Shiba Inu.&#x20;

### Governance Token Loans

Governance tokens are known to be highly volatile and illiquid at times. By providing liquidity to a lending market with these governance tokens, we allow long-term contributors to find liquidity against their illiquid governance tokens.

The protocol can also charge a lot higher interest fees due to the high-risk profiles of these tokens.

&#x20;**Use Case:** Long-term holders borrow ZAI against illiquid governance tokens (e.g., UNI, CRV). &#x20;

AI Enhancement: &#x20;

JeremyAI calculates token holder lockup behavior to optimize LTVs and interest rates (e.g., lower rates for MAHA stakers with 4-year locks). &#x20;

Liquidity for “blue-chip” governance tokens (UNI, CRV) is prioritized in JeremyAI’s weekly incentive cycles. &#x20;

**Ideal Assets:** UNI, CRV, MAHA.&#x20;

***

### &#x20;Role of JeremyAI in Scaling Use Cases &#x20;

1\. **Risk-Adjusted Incentives:** Allocates MAHA emissions to pools with the highest risk-adjusted returns, replacing static farming. &#x20;

2\. **Automated Liquidity Deployment:** Uses the Direct Deposit Module to mint ZAI into lending protocols when demand spikes (e.g., during Ethena’s sUSDe yield surges). &#x20;

3\. **Governance Proposals:** Publishes on-chain reports (e.g., [Jan 30th Report](https://jpowell.ai/report?id=679ac11ebdbcc6bdc030ea92)) to guide voting on new collateral types. &#x20;

4\. **Bad Debt Prevention:** Monitors LTVs and liquidations in real-time, temporarily freezing risky pools flagged in [Safety Pool alerts](https://jpowell.ai/alerts).


# Deployed Addresses

This page contains the list of all deployed addresses for the protocol.

## Core Protocol Addresses

This table contains a list of the core addresses deployed from the <https://github.com/mahaxyz/contracts> repository

| Contract Name                | Address                                                                                                               | Comments                                                        |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| MAHA Token (MAHA)            | [0x554bba833518793056CF105E66aBEA330672c0dE](https://basescan.org/address/0x554bba833518793056CF105E66aBEA330672c0dE) | The governance token                                            |
| ZAI Token (ZAI)              | [0x69000dFD5025E82f48Eb28325A2B88a241182CEd](https://basescan.org/address/0x69000dfd5025e82f48eb28325a2b88a241182ced) | The USD stablecoin                                              |
| ZAI Staking (sZAI)           | [0x69000195D5e3201Cf73C9Ae4a1559244DF38D47C](https://etherscan.io/address/0x69000195D5e3201Cf73C9Ae4a1559244DF38D47C) | Safety Pool used to stake ZAI to protect against bad debt       |
| Peg Stability Module (sUSDe) | [0x7DCdE153e4cACe9Ca852590d9654c7694388Db54](https://etherscan.io/address/0x7DCdE153e4cACe9Ca852590d9654c7694388Db54) | Used to mint ZAI with sUSDe collateral                          |
| Timelock                     | [0x690002da1f2d828d72aa89367623df7a432e85a9](https://etherscan.io/address/0x690002da1f2d828d72aa89367623df7a432e85a9) | All protocol ownership rests in this timelock                   |
| ProxyAdmin                   | [0x6900064e7a3920c114e25b5fe4780f26520e3231](https://etherscan.io/address/0x6900064e7a3920c114e25b5fe4780f26520e3231) | Used as the admin for all deployed proxies. Owned by governance |

## Direct Deposit Modules <a href="#layer-2-addresses" id="layer-2-addresses"></a>

These addresses manage the [direct deposit module](#layer-2-addresses), which funds various vaults with freshly minted ZAI.

| Contract Name  | Address                                                                                                               | Comments                                                                                  |
| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| DDHub          | [0xD14688cb29dd1925d2C26F3B0F08Fd2c85db54bF](https://etherscan.io/address/0xD14688cb29dd1925d2C26F3B0F08Fd2c85db54bF) | Direct Deposit module that mints ZAI to be used for lending                               |
| DDMetaMorpho   | [0xe8aBC60984489C842EF9B2aDF3aF066DD260744B](https://etherscan.io/address/0xe8abc60984489c842ef9b2adf3af066dd260744b) | Direct Deposit MetaMorpho Pool that uses te minted ZAI to supply into a MetaMorpho vault. |
| DDOperatorPlan | [0xf9759013B0114915dC1BC1184f72830a999f4111](https://etherscan.io/address/0xf9759013B0114915dC1BC1184f72830a999f4111) | A simple operator plan that sets the target on the MetaMorpho vaults                      |

## Staking Pools <a href="#layer-2-addresses" id="layer-2-addresses"></a>

These are the addresses of the various staking pools.

| Contract Name               | Address                                                                                                               | Comments                                                                                                                        |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| ZAI/USDC Curve Staking Pool | [0xdFB06C4c562Bcc810C112FBAC99c59C2856b86D1](https://etherscan.io/address/0xdFB06C4c562Bcc810C112FBAC99c59C2856b86D1) | The staking pool for the [ZAI/USDC Liquidity Pool](https://curve.fi/#/ethereum/pools/factory-stable-ng-229/deposit) on Curve.fi |
| ZAI/MAHA Curve Staking Pool | [0xE2EbBf803d0199A5A26108bA36FBAc366b201Be1](https://etherscan.io/address/0xE2EbBf803d0199A5A26108bA36FBAc366b201Be1) | The staking pool for the [ZAI/MAHA Liquidity Pool](https://curve.fi/#/ethereum/pools/factory-twocrypto-54/deposit) on Curve.fi  |
| ZAI/sZAI Curve Staking Pool | [0xfDAeB792FF19e7bd4f7ED5d6ce2ef7925d002A19](https://etherscan.io/address/0xfDAeB792FF19e7bd4f7ED5d6ce2ef7925d002A19) | The staking pool for the [ZAI/sZAI Liquidity Pool](https://curve.fi/#/ethereum/pools/factory-stable-ng-230/deposit) on Curve.fi |

## Governance/Security Addresses <a href="#layer-2-addresses" id="layer-2-addresses"></a>

These are the addresses of the various govenrance-related or security-related addresses.

<table><thead><tr><th width="134">Network</th><th width="156">Contract</th><th>Address</th></tr></thead><tbody><tr><td>Ethereum</td><td>5-day Timelock</td><td>0x690002da1f2d828d72aa89367623df7a432e85a9</td></tr><tr><td>Ethereum</td><td>Proxy Admin</td><td>0x6900064e7a3920c114e25b5fe4780f26520e3231</td></tr><tr><td>Arbitrum</td><td>5-day Timelock</td><td>0x690005544ba364a53dcc9e8d81c9ce1e90018ab7</td></tr><tr><td>Arbitrum</td><td>Proxy Admin</td><td>0x69000c978701fc4427d4baf749f10a5cec582863</td></tr></tbody></table>

## Cross-Chain Addresses <a href="#layer-2-addresses" id="layer-2-addresses"></a>

The protocol leverages the [LayerZero Bridge](https://layerzero.network/) to enable features such as native restaking, cross-chain bridging, and cross-chain governance.

{% tabs %}
{% tab title="ZAI" %}

<table><thead><tr><th width="200">Network</th><th>Address</th><th data-hidden>Contract</th></tr></thead><tbody><tr><td>Arbitrum</td><td><a href="https://arbiscan.io/address/0x69000dFD5025E82f48Eb28325A2B88a241182CEd">0x69000dFD5025E82f48Eb28325A2B88a241182CEd</a></td><td></td></tr><tr><td>Base</td><td><a href="https://basescan.org/address/0x69000dFD5025E82f48Eb28325A2B88a241182CEd">0x69000dFD5025E82f48Eb28325A2B88a241182CEd</a></td><td></td></tr><tr><td>BSC</td><td><a href="https://bscscan.com/address/0x69000dFD5025E82f48Eb28325A2B88a241182CEd">0x69000dFD5025E82f48Eb28325A2B88a241182CEd</a></td><td></td></tr><tr><td>Linea</td><td><a href="https://lineascan.build/address/0x69000dFD5025E82f48Eb28325A2B88a241182CEd">0x69000dFD5025E82f48Eb28325A2B88a241182CEd</a></td><td></td></tr><tr><td>X Layer</td><td><a href="https://www.oklink.com/xlayer/token/0x69000dFD5025E82f48Eb28325A2B88a241182CEd">0x69000dFD5025E82f48Eb28325A2B88a241182CEd</a></td><td></td></tr><tr><td>Mainnet</td><td><a href="https://etherscan.io/token/0x69000dFD5025E82f48Eb28325A2B88a241182CEd">0x69000dFD5025E82f48Eb28325A2B88a241182CEd</a></td><td></td></tr><tr><td>Mainnet OFT Adapter</td><td><a href="https://etherscan.io/address/0x557177Aa5F5303dED2fa56b413631bAb22a73872">0x557177Aa5F5303dED2fa56b413631bAb22a73872</a></td><td></td></tr></tbody></table>
{% endtab %}

{% tab title="MAHA" %}

<table><thead><tr><th width="153">Network</th><th>Address</th><th data-hidden>Contract</th></tr></thead><tbody><tr><td>Ethereum (Mainnet)</td><td><a href="https://etherscan.io/token/0x745407c86df8db893011912d3ab28e68b62e49b0">0x745407c86df8db893011912d3ab28e68b62e49b0</a></td><td>MAHAToken</td></tr><tr><td>Scroll</td><td><a href="https://scrollscan.com/token/0x6A661312938D22A2A0e27F585073E4406903990a">0x6A661312938D22A2A0e27F585073E4406903990a</a></td><td></td></tr><tr><td>Arbitrum</td><td><a href="https://arbiscan.io/token/0xdd2F41340A1fFcf1c22C7a8Be4E525D7A2De642b">0xdd2F41340A1fFcf1c22C7a8Be4E525D7A2De642b</a></td><td></td></tr><tr><td>Base</td><td><a href="https://basescan.org/token/0x554bba833518793056CF105E66aBEA330672c0dE">0x554bba833518793056CF105E66aBEA330672c0dE</a></td><td></td></tr><tr><td>Blast</td><td><a href="https://blastscan.io/token/0x6A661312938D22A2A0e27F585073E4406903990a">0x6A661312938D22A2A0e27F585073E4406903990a</a></td><td></td></tr><tr><td>BSC</td><td><a href="https://bscscan.com/token/0x6A661312938D22A2A0e27F585073E4406903990a">0x6A661312938D22A2A0e27F585073E4406903990a</a></td><td></td></tr><tr><td>Linea</td><td><a href="https://lineascan.build/token/0x6A661312938D22A2A0e27F585073E4406903990a">0x6A661312938D22A2A0e27F585073E4406903990a</a></td><td></td></tr><tr><td>Optimism</td><td><a href="https://optimistic.etherscan.io/token/0x6A661312938D22A2A0e27F585073E4406903990a">0x6A661312938D22A2A0e27F585073E4406903990a</a></td><td></td></tr><tr><td>X Layer</td><td><a href="https://www.oklink.com/xlayer/token/0xbc3186B68d1a7B771288122386288Aca9c1561a9">0xbc3186B68d1a7B771288122386288Aca9c1561a9</a></td><td></td></tr><tr><td>Mainnet OFT Adapter</td><td><a href="https://etherscan.io/address/0x3a7b708E71Ff72506afA674Ea14881E39CE9fdE2">0x3a7b708E71Ff72506afA674Ea14881E39CE9fdE2</a></td><td></td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# Audits

This section explains about the various audits conducted on the ecosystem.

MAHA smart contracts were audited by Halborn.

However, security audits don't eliminate risks completely. Please don’t supply your life savings, or assets you can’t afford to lose, to  MAHA, especially as a liquidity provider.

For detailed audit reports from Halborn, you can check out this link: [Halborn MAHA Audit Reports](https://www.halborn.com/audits/maha/mahas-core)

### Secondary Security Audits

In addition to the Halborn audits, MAHA has successfully completed security audits with Mundus Security. The findings and recommendations from Mundus Security have been meticulously implemented to fortify our protocol against any threats.

For more details on the Mundus Security audit, you can read their [Review of MahaDAO Governance Security Audit](https://mundus.dev/blog/tpost/okfzlvdcr1-review-of-mahadao-governance-security-au).


# Risks

Being a lending-focused stablecoin, there are mainly two kinds of risks that the entire protocol can be exposed to and what preventive measures have been taken to protect the protocol.

{% hint style="danger" %}
Please note that with any protocol there are always risks associated with using it. Do not put your life savings into the protocol. Always DYOR (do your own research).
{% endhint %}

***

## 1. Technical Risks

Risks relating to the smart-contracts, code, frontends, infrastructure. Technical risks can be mitigated with audits and best security practices.

### **Smart Contract Vulnerabilities**

* **Code Exploits**: Bugs or vulnerabilities in the smart contract code can be exploited by malicious actors, leading to loss of funds or manipulation of the stablecoin system.
* **Upgradability Issues**: If the smart contract is upgradable, it introduces risks related to governance attacks or improper implementation of upgrades.

### **Collateral Management Risks**

* **Over-collateralization**: Ensuring that loans are sufficiently over-collateralized to manage market volatility. Failure to maintain proper collateral ratios can lead to insolvency.
* **Collateral Liquidation**: The process of liquidating collateral in the event of loan defaults must be efficient and robust. Technical failures in liquidation mechanisms can cause system-wide issues.

### **Blockchain Risks**

* **Network Congestion**: High transaction volume on the underlying blockchain can cause delays and increased costs, affecting the stablecoin’s usability.
* **Cross-Chain Interactions**: If the stablecoin interacts with other blockchains, there are additional risks related to the security and reliability of cross-chain bridges and protocols.
* **Forks and Upgrades**: Changes to the underlying blockchain protocol can introduce compatibility issues or vulnerabilities in the stablecoin’s smart contracts.

### **Price Oracle Risks**

* **Oracle Manipulation**: Reliance on price oracles to determine collateral value introduces risks of manipulation, leading to improper collateralization levels.
* **Oracle Downtime**: If the price oracles go down or provide incorrect data, it can lead to incorrect valuations and risk assessments.

### **Peg Stability Mechanisms**

* **Algorithmic Failures**: If the stablecoin uses algorithmic mechanisms to maintain its peg, any flaws or bugs in these algorithms can cause de-pegging.
* **Market Manipulation**: External market forces or manipulative actions can challenge the stability of the peg.

### Mitigation Strategies

To mitigate the various technical risks, we perform the following steps.

1. **Code Audits**: Regular and thorough audits by reputable third parties.
2. **Formal Verification**: Use formal methods to mathematically prove the correctness of smart contracts.
3. **Robust Oracles**: Employ decentralized, reliable oracles with redundancy.&#x20;
4. **Fail-safes and Circuit Breakers**: Implement mechanisms to halt operations in case of detected anomalies.
5. **Comprehensive Testing**: Extensive testing in both simulated and real-world environments.
6. **Insurance Mechanisms**: Establish insurance funds or integrate with insurance protocols to cover potential losses.

***

## 2. Economic Risks

Risks relating to the liquidity, incentives, governance, peg etc.. Economic risks can be mitigated with dedicated risk managers observing the protocol.

### **Market Volatility**

* **Collateral Value Fluctuation**: The value of collateral backing the stablecoin can fluctuate significantly, especially if it’s in volatile assets like cryptocurrencies. This can lead to under-collateralization and potential insolvency.
* **Stablecoin Demand**: Fluctuations in demand for the stablecoin itself can impact its price stability, leading to periods of de-pegging or excessive inflation.

### **Interest Rate Risk**

* **Variable Rates**: Changes in interest rates for lending and borrowing can affect the profitability and attractiveness of the stablecoin. If interest rates are not well-managed, it can lead to liquidity issues or uncompetitive rates.
* **Interest Rate Models**: Flaws in the algorithm or model determining interest rates can lead to economic imbalances, impacting both lenders and borrowers.

### **Liquidity Risk**

* **Liquidity Mismatch**: If there’s a mismatch between the liquidity of the stablecoin and the underlying collateral, it can lead to problems during redemption or liquidation processes.
* **Market Depth**: Insufficient market depth can cause large trades to significantly impact the stablecoin’s price, leading to slippage and volatility.

### **Redemption Risk**

* **Mass Redemption**: In the event of a sudden surge in redemptions, the stablecoin issuer may face challenges in liquidating collateral quickly enough to meet demands, leading to a potential run on the stablecoin.
* **Redemption Fees**: High redemption fees or delays can deter users from redeeming the stablecoin, impacting its perceived value and stability.

### **Collateral Diversification Risk**

* **Concentration Risk**: If the collateral is concentrated in a few assets or asset types, it increases exposure to specific market risks and events that can significantly impact the stablecoin’s stability.
* **Collateral Quality**: The quality and reliability of collateral assets can impact the overall health of the stablecoin. Low-quality or illiquid collateral increases risk.

### **Governance Risk**

* **Decision-Making Delays**: Delayed or poor economic decisions due to inefficient governance mechanisms can negatively impact the stablecoin’s stability and user confidence.
* **Conflict of Interest**: Conflicts within the governance structure can lead to decisions that prioritize certain stakeholders over the stability and health of the stablecoin.

### **Systemic Risk**

* **DeFi Interdependencies**: The stablecoin’s integration with other DeFi protocols can expose it to systemic risks where failures or issues in other protocols can cascade and impact the stablecoin.
* **Global Economic Conditions**: Macroeconomic events and conditions can affect the underlying assets and overall confidence in stablecoins, influencing their stability and adoption.

### Mitigation Strategies

To mitigate the various economic risks, we perform the following steps.

1. **Diversified Collateral**: Using a diverse set of collateral assets to minimize concentration risk.
2. **Dynamic Interest Rates**: Implementing adaptive interest rate mechanisms to respond to market conditions.
3. **Liquidity Management**: Ensuring robust liquidity reserves and mechanisms to handle redemption surges.
4. **Risk Monitoring**: Continuous monitoring and assessment of economic risks to make proactive adjustments.
5. **Strong Governance**: Establishing a transparent and efficient governance framework to manage economic policies effectively.

***

While the above list of risks is exhaustive, it does not cover every possibility that the protocol could be exposed to.&#x20;


