# Introducing Mode

#### Introduction

Mode is at the forefront of a transformative shift in decentralized finance (DeFi), evolving into the realm of **AiFi**—a novel, AI-powered financial ecosystem. At its core, AiFi represents a new wave of DeFi automation, where AI agents interact seamlessly on-chain, executing tasks such as MEV searching, arbitrage, and smart contract auditing. This enables the creation of scalable, efficient, and non-custodial financial services that operate beyond human constraints.

Our vision extends DeFi’s boundaries with **AI-to-AI (AI2AI) interactions**, where intelligent agents perform complex financial tasks autonomously. This shift opens new opportunities, allowing more scalable DeFi systems that enhance transaction throughput, precision, and security. As AI agents evolve, they will not only optimize yields and liquidity but will also autonomously participate in and evolve on-chain economies.

Mode's is working to support this **AIFi economy**, leveraging partnerships, innovations, and integrations to drive the seamless adoption of AI-driven solutions across various DeFi protocols. This positions Mode at the intersection of AI and decentralized finance, as we build towards an economy driven by autonomous AI agents.

To learn more about our approach and the ongoing development in AiFi, explore our [Mode Mirror article](https://mode.mirror.xyz/avS1jdLLM8Ng0yIkcSstssMABmcS4Xgu72aNaFRSI6A).

### Low Fees

Mode has implemented Optimism's Bedrock upgrade which has significantly reduced the fees to be over 95% less than Ethereum. This makes it fast and cheap to use, great for end-user dApps!

### [​Contributing to the Superchain](https://docs.base.org/#open-source)

Mode is powered by the [OP Stack](https://stack.optimism.io/), in collaboration with Optimism. We aim to contribute to growing Optimism's Superchain ecosystem as the main Agentic DeFi hub.


# Quick start

In this section we'll get you deploying a sample contract on Mode in less than 10 minutes.\
\
Let’s see how to deploy a smart contract on Mode using the [Remix IDE](https://remix.ethereum.org) for simplicity.

## Get everything ready

Before getting started:

1. Follow [Add Mode](/user-guides/using-mode-mainnet#testnet) for the step-by-step on how to add Mode testnet to [Metamask](https://metamask.io/download/).
2. This guide assumes you have got Sepolia ETH and bridged to the Mode Testnet Network. Learn how to do that in [Testnet Faucets](/tools/testnet-faucets)

We are ready to get started!

## Remix & Sample Code

[Remix](https://remix.ethereum.org) is a no-setup tool for developing smart contracts. It’s easy to get started allowing a simple deployment process, debugging, interacting with smart contracts, and more. It’s a great tool to test quick changes and interact with deployed smart contracts.

<figure><img src="https://lh4.googleusercontent.com/AdHTInVXjMKYbUPeok0GuLdiZDDTsdxodDjApKYvJ-kEfqQ2dbgEwp1dHhveeYi0m1VkiW6wnBJV_1Tnn4S4JR6KIvuQGZ5eKukwsWAHxF6PsffOneea6mgZzh_OFZThQok1DkpJmtWLkzN1oCmJEYg" alt="This is a screenshot showing Remix I D E. There is a basic smart contract that will be used for the tutorial."><figcaption></figcaption></figure>

For the sake of this tutorial, we will be deploying the ‘1\_Storage.sol’ smart contract that comes as an example in Remix, but you can use any of your code.

We added a few lines of code to register this contract on the SFS. You can copy and then paste this in Remix or use your own contract code.\
\
Here's the sample code:

{% code title="1\_Storage.sol" fullWidth="true" %}

```solidity
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.20;

interface Sfs {
    function register(address _recipient) external returns (uint256 tokenId);
}

contract Storage {

    uint256 number;

    constructor(){
    }
    
    function store(uint256 num) public {
        number = num;
    }

    function retrieve() public view returns (uint256){
        return number;
    }
}
```

{% endcode %}

## Steps to deploy

1. Copy the sample code and paste it in one of the .sol files in Remix
2. To compile your smart contract, go to the `Solidity Compiler tab` and select the contract you want to compile
3. Click on "Compile", you can also enable "Auto Compile" for automatic compilation whenever you change the contract code.

{% hint style="warning" %}
Make sure to open the advanced configurations and setting the EVM version to London. This is to avoid an issue with the <mark style="color:orange;">`PUSH0`</mark> opcode. You can read more on this specification with all Optimism chains [here](https://community.optimism.io/docs/developers/build/differences/#opcode-differences).
{% endhint %}

<div align="center"><figure><img src="/files/2Eyt9rahCUjlgdDg424g" alt="" width="371"><figcaption><p>Solidity Compiler Tab - correct settings</p></figcaption></figure></div>

4. Once the smart contract is compiled successfully, switch to the "`Deploy & Run Transactions`" tab.
5. In the "`Environment`" dropdown menu, select "`Injected Provider - MetaMask`"; this will connect your MetaMask to Remix and will allow you to make transactions from that connected wallet.

{% hint style="info" %}
Make sure to have [Mode Testnet ](https://github.com/mode-network/documentation/blob/main/introduction/broken-reference/README.md)as your selected network in Metamask before deploying.
{% endhint %}

\
![](https://lh4.googleusercontent.com/jmsucoJ4vr4ByW3_0Nt4gwlckzu78pvh7ugVp2nEep9z9LtpY-BuC5WmhX4k_uKk2vA_iIvDZg-VEn8YDzKdoSzmE327wjbLiCIpCGe9xc_GAxBOC5-LYet-qBNPQ54W5waFpeMZak61a-rmk_ITxog) ![](https://lh6.googleusercontent.com/nIYOD8FEnw-1qCtgMI_uKK4qRwEjciveycdc3q6iLtuW7su7sOQMZHhG1dw8Rwk2ulO4JFlQU8YxQlJIB8c6uMZJ5t19PCikrkIKVsRZW68PVRz8RVs1NtQOxrQ6x7CwZXtwjlv6W4Fe9x45_44LWSQ)

6. Select the compiled contract you want to deploy and click ‘Deploy.’

Now, MetaMask should pop up and ask you to confirm the transaction with super low fees.

<figure><img src="https://lh4.googleusercontent.com/u2Y8C7HIZLdoXt_3UW_bEGSj8fI0oRCoWsvLDfJaHjzviK7ucJKzrCgh8Qiw4OD7Zj8EK3-KGCK7H2fXn5Am5iUbDKHoD44ZDZkHUqC2R8UQmbkvStnjWNMMM9EwDcp_Sgl9Ml-ONlK8wCE0T21wEqo" alt="This image shows a screenshot of Metamask wallet with the transaction to deploy the smart contract. It shows very low fees of around 0.35 dollars or 0.00018852 ETH." width="375"><figcaption></figcaption></figure>

{% hint style="success" %}
**CONGRATULATIONS! You just deployed your first smart contract to Mode.**
{% endhint %}

If you want to learn how to interact with your recently deployed contact, check [/pages/fHqBqkBJNtDV8hsilJVF#id-2.-how-to-explore-and-interact-with-your-deployed-smart-contract](https://docs.mode.network/introduction/pages/fHqBqkBJNtDV8hsilJVF#id-2.-how-to-explore-and-interact-with-your-deployed-smart-contract "mention").

To learn more about Mode and how to turn your code into a business, join our [Discord](https://discord.gg/modenetworkofficial) and say hello 👋

\\


# AI Agent Dev Roadmap

This is a checklist for you to make sure to cover the most important things to do on Mode!

{% hint style="success" %}
Questions? Feedback? Cool ideas to build?\
\
Follow [this guide](https://mode.hashnode.dev/get-developer-role) on how to get the Developer role on our discord and come say hi!
{% endhint %}

### Mode Roadmap

<details>

<summary>Mode Starter Kit</summary>

* [ ] Add Mode Mainnet and Testnet to your wallet - [Add Mode](/user-guides/using-mode-mainnet)
  * [ ] Mainnet Added
  * [ ] Testnet Added
* [ ] Deploy a smart contract on Mode testnet
  * [ ] [Quick start](/introduction/quick-start)
  * [ ] [Deploying a Smart Contract](/tutorials/deploying-a-smart-contract)
  * [ ] [Register a Smart Contract](/tutorials/sfs-sequencer-fee-sharing/register-a-smart-contract)
  * [ ] ***EXTRA:***[Verifying your smart contract](/tutorials/verifying-your-smart-contract)

</details>

* [ ] Watch one of our workshops with our partners:

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Tenderly 101</strong></td><td></td><td></td><td><a href="https://www.youtube.com/watch?v=zbUKLcW5qdY&#x26;t=138s">https://www.youtube.com/watch?v=zbUKLcW5qdY&#x26;t=138s</a></td><td><a href="/files/wZRC6gQooOUt98ch9sdL">/files/wZRC6gQooOUt98ch9sdL</a></td></tr><tr><td><strong>Introduction to OEV with API3</strong></td><td></td><td></td><td><a href="https://www.youtube.com/live/m-xJQO4mS6s?si=yFV3SLj9pap_H7Zy">https://www.youtube.com/live/m-xJQO4mS6s?si=yFV3SLj9pap_H7Zy</a></td><td><a href="/files/lAzLdNoBQuePuvQgM9u3">/files/lAzLdNoBQuePuvQgM9u3</a></td></tr><tr><td><strong>Chainlink CCIP</strong></td><td></td><td></td><td><a href="https://www.youtube.com/watch?v=8u2A-57I1P8&#x26;t=2s">https://www.youtube.com/watch?v=8u2A-57I1P8&#x26;t=2s</a></td><td><a href="/files/XalgYO1eNAbyVaEyfPBM">/files/XalgYO1eNAbyVaEyfPBM</a></td></tr></tbody></table>

* [ ] Check [GOAT SDK](https://github.com/goat-sdk/goat) - A framework to give all the onchain tools you need for your agent
* [ ] Check [Eliza](https://github.com/ai16z/eliza) - A multi-agent simulation framework designed to create, deploy, and manage autonomous AI agents.

### Our Socials

* [ ] Join our [Discord](https://discord.gg/modenetworkofficial) and get the [Developer role](#user-content-fn-1)[^1]
* [ ] Follow Mode on [X](https://twitter.com/modenetwork)
* [ ] Visit and star the [Mode Developer Repo](https://github.com/mode-network/mode-developers)
* [ ] Follow Mode on [dev.to](https://dev.to/modenetwork/how-to-get-the-developer-role-on-the-mode-discord-server-30pk)
* [ ] Write an article for the community and share on [dev.to](https://dev.to/modenetwork/how-to-get-the-developer-role-on-the-mode-discord-server-30pk)

[^1]: You can get this role by linking your Github account to our Discord.\
    \
    Read more:

    <https://dev.to/modenetwork/how-to-get-the-developer-role-on-the-mode-discord-server-30pk>


# AI Trading Agent

This guide shows how to quickly set up and launch a Mode Trade AI trading agent.

## 1. Introduction

### What Are Mode Trade AI Agents?

Mode Trade AI Agents are automated trading assistants that help you trade more consistently. They handle execution, risk management, and trade monitoring so you don't have to make decisions in the heat of the moment.

Instead of constantly watching the markets or second-guessing your plan, an agent executes according to the rules you set. It helps you avoid emotional trading, manage entries/exits, and stay consistent over time.

### What They Are *Not*

* Agents do **not** guarantee profits.
* Agents are **not** a replacement for learning basic trading principles.
* Agents are **not** immune to market risk — losses are possible and should be expected.

### Why Use Them

* Reduce emotional decisions when trading.
* Maintain consistent execution of your strategy.
* Save time — agents run even when you're offline.
* Learn in a controlled environment with built-in risk limits.

***

## 2. Getting Started

### Step 1 — Create a Sub-Account

Each agent must run in its own sub-account.

* Only **one agent per sub-account**.
* The sub-account must be funded before you launch an agent.

**Example:**\
If you want to test an agent with $50, create a sub-account named "Test Agent," transfer $50, then launch the agent there.

<div align="center"><img src="/files/uu2joMZs3JDnIfAqv6vC" alt="Enable trading dialog" width="768"></div>

***

## 3. What Are AI Trading Agents?

AI Trading Agents on Mode let you automate crypto trading using advanced LLMs (Large Language Models).

You choose:

* The AI model
* Whether to Trust or Counter your agent
* Your sub-account
* Your indicator weights
* Your maximum leverage
* The asset you want to trade

Once activated, the agent trades for you 24/7 using live market data and your chosen strategy configuration.

***

## 4. How AI Agents Work

* Reads live market data and x402 indicator values
* Evaluates market structure using Donchian Channels
* Assesses momentum using MACD
* Forms a directional trade decision (long or short)
* Applies your selected execution mode (trust or counter)
* Selects position size within your leverage limits
* Monitors open positions using predefined risk logic

You can pause or delete the agent at any time.

***

## 5. Creating an Agent (Step-by-Step)

Your UI provides a 6-step creation flow. Here is the full guide:

***

### **Step 1 — Choose Your AI Model**

Select which LLM will power your agent:

* **GPT-5.1 Instant**
* **Claude Opus 4.5**
* **Grok 4.1 Fast Reasoning**

Each model has its own reasoning style but follows the same trading rules.

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

### **Step 2 — Choose a Sub-Account**

Agents trade from a dedicated sub-account so your funds remain isolated.

You can:

* Use an existing sub-account
* Create a new one

Your current balance is shown so you know how much the agent can trade with.

<div align="center"><img src="/files/T8MELsSEmHpusht5BxGx" alt="Enable trading dialog" width="768"></div>

***

### **Step 3 — Set Max Leverage**

Choose the maximum leverage the agent may use.\
**Range:** 0.5× → 5×

The agent selects leverage dynamically based on signal strength but will **never exceed your limit**.

The UI shows your approximate position size.

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

***

### **Step 4 — Choose Your Asset**

Pick one asset for the agent to trade:

* **BTC**
* **XAU** (Gold)
* **XAG** (Silver)

One agent can trade **multiple** assets.

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

***

### **Step 5 — Review & Activate**

You'll see a summary of:

* Sub-account
* AI model
* Max leverage
* Asset
* Indicator weights
* Position size

Press **Create Agent**, then sign the message to activate.\
Your agent is now live.

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

***

## 6. Viewing Your Agent's Performance

Open the **Portfolio** tab to monitor:

* Portfolio value
* Total PnL
* Realized PnL
* Unrealized PnL
* Open positions
* Closed positions

All metrics update in real time.

<div align="center"><img src="/files/r9Wsf7DNOPaeqBXjqOFf" alt="Enable trading dialog" width="768"></div>

***

## 7. Reviewing LLM Logs

Every agent decision is logged. You'll see:

* The AI's reasoning
* Individual signal values
* Why it entered or avoided a trade
* Risk considerations
* Leverage decisions

This gives full transparency and helps you understand how your agent behave.

<div align="center"><img src="/files/yMLrW6tRjroYrovPXOPe" alt="Enable trading dialog" width="768"></div>

***

## 8. Best Practices

* Start with **lower leverage** until you're comfortable
* Keep enough USDC in the sub-account for volatility
* Review LLM logs regularly

***

## 9. Pausing or deleting an Agent

You may pause or delete an agent at any time.\
When closed:

* No new positions will be opened
* Trades will not be automatically closed, unless take profit or stop loss are hit

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

***

## 10. Risks & Important Notes

* Crypto markets are volatile
* Leverage amplifies gains **and** losses
* Past performance does **not** guarantee future results
* AI models do **not** predict the future
* You should always monitor open positions

Mode agents are designed to be cautious, but losses are still possible.

***

## 11. FAQ

### **Can I run multiple agents?**

Yes — one per sub-account.

### **Can I edit an agent after activation?**

Yes, you can  pause or delete it.

### **Which indicators are used?**

Donchian Channel, MACD.

### **Does the agent use stop-loss logic?**

Yes. All agents apply logical SL/TP rules where appropriate.

### **How often does the agent trade?**

Agents always have a bias, but will only take trades when indicators agree.

***

## 12. Summary

Mode's AI Trading Agents allow anyone to run a structured, data-driven crypto trading system powered by advanced LLMs — without coding or manual execution.

**You set the rules.**\
**The agent handles the rest.**


# Disclaimer

This guide provides the disclaimer and risk notice for using Mode AI Trading Agents.

## Trading Risk

By using **Mode AI Trading Agents**, you acknowledge that trading digital assets involves a high degree of risk, including the potential loss of your entire investment. The performance of automated strategies may vary and there is **no guarantee of profit**. Past performance is **not indicative of future results**.

## Independent Execution

Mode AI Trading Agents execute trades automatically on your behalf. Execution outcomes may differ from other users due to variations in order timing, slippage, liquidity, and market conditions. As a result, your realised prices, position entries and exits, and overall profit and loss (PnL) may not match those of others running the same strategy.

## Sub-Account Requirements

* Each agent must operate in its own sub-account.
* Only one agent may run per sub-account.
* You must create and fund a sub-account before launching an agent.

## Position and Order Size Limits

* The **maximum position size per agent** is limited to **$5,000 equivalent**.
* The **minimum order size** on Mode Trade is **$10**.\
  *It is your responsibility to ensure that your sub-account balance, when multiplied by the leverage you have selected, is sufficient to meet this minimum requirement.*

## API Keys and Security

When you create an agent, a new API key is generated for your Mode Trade sub-account. This key is stored securely and has restricted permissions:

* It permits trading actions only.
* It does **not** allow withdrawals of funds.

## Agent Management

Agents are designed to manage positions automatically in accordance with their configured strategy. For best results and to avoid conflicts in execution, **we strongly recommend that you do not manually close or alter the size of positions opened by an agent**. Manual intervention may cause unexpected outcomes, including but not limited to premature liquidation or inconsistent PnL reporting.

## User Responsibility

By creating an agent, you accept **full responsibility for the risks associated with automated trading, including potential losses**. You acknowledge that Mode Trade does **not guarantee specific outcomes and will not be liable for financial losses or damages** resulting from the use of automated agents under any circumstances.


# Affiliate Program

This guide shows how to become an affiliate with Mode Trade

Turn your Mode Trade experience into real rewards! As a Mode Trade user, you can easily become an affiliate by creating and sharing your unique referral code. Every time someone signs up and trades using your code, you’ll earn over 40% commission.

## How does it work?

It’s simple: create your code, share it with your network, and watch your rewards grow as you help others discover a new ear in AI trading with Mode Trade!

## How do I become an affiliate?

Getting started as a Mode Trade affiliate is quick and easy. Just follow these steps:

### 1. Visit the affiliate page

Go to <https://trade.mode.network/affiliate> and connect your wallet.

### 2. Register your account

After connecting your wallet, you’ll be prompted to register. Approve the signing request in your wallet.

<div align="center"><img src="/files/UZEbusT3QlRZCONyidjw" alt="Sign in dialog" width="768"></div>

<div align="center"><img src="/files/KKqfh4OaLjJPV78wQogM" alt="Sign in request on metamask" width="400"></div>

### 3. Enable trading

Next, you’ll be asked to enable trading by confirming the request in your wallet.

<div align="center"><img src="/files/ETKXYiE64xaJ1REEvHuc" alt="Enable trading dialog" width="768"></div>

<div align="center"><img src="/files/dmCtN0IFfOdi8YFuj5LB" alt="Enable trading request on metamask" width="400"></div>

### 4. Create your referral code

Click the **Create referral code** button to generate your unique code.

<div align="center"><img src="/files/gqP0OAhdHILmOIm60KmX" alt="Create referral code button" width="768"></div>

### 5. Copy your referral code

Once your code is created, simply copy it.

<div align="center"><img src="/files/vkDNUD4R0xvzgJ6wjQqN" alt="Referral code" width="768"></div>

### 6. Share and earn

Share your referral code with friends and family. When they start using Mode Trade, both you and your referrals will start receiving rewards!

Your affiliate code is also available on PnL cards for social sharing:

<div align="center"><img src="/files/Y1mhCfqJxxhIepDdD2Vj" alt="PnL social sharing card" width="768"></div>


# Mode AI Terminal

The AI Terminal is your assistant with knowledge of the world and access to a growing range of context protocols to help you make onchain transactions on Mode.

{% hint style="success" %}
Ask the terminal any questions you may have and if you can't find the answer to your question, please let us know in telegram or in Discord.
{% endhint %}

To use the AI Terminal, you can ask it for any information using natural language. As we’re continuously building out its capacity, you might run into certain limitations. If you do, please let us know! Still, you can use the recommended prompts in the app or follow some of the examples in the chart below. New functionalities are being added constantly.

The AI Terminal works by interpreting your prompt using natural language processing by leveraging AI models. The application has access to a growing set of context protocols through the GOAT SDK. After analyzing your prompt, it’s using reasoning to plan what context protocols to use.\
\
For example, it might decide to use Synth to get the latest BTC price predictions, write a python script to calculate your probability of making profit on a leveraged long position, and offer to open this position based on CoinGecko’s most recent BTC price information.

When you ask the AI Terminal to perform an onchain action, it will prepare the transaction or contract interaction for you to confirm in your wallet. We advise caution as this technology is experimental; always make sure to double check the transaction before signing. If you’re not sure what you’re about to do, please refrain from signing the transaction.

| Name         | Description                                                                                                                                                                                       | Capabilities                                                                                                                                                                                                                                                                                                                                                                                    | Examples                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Mode Perp    | <p>Mode Perpetuals DEX lets you long and short hundreds of tokens onchain.<br><br><a href="https://trade.mode.network/perp/PERP_ETH_USDC"><https://trade.mode.network/perp/PERP_ETH_USDC></a></p> | <ul><li>Open positions for Long/Short on several assets</li><li>Create Market & Limit Orders</li><li>Modify Orders</li></ul>                                                                                                                                                                                                                                                                    | <ul><li>Deposit 30 USDC</li><li>What are my current holdings</li><li>Open a $100 long position on BTC</li><li>Show me my open orders</li><li>Show me my open positions</li><li>Show me my past positions</li><li>Cancel my open order</li><li>Close my current position</li><li>Withdraw 20 USDC</li></ul>                                                                                                                                                                                                                                                                                                     |
| Synth        | Synth delivers synthetic asset price path data generated through a decentralized network of AI models.                                                                                            | <ul><li>Check BTC price and show probabilities for different time frames<br></li><li>Provide charts of different sorts on BTC price predictions</li></ul>                                                                                                                                                                                                                                       | <ul><li>Plot a histogram of the predicted prices in 24 hours</li><li>according to synth predictions, show me a chart of the average path and 10th and 90th percentile</li><li>What's the probability that BTC increase by 3% in the next 24 hours</li><li>According to the predicted paths, what's the fair price of a European Call Option with strike price +5% from current price and expiry in 24 hours</li><li>using synth data, Can you plot the width of the price bounds in percent on the x-axis, and the probability the price always remains within those bounds on the y-axis</li></ul><p><br></p> |
| Coingecko    | <p>CoinGecko provides a fundamental analysis of the digital currency market.<br></p><p>Get any token information using CoinGecko API.</p>                                                         | <ul><li>Price, volume, historical chart, and other market data of 6M+ tokens traded across 200+ blockchain networks, including Ethereum, Solana, TON, BNB Chain, and Base.</li><li>A list of all the pools that are trading a specific token.</li></ul><p><br></p><ul><li>A list of all the networks and DEXes supported by GeckoTerminal</li><li>+ all the GeckoTerminal API provide</li></ul> | <ul><li>What is the price of $Mode?<br><br></li><li>What is the trading volume of ETH today?</li><li>In what DEXes can I trade $Mode?</li><li>What was the price of ETH on December 20th 2024?</li><li>What is the all time high price of BTC?</li></ul>                                                                                                                                                                                                                                                                                                                                                       |
| Basic EVM    | <p>Basic functionality of any EVM wallet.<br><br>Sending and receiving ETH and tokens.</p>                                                                                                        | <ul><li>Transfer tokens to another address</li><li>Express the amount in the token you want to use, or in $</li><li>Use indicators like “all my”, “50% of”</li></ul>                                                                                                                                                                                                                            | <ul><li>Send $10 in ETH to 0xabc...e</li><li>Send 0.01 ETH to 0xabc...e and 1 USDC to 0xabc...e</li><li>What is my ETH balance</li><li>What chain am I connected to ?</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ERC20        | Perform all actions related to ERC20 tokens.                                                                                                                                                      | <ul><li>Send tokens</li><li>Read token balances</li><li>Approve spending of tokens</li></ul>                                                                                                                                                                                                                                                                                                    | <ul><li>What is my USDC balance</li><li>Send 200 USDC to '0x1234...'</li><li>approve spending 10 MODE to 0x1234...</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Velodrome    | Velodrome is a decentralized exchange where you can execute low-fee swaps, deposit tokens to earn rewards, and actively participate in the onchain economy.                                       | <ul><li>Swap any pair of tokens supported by Velodrome</li><li>(SOON) Manage liquidity positions</li></ul>                                                                                                                                                                                                                                                                                      | <ul><li>Swap 10 USDC for ETH</li><li>Swap 10$ worth of Mode to ETH</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Mode staking | <p>Stake Mode tokens to receive veMODE to participate in governance and earn OP staking rewards.<br><br><a href="https://gov.mode.network/"><https://gov.mode.network/></a></p>                   | <ul><li>Stake and Unstake Mode for the governance</li><li>Check your current staked positions</li></ul>                                                                                                                                                                                                                                                                                         | <ul><li>Stake 100 Mode</li><li>How much staked mode do I have?</li><li>Unstake my 100 Mode position. (This will fail if you are in the warmup period, please check <a href="https://gov.mode.network/">governance</a> to see your positions)</li></ul>                                                                                                                                                                                                                                                                                                                                                         |
| Mode Spray   | <p>Send tokens to multiple addresses in one transaction saving gas and time.</p><p><a href="https://modespray.xyz/"><https://modespray.xyz/></a></p>                                              | Batch send tokens to multiple addresses with one prompt and one transaction.                                                                                                                                                                                                                                                                                                                    | <p>Send 1 Mode to every following wallet:<br>X, Y, X, …,</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Hedgey       | <p>Claim tokens from eligible claims, like Mode staking rewards or other campaigns.<br><br><a href="https://hedgey.finance/"><https://hedgey.finance/></a></p>                                    | <ul><li>Check for unclaimed tokens</li><li>Claim tokens</li></ul>                                                                                                                                                                                                                                                                                                                               | <ul><li>Claim any pending claims I might have on hedgey</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|              |                                                                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

\\


# What are AI Agents?

## Understanding AI Agents

### What are AI Agents?

You can think of AI agents as digital assistants that can understand, plan, and complete tasks independently. Much like a human assistant, they can:

* Research information across multiple sources
* Break down complex tasks into manageable steps
* Use various tools to accomplish goals
* Learn from their experiences and improve over time

For example, an AI agent might help you:

* Plan a vacation by researching flights, accommodations, and activities while considering your preferences and budget
* Manage your email by drafting responses, categorizing messages, and following up on important conversations
* Analyze data by collecting information, generating reports, and identifying meaningful patterns
* Drive your car :D

### Core Components

We can think of AI agents as operating through three fundamental elements:

#### 1. Context & Perception

The agent's ability to understand its environment and inputs. This includes:

* Processing user instructions
* Understanding context
* Gathering relevant information
* Recognizing patterns and relationships

#### 2. Decision Making

The cognitive process where agents:

* Evaluate available information
* Consider multiple approaches
* Choose the most appropriate actions
* Adapt to changing circumstances

#### 3. Action

The execution phase where agents:

* Implement chosen strategies
* Interact with tools and systems
* Monitor progress
* Adjust based on feedback

### Types of AI Agents

The field of AI agents is rapidly evolving, and while there's no universal classification system, we often see agents emerging in these patterns:

#### Task-Specific Agents

These focus on well-defined tasks like scheduling or data analysis. Think of ChatGPT plugins or GitHub Copilot - they're good at their specific jobs but don't try to do everything.

#### Multi-Tool Agents

These agents can use multiple tools and APIs to accomplish more complex tasks. AutoGPT and LangChain agents fall into this category, though the lines between "multi-tool" and "task-specific" can be blurry. Eliza is an example of a multi-tool agent as it can talk in telegram, discord, do blockchain transactions, and more.

#### Agent Networks

Multiple agents working together, each handling different aspects of a larger task. Projects like CrewAI and AutoGen are exploring this space, though we're still learning what architectures work best.

The categorization of AI agents remains an active area of discussion in the developer community. As new frameworks and use cases emerge, our understanding of agent types will likely evolve.

### Real-World Applications

AI agents are transforming various sectors:

#### Business Operations

* Automating customer support
* Streamlining workflow management
* Enhancing decision-making processes

#### Personal Productivity

* Managing calendars and emails
* Organizing information
* Assisting with research and writing

#### DeFi

* Monitoring liquidity pools
* Optimizing yield farming strategies
* Automating portfolio management
* Trading on decentralized exchanges

### The Future of AI Agents

Current research and development focus on:

* Enhanced reasoning capabilities
* Better tool manipulation
* Improved collaboration between agents
* Stronger safety and reliability measures

As these technologies evolve, we can expect AI agents to become more capable, reliable, and integrated into our daily work and personal lives.

### If you want to read more:

#### Industry Resources

* [Microsoft's AI Agent Framework](https://news.microsoft.com/source/features/ai/ai-agents-what-they-are-and-how-theyll-change-the-way-we-work/)
* [IBM's Perspective on AI Agents](https://www.ibm.com/think/topics/ai-agents)
* [AWS Agent Development](https://aws.amazon.com/what-is/ai-agents/)

#### Academic Research

* "Generative Agents: Interactive Simulacra of Human Behavior" (Stanford University)
* "The Landscape of Emerging AI Agent Architectures" (2024)
* "Dynamic Planning with LLMs" (2023)


# Tutorials

In this section you will find all the AI related tutorials to build you AI Agents.\
\
We also have a playlist with all the useful AI Agent tutorial videos: [Youtube Playlist](https://youtube.com/playlist?list=PLUVAO0RoXiGNNj9paH4adOlqHaNA9H12C\&feature=shared)\
\
To learn how to allow agents to perform actions on Mode, please watch this video:

{% embed url="<https://youtu.be/PKMsz8Zg2Do>" %}
GOAT high level explanation to allow ai agents do onchain actions on Mode
{% endembed %}

Also visit [https://ohmygoat.dev](https://ohmygoat.dev/plugins) to check all the related documentation.


# Building your first agent

## Approaches to Building Agents

There are several options to implement an AI agent. LangChain, for example, is a widely-adopted framework, providing Python and JavaScript SDKs equipped with tools for chains, memory systems, and vector stores. The Open Liberated Autonomous Society (OLAS) framework offers specialized components for constructing autonomous economic agents. For developers seeking more granular control, integrating OpenAI's Assistants API or Anthropic's Claude directly into your codebase is possible.

Designing an agent from the ground up requires a focus on several key components: defining actions the agent can perform, establishing connections to platforms such as Telegram, Discord, and other applications, and integrating large language models (LLMs) for advanced processing capabilities, memory, etc. You could start with a foundational server setup, like node.js, to implement these elements, progressively adding features such as persistent memory and tool integration to enhance the agent's functionality.

## Building Your First AI Agent with Eliza and GOAT

### Introduction to Eliza

Eliza is a powerful framework designed to simplify the creation of AI agents. It provides a robust set of tools for building agents that can understand, plan, and execute tasks autonomously. For more information, you can explore the [Eliza GitHub repository](https://github.com/ai16z/eliza) and the [official documentation](https://ai16z.github.io/eliza/docs/intro/).

### Understanding GOAT

GOAT, or the Great Onchain Agent Toolkit, is an open-source framework that equips AI agents with blockchain capabilities, such as managing wallets, trading tokens, and interacting with smart contracts. Within Eliza, GOAT functions as a plugin, significantly enhancing the framework by enabling agents to perform a wide range of on-chain actions seamlessly. This integration allows Eliza agents to autonomously execute blockchain operations. With GOAT, Eliza agents can now manage wallets, trade tokens, and interact with smart contracts, and protocols.


# Quickstart

This is an example on how to run a basic agent that performs a task on Mode with GOAT

## How to Run Mode Plugin from GOAT

### Prerequisites

* [Node.js >=20.12.2](https://nodejs.org/) and <21.
* [Turbo](https://turbo.build/).
* [PNPM](https://pnpm.io/).

### Steps

1. Clone the GOAT repository:

```bash
git clone https://github.com/goat-sdk/goat.git
```

2. Open the repository in your preferred code editor (we'll use VSCode in this example).
3. Install dependencies and build the project:

* Since we are going to test the Mode plugin, which is in the TypeScript folder, we first need to navigate to that directory:

```bash
cd goat/typescript
```

* Then, run the following commands:

```bash
pnpm install
pnpm build
```

4. Set up the Mode plugin:

* Go to the plugin directory:

```bash
cd examples/vercel-ai/mode
```

* Copy the environment configuration file:

```bash
cp .env.template .env
```

* Fill in the .env file with the following values:
  * OPENAI\_API\_KEY: Obtained from [OpenAI](https://platform.openai.com/settings/organization/api-keys).
  * WALLET\_PRIVATE\_KEY: Your wallet's private key. It's important to ensure that the key starts with 0x to avoid execution errors.

5. Rebuild the project:

* Navigate back to the goat/typescript directory and run:

```bash
pnpm install
pnpm build
```

6. Run the Mode plugin:

* Navigate back to the plugin directory:

```bash
cd examples/vercel-ai/mode
```

* Run the following command to start the plugin:

```bash
npx ts-node index.ts
```

* You will see the message:

```bash
Enter your prompt (or "exit" to quit):
```

Ready! You can now interact with the Mode plugin in GOAT.


# AI Tooling


# AI Audits

## [QUILL AI](https://check.quillai.network/)

Quill AI offers an AI Agent for Token Due Diligence.


# AI APIs

This page contains useful APIs you can use to build your AI Agents

## [Brian API](https://www.brianknows.org/)

Brian API allows you to execute transactions, search resources and retrieve onchain data by prompting in natural language.

[Start building](https://docs.brianknows.org/) / [Launch app](https://www.brianknows.org/app)

## [Crossmint](https://www.crossmint.com/)

Crossmint allows you to build end-to-end use cases without requiring prior blockchain experience or cryptocurrencies, while making the blockchain invisible to end users. It offers tools for creating, distributing and selling digital assets, as well as custodial and non-custodial wallets to store them.


# Frameworks

## [Eliza](https://github.com/ai16z/eliza/blob/main/README.md)

Eliza is a powerful framework designed to simplify the creation of AI agents. It provides a robust set of tools for building agents that can understand, plan, and execute tasks autonomously. For more information, you can explore the [Eliza GitHub repository](https://github.com/ai16z/eliza) and the [official documentation](https://ai16z.github.io/eliza/docs/intro/).

## [GOAT](https://github.com/goat-sdk/goat/tree/main/typescript/examples)

GOAT, or the Great Onchain Agent Toolkit, is an open-source framework that equips AI agents with blockchain capabilities, such as managing wallets, trading tokens, and interacting with smart contracts.


# RPC

{% hint style="success" %}
If your project needs better performance you can try running your own node. Check all the information here: [Node Operators](/other-docs/node-operators)
{% endhint %}

## Public RPC (Archival node)

Our public RPC is a full archive node and should be enough for most use cases:\\

RPC Endpoint: <https://mainnet.mode.network/>

RPC & websocket: <https://app.conduit.xyz/published/view/mode-mainnet-0>

Testnet RPC: <https://sepolia.mode.network/>

## Tenderly

Tenderly Node is a fast and reliable production node that enables access to over 12 blockchain networks via RPC. It allows you to send transactions, deploy smart contracts, query blockchain data or other operations without having to run your own node or manage infrastructure.

RPC & websocket info: <https://docs.tenderly.co/node/rpc-reference/mode#radix-:Rcu9m:>

## Blast API - Decentralized Web3 Infra - (Archival node)

Solving Web3 reliability and performance issues by efficiently employing the resources of hundreds of third party node providers combined with a state-of-the-art decentralized blockchain API platform and an improved user experience.\
\
RPC & websocket: <https://blastapi.io/chains/mode>

## 1RPC

Automata now supports Mode mainnet via their 1RPC, this introduces an extra layer of security by protecting some metadata from being shared to interact with RPCs in a more private way. You can learn more about 1RPC [here](https://docs.1rpc.io/overview/about-1rpc).

1RPC Endpoint: <https://1rpc.io/mode>

## dRPC

dRPC is decentralised RPC network that enhances security, reliability, and cost-efficiency for Web3 companies of all sizes. We are building the most reliable and cost-efficient Data providing solution via a decentralized platform. Learn more about dRPC [here](https://drpc.org/chainlist/mode).

RPC Endpoint: <https://mode.drpc.org>

## thirdweb

thirdweb consistently ranks amongst the highest performing RPC endpoints. Begin transacting and reading on the MODE network without running your own node architecture as well as seeing real time RPC status and endpoint [here](https://thirdweb.com/mode?utm_source=modedocs\&utm_medium=docs).

RPC Endpoint: [View Endpoint Here](https://thirdweb.com/mode?utm_source=modedocs\&utm_medium=docs)


# Multisig wallets

Multisig wallets are wallets that allow multiple parties to control and secure assets, reducing the risk of fraud and unauthorized access. To approve transactions you usually need more than one signer and this creates an extra layer of security in case one of the private keys gets compromised.\\

***

## Safe

As part of the Superchain, the team of Protofire has deployed Safe (ex Gnosis) on Mode:\
\
<https://safe.optimism.io/welcome>

***

## BRAHMA

Get seamless DeFi execution with Console on Mode and earn a 2x Mode points boost. Enjoy fast position management, automation, and secure dApp connectivity tailored for Mode users.\
\
<https://www.brahma.fi/mode>


# Bridge

{% hint style="success" %}
If you want third party options for bridging you can check the [ecosystem page](https://www.mode.network/ecosystem) in our main website. Please be careful when interacting with any bridge.
{% endhint %}

### **Mode Mainnet Bridge**

You can use the Mode bridge to deposit and withdraw from Ethereum to Mode. Check out [Bridge to Mode](/user-guides/bridge/bridge-to-mode)

[Access the Mode Mainnet Bridge here](https://app.mode.network/)

***

### **Mode Testnet Bridge**

You can use the Mode bridge to deposit and withdraw ETH from Ethereum Sepolia to the Mode Sepolia Testnet. Checkout [Bridging to Testnet](/user-guides/bridge/bridging-to-mode-testnet)

[**Access the Mode Testnet Bridge here**](https://sepolia-bridge.mode.network/)


# Testnet Faucets

Get Sepolia ETH or Mode testnet ETH

### Mode Testnet ETH

### [Superchain Faucet](https://app.optimism.io/faucet)

The Superchain Faucet provides testnet ETH for all OP Chains, including Mode.

***

### [thirdweb Mode Sepolia Faucet](https://thirdweb.com/mode-testnet?utm_source=modedocs\&utm_medium=docs)

thirdweb Mode Sepolia Faucet provides 0.01 testnet ETH every 24 hours without bridging.

***

### [Automata L2Faucet](https://www.l2faucet.com/mode)

{% hint style="info" %}
Attest to get Mode ETH tokens directly on Mode Sepolia faucet without bridging.
{% endhint %}

You can request some Sepolia ETH on Ethereum Sepolia testnet and then bridge the funds to Mode testnet.

***

## [Aori Faucet](https://app.aori.io/faucet)

Fund your wallet with testnet gas and Aori's testnet tokens $YIN & $YANG on your choice of testnets. Authenticate with your wallet for a drip every 8 hours.

***

### [Alchemy's Sepolia Faucet](https://sepoliafaucet.com/) <a href="#blockscout" id="blockscout"></a>

You can request 0.1 ETH from this faucet every 24 hours if you have 0.001 ETH in your wallet. You will also have to bridge to mode testnet after receiving the tokens in the ETH sepolia network.

{% hint style="info" %}
Email sign-up is required to use this faucet. You do not need Mainnet ETH.
{% endhint %}

***

### [QuickNode Sepolia Faucet](https://faucet.quicknode.com/ethereum/sepolia)

You can request Sepolia ETH quickly by connecting your wallet. You will also have to bridge to mode testnet.

{% hint style="info" %}
You must hold 0.01 ETH on Mainnet to use this faucet and can get 2x the ETH if you share a tweet.
{% endhint %}


# Block Explorers

A list of block explorers

### ModeScan <a href="#blockscout" id="blockscout"></a>

This explorer was built by the superScan team, you can read more about it in [this mirror post](https://mirror.xyz/0x4E4c1d3D2896890cE5a12ecaB70E311B47237142/PPbRCVv213UOflDwbMIDdtexWZ7L5dWTOaFc3YM_wOE).\
\
Mainnet explorer: <https://modescan.io/>

***

### Blockscout[​](https://docs.base.org/tools/block-explorers#blockscout) <a href="#blockscout" id="blockscout"></a>

A [Blockscout](https://sepolia.explorer.mode.network) explorer is available for Mode Sepolia.

Blockscout provides tools to help you debug smart contracts and transactions:

* View, verify, and interact with smart contract source code.
* View detailed transaction information

Mainnet explorer: [Mainnet Blockscout](https://explorer.mode.network/)\
Testnet explorer: [Sepolia Blockscout](https://sepolia.explorer.mode.network)


# Data Indexers

## [Goldsky](https://goldsky.com/)

Goldsky offers two core self-serve products that can be used independently or in conjunction to power your data stack. Subgraphs that have flexible indexing with typescript, with support for webhooks and more. Then also Mirror which lets you get live blockchain data directly into your database or message queues with a single yaml config.\
\
Deploy a subgraph: <https://docs.goldsky.com/subgraphs/deploying-subgraphs>

***

## [The Graph](https://thegraph.com/)

The Graph is an indexing protocol that provides an easy way to query blockchain data through APIs known as subgraphs. Anyone can create or query subgraphs, making the data available to the entire ecosystem. With GraphQL, you can specify the exact fields you want to query.

The Graph’s infrastructure relies on a decentralized network of indexers, enabling your dApp to become truly decentralized.

Follow this [quick-start guide](https://thegraph.com/docs/en/quick-start/) to create, deploy, and query a subgraph within 5 minutes.

***

## [Indexing Co](https://www.indexing.co)

Indexing Co offers just-in-time indexing, data engineering, and custom data infrastructure services. Any EVM or non-EVM chain can be indexed with the ability to integrate off-chain data. Our data pipelines are optimized for decoding, transformations and aggregations to ensure delivery and low-latency. Our indexer and data pipeline infrastructure is made for modular chain setups, multi-chain products, the explosion of L1/L2/L3 chains and AI.

Publish a data flow using our [Console](https://console.indexing.co/) or [get in touch](https://www.indexing.co/get-in-touch) for custom data pipelines.

***

## [Covalent](https://www.covalenthq.com/docs/networks/mode-testnet/)

Covalent is a blockchain data service that offers access to both current and historical on-chain information over a range of more than 100 blockchains, which includes Mode.

Covalent holds an archival version of every blockchain it supports. This encompasses details of every transaction, balance, log event, and digital asset from the start of that blockchain. You can retrieve Mode data through their [API](https://www.covalenthq.com/docs/networks/mode-testnet/).

For further details, please refer to <https://www.covalenthq.com/docs/networks/mode/>

***

## [Unmarshal](https://unmarshal.io/)

Unmarshal is a Decentralized network of blockchain data indexers and transforming tools\
\
Docs: <https://docs.unmarshal.io/reference/introduction>

***

## [SQD](https://sqd.dev/)

SQD unlocks next-gen functionality for dApps, AI agents, analytics and ZK Proofs/TEE through blazing-fast indexing.

SQD is a decentralized hyper-scalable data platform optimized for providing efficient, permissionless access to large volumes of data. It currently serves historical on-chain data, including event logs, transaction receipts, traces, and per-transaction state diffs. SQD offers a powerful toolkit for creating custom data extraction and processing pipelines, achieving an indexing speed of up to 150k blocks per second.

To get started, visit their [documentation](https://docs.sqd.dev/) or see their [EVM examples](https://github.com/subsquid-labs/squid-evm-examples) of what you can build with SQD.


# Oracles

## [API3](https://api3.org/)

The [API3 Market](https://market.api3.org/mode) provides access to 200+ price feeds on [Mode Mainnet](https://market.api3.org/mode) and [Testnet](https://market.api3.org/mode-sepolia-testnet). The price feeds operate as a native push oracle and can be activated instantly via the Market UI.

The price feeds are delivered by an aggregate of [first-party oracles](https://docs.api3.org/explore/airnode/why-first-party-oracles.html) using signed data and support [OEV recapture](https://docs.api3.org/explore/introduction/oracle-extractable-value.html).

Unlike traditional data feeds, reading [API3 price feeds](https://docs.api3.org/guides/dapis/) enables dApps to auction off the right to update the price feeds to searcher bots which facilitates more efficient liquidation processes for users and LPs of DeFi money markets. The OEV recaptured is returned to the dApp.

Check out these guides on how to:

* [Use dAPIs on the Market](https://docs.api3.org/guides/dapis/subscribing-to-dapis/)
* [Read a dAPI](https://docs.api3.org/guides/dapis/read-a-dapi/)

## [Pyth](https://pyth.network/)

Pyth is an oracle for real-time blockchain data such as price feeds and historical market data.

Pyth Oracle address on Mode Mainnet:\
<https://explorer.mode.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729>

Price feed on Testnet:\
<https://sepolia.explorer.mode.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729>\
\
For further details, please refer to [Pyth documentation](https://docs.pyth.network/documentation).

***

## [Redstone](https://redstone.finance/)

RedStone enforces design with independent and robust modules. Signed data packages are broadcasted to DDL and archived on Arweave. Consumers can use data feeds in Pull, Push and X models.

Price feeds on Mode mainnet:\
<https://docs.redstone.finance/docs/smart-contract-devs/price-feeds>

***

## [Supra](https://supraoracles.com/)

[Supra](https://supraoracles.com) is a novel, high-throughput Oracle & IntraLayer: A vertically integrated toolkit of cross-chain solutions (data oracles, asset bridges, automation network, and more) that interlink all blockchains, public (L1s and L2s) or private (enterprises).\
\
Supra Pull Oracle adddess on Mode Mainnet:\
<https://explorer.mode.network/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517?tab=contract>

For more details, check out [Supra developer docs](https://supraoracles.com/docs/overview/).


# Interoperability

## [LayerZero](https://layerzero.network/)

LayerZero is an interoperability protocol that connects blockchains, allowing developers to build seamless omnichain applications, tokens, and experiences.

<https://layerzero.network/>

## [**Chainlink CCIP**](https://chain.link/)

Chainlink CCIP is a blockchain interoperability protocol that enables developers to build secure applications that can transfer tokens, messages (data), or both tokens and messages across chains.

<https://docs.chain.link/ccip/supported-networks/v1_2_0/mainnet#mode-mainnet>

\\


# Randomness

## Gelato

Gelato VRF (Verifiable Random Function) - a tool designed to provide robust randomness with inherent verifiability. This option is only available on Mode Mainnet.

<https://docs.gelato.network/web3-services/vrf>


# General Tooling

## [Tenderly](https://tenderly.co/)

Tenderly offers a wide range of dev tooling ranging from simulation APIs to RPC and more. You can find a list of all their products here: <https://docs.tenderly.co/products> .

***

## [Particle Network](https://particle.network/)

Particle Network provides AA-powered social logins on Mode Network, supercharging user experience through two-click onboarding.

***

## [thirdWeb](https://thirdweb.com?utm_source=modedocs\&utm_medium=docs)

Frontend, backend, and onchain tools to build complete web3 apps — on every EVM chain. SDKs, APIs, CLI and much more.\
\
Check the docs: [https://portal.thirdweb.com/](https://portal.thirdweb.com?utm_source=modedocs\&utm_medium=docs)

{% hint style="info" %}
Thirdweb is now running a startup program with a lot of amazing benefits for builders:\
\
<https://thirdweb.com/community/startup-program>
{% endhint %}

***

## [Supermigrate](https://supermigrate.xyz/en)

Supermigrate enables the automatic deployment of existing ERC20 tokens to Layer 2 networks such as Mode. Earn rewards while bridging and adding liquidity.

## [ZeroDev](https://docs.zerodev.app/)

ZeroDev is the first chain-abstracted smart account. Mode applications can use ZeroDev to embed a wallet that accepts deposits from any chain, and spend the deposits on any chain, all without the user explicitly dealing with bridging.\
\
Check the docs: <https://docs.zerodev.app>

{% hint style="info" %}
When using ZeroDev on Mode, make sure to:

* Append `?provider=CONDUIT` to the bundler your URL you get from the ZeroDev dashboard.
* When calling [createKernelAccount](https://docs.zerodev.app/sdk/core-api/create-account#create-a-kernel-account), specify `useMetaFactory: false`.
  {% endhint %}

***


# Interacting with Smart Contracts using ethers.js

How to interact with smart contracts deployed on Mode from a frontend using ethers.js

In this tutorial, we'll walk through setting up a basic web app, deploying a smart contract on MODE Network's testnet, and interacting with it using ethers.js.

{% hint style="info" %}
If you want a quickstart and just get to the code, go to [this repository](https://github.com/joshuanwankwo/mode_testnet) and follow the readme guide to run it. We will walk you through the code in this tutorial.
{% endhint %}

## Prerequisites

* Add MODE Testnet to your metamask using the network info from here:[https://github.com/mode-network/documentation/blob/main/build-on-mode/broken-reference/README.md](https://github.com/mode-network/documentation/blob/main/build-on-mode/broken-reference/README.md "mention")
* Get test ETH sepolia here: [Testnet Faucets](/tools/testnet-faucets)
* Bridge to MODE testnet here: [Bridging to Testnet](/user-guides/bridge/bridging-to-mode-testnet)
* Have [Node and NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed on your PC
* Have a basic understanding of React.js and how blockchain works

## Smart Contract Deployment On Mode

We've crafted a simple smart contract named BidBoard for this tutorial. The contract allows advertisers to bid for space on an advertising board. The code and deployment details are available on this [GitHub](https://github.com/joshuanwankwo/mode_testnet) repository and [Mode Testnet Explorer](https://sepolia.explorer.mode.network/address/0x7215c347458DB86531f3c4Cae1c60c0B93e435Ce). You can also write your own custom smart contract and deploy it to Mode by following [Deploying a Smart Contract](/tutorials/deploying-a-smart-contract).

## Getting Started

Now that we have the prerequisites, the first thing we need to do is to open our terminal, navigate into the folder where you want your project to be, and create a simple react app by running the following command

`npx create-react-app bidboard-ui`

It should create the whole React App for you.

## Install Ether.js

Ethers.js is a sleek library facilitating the interaction between web applications and blockchain. In the App component, we are using ethers.js to interact with our smart contract and also listen to events being emitted from the smart contract. To install ethers.js, navigate into the project you just created and run the following command:

`npm install ethers`

## Create Main App Component

You can open up the project in VSCode or any other code editor of your choice and then open the <mark style="color:yellow;">`App.js`</mark> file

Replace all the code and paste this:

{% code title="App.js" lineNumbers="true" %}

```jsx
import React, { useState, useEffect } from "react";
import "./App.css";
import { ethers } from "ethers";

const App = () => {
 return (
   <div className="app">
     <h1>hello</h1>
   </div>
 );
};

export default App;
```

{% endcode %}

In this file are importing <mark style="color:orange;">`useState`</mark> and <mark style="color:orange;">`useEffect`</mark> which we'll be needing later in this tutorial, we’re also importing <mark style="color:orange;">`ethers`</mark> to enable us to make a connection to our smart contract.

\
The next thing we need to do is to declare our contract address and ABI file, there are different ways get the contract ABI but if you deployed you smart contract using foundry, you can find your ABI check the following directory:

./out/MyContract.sol/MyContract.json.

On the frontend side of things, we’re going to update our <mark style="color:yellow;">`App.js`</mark> adding these lines:

```tsx
 const contractAddress = "0x7215c347458DB86531f3c4Cae1c60c0B93e435Ce";
 const abi = [ ABI JSON CODE ] 

 const [currentAd, setCurrentAd] = useState("Hello World!");
 const [currentBid, setCurrentBid] = useState(0);
 const [advertiser, setAdvertiser] = useState("0x0");
 const [newAd, setNewAd] = useState("");
 const [bidAmount, setBidAmount] = useState("");
 const [provider, setProvider] = useState(null);
 const [status, setStatus] = useState("");
```

Your <mark style="color:yellow;">`App.js`</mark> should look like:

{% code title="App.js" lineNumbers="true" %}

```jsx
import React, { useState, useEffect } from "react";
import "./App.css";
import { ethers } from "ethers";

const contractAddress = "0x7215c347458DB86531f3c4Cae1c60c0B93e435Ce";
const abi = [ YOUR ABI JSON CODE HERE ] 

const App = () => {
 const [currentAd, setCurrentAd] = useState("Hello World!");
 const [currentBid, setCurrentBid] = useState(0);
 const [advertiser, setAdvertiser] = useState("0x0");
 const [newAd, setNewAd] = useState("");
 const [bidAmount, setBidAmount] = useState("");
 const [provider, setProvider] = useState(null);
 const [status, setStatus] = useState("");

 return (
   <div className="app">
     <h1>hello</h1>
   </div>
 );
};

export default App;
```

{% endcode %}

We added the contract address, the abi, and a few states that we will need for our dApp to work. Don't worry about all these React states, they are particular for this app so you don't need to fully understand them. Please remember to paste you ABI in your App.js file.

{% hint style="info" %}
Usually we would save the ABI in a different file and then import it but in this case we'll just paste all the ABI JSON in our App.js file.
{% endhint %}

## Set the Provider

As the page loads, we'll set our provider to immediately fetch the current advertisement details from our smart contract, as demonstrated in the code below.

```tsx
useEffect(() => {
   if (typeof window !== "undefined") {
     if (window.ethereum) {
       setProvider(new ethers.BrowserProvider(window.ethereum));
       // getCurrentAd()
     } else {
       console.error("Please install MetaMask!");
     }
   }
 }, []);
```

This code is using the `useEffect` hook in React to execute once after the component mounts. If the `window` object and `window.ethereum` are defined, it sets a new provider using `ethers.BrowserProvider` to interact with the Ethereum blockchain. If `window.ethereum` is not defined, it logs an error asking to install MetaMask, a browser extension for managing blockchain transactions.

## Fetch Current Advertisement Data

Create a function to fetch the current advertisement data from our contract and call this function inside a `useEffect` hook.

```tsx
async function fetchCurrentAd() {
   try {
       // Get the provider, instantiate the contract and then call getCurrentAd
       const provider = new ethers.BrowserProvider(window.ethereum);
       const contract = new ethers.Contract(contractAddress, abi, provider);
       const adData = await contract.getCurrentAd();
       
       setCurrentAd(adData[0]);
       setAdvertiser(adData[1]);
       setCurrentBid(ethers.formatEther(adData[2]));
       console.log(adData[0]);
   } catch (error) {
     console.error('Error fetching current ad:', error);
   }
 }

 useEffect(() => {
   fetchCurrentAd();
 }, []);
```

In the above code we’re fetching the current ad by setting our provider like we did before, creating a new instance of our contract by passing in the contract address, contractABI and our provider and then invoking the `getCurrentAd` function from our smart contract which returns the current adData. Then we pass the adData into our app state so we can render them in the frontend.

## Update Our Smart Contract State

Now we’re able to fetch the current state of our contract we also need to be able to update the state and that’s what the below function does

```tsx
 const submitBid = async () => {
   
   const contract = new ethers.Contract(contractAddress, abi, provider); // Instantiate the contract
   const signer = provider.getSigner(); // Assumes Metamask or similar is injected in the browser
   const contractWithSigner = contract.connect(await signer);
   
   try {
     const tx = await contractWithSigner.updateMessage(newAd, {
       value: ethers.parseEther(bidAmount),
     });
     setStatus("Transaction sent, waiting for confirmation...");
     await tx.wait();
     setStatus("Transaction confirmed!");
   } catch (err) {
     console.error(err);
     setStatus("Error: " + err.message);
   }
 };
```

In summary, the <mark style="color:blue;">`submitBid`</mark> function allows users to submit a new bid to the smart contract. It initializes a contract instance and a signer, creates a transaction to update the advertisement message with the new bid, and waits for the transaction to be confirmed on the blockchain.

If any errors occur during this process, they are caught and logged, and the user is informed about the error through a status message.

<details>

<summary>Detailed explanation of the submitBid function</summary>

**Contract and Signer Initialization**

* A new contract instance is created using the ethers.Contract constructor with the provided contract address, ABI, and provider.
* A signer, which is essential for authorizing transactions, is obtained from the provider.
* The contract instance is then connected with the signer to authorize interactions.

**Transaction Creation and Sending:**

* A new contract instance is created using the ethers.Contract constructor with the provided contract address, ABI, and provider.
* A signer, which is essential for authorizing transactions, is obtained from the provider.
* The contract instance is then connected with the signer to authorize interactions.

**Transaction Confirmation:**

* The await tx.wait(); line waits for the transaction to be confirmed on the blockchain.
* Once confirmed, a status message is updated to inform the user of the successful transaction.

**Error Handling:**

* If an error occurs at any point in the process, it's caught, logged to the console, and a status message is set to inform the user about the error.

The function leverages async/await syntax to handle the asynchronous operations of sending and waiting for the transaction confirmation in a readable manner.

</details>

## Listening to events on our Smart Contract

Consider you're bidding for ad space, and someone else places a higher bid. It's essential to know about this new bid immediately. This is where event listening helps: it can notify you about the latest bid in real-time, keeping you updated on the bidding activity.

The following code sets up an event listener:

```tsx
useEffect(() => {
   const setupEventListener = async () => {
     if (typeof window.ethereum !== "undefined") {
       const provider = new ethers.BrowserProvider(window.ethereum);
       const contract = new ethers.Contract(contractAddress, abi, provider);
       contract.on(
         "MessageUpdated",
         (newMessage, newAdvertiser, newAmount, event) => {
           // Update your state variables here
           setCurrentAd(newMessage);
           setCurrentBid(ethers.formatEther(newAmount));
           setAdvertiser(newAdvertiser);
         }
       );
       // contract.getEvent
       console.log("Provider:", provider); // Debug line
     } else {
       console.error("Ethereum provider is not available");
     }
   };
   
   setupEventListener();

   // Cleanup the event listener
   return () => {
     if (typeof window.ethereum !== "undefined") {
       const provider = new ethers.BrowserProvider(window.ethereum);
       const contract = new ethers.Contract(contractAddress, abi, provider);
       contract.removeAllListeners("MessageUpdated");
     }
   };
 }, []);

```

This above code sets up an event listener using the useEffect hook to listen for the `MessageUpdated` event emitted by the smart contract whenever the advertisement message is updated.

When such an event is detected, it updates the state variables `currentAd`, `currentBid`, and `advertiser` with the new message, advertiser, and bid amount, respectively. This ensures that the displayed data on the web app remains synchronized with the blockchain.

Lastly, it provides a cleanup function to remove the event listener, preventing potential memory leaks when the component is unmounted or re-rendered.

## Code The UI

That’s it, we’re done with the on-chain functionalities, now let’s build UIs to test them out. How you choose to build your UI is entirely up to you, for our project, we’re just going to add the following JSX to our <mark style="color:yellow;">`App.js`</mark> code:

```jsx
<div className="app">
     {/* Landing Section */}
     <section className="landing">
       <h1>BidBoard</h1>
       <p>Status: {status}</p>
     </section>

     <div className="container">
       {/* Bid Section */}
       <section className="bid-section">
         <input
           type="text"
           value={newAd}
           onChange={(e) => setNewAd(e.target.value)}
           placeholder="Enter your advert message"
         />
         <input
           type="number"
           value={bidAmount}
           onChange={(e) => setBidAmount(e.target.value)}
           placeholder="Enter your bid amount"
         />
         <button onClick={submitBid}>Submit Bid</button>
       </section>

       {/* Advert Display Section */}
       <section className="advert-display">
         <div className="current-ad">"{currentAd}"</div>
         <div className="card-details">
           <div className="current-bid">
             Current Bid: <br />
             {currentBid} ETH
           </div>
           <div className="advertiser">
             Advertiser: <br />
             {advertiser}
           </div>
         </div>
       </section>
     </div>

     {/* Footer Section */}
     <footer>
       <a
         href="https://github.com/your-repo"
         target="_blank"
         rel="noopener noreferrer"
       >
         GitHub Repository
       </a>
       {/* Add more links as needed */}
     </footer>
   </div>

```

## Running the project

To run the project open your terminal and run the following command in the project's folder:

`npm start`

Your console should look similar to this:

<figure><img src="https://lh4.googleusercontent.com/iXPtWgKwS3obTjdvUF_-b88QcBshtDTx66Y2Ayn4ArngJdhehjleB4JQqzuuf0NKuWj0v4p5TPdYvmA674kurL_3VAAx93d903LFiFtdMbACORLUfhL65YFHo9VOzlbz3Ma7QZOvVtTw6oNmSya_SqE" alt="" width="375"><figcaption></figcaption></figure>

Open the URL shown in your browser and you are good to try your dApp!

## Conclusion

This tutorial provided a hands-on journey through creating a web application and connecting it to a smart contract deployed on Mode Testnet using ether.js.

Through this project, we delved into essential steps from setting up the development environment to real-time tracking of smart contract events. You can clone the [code](https://github.com/joshuanwankwo/mode_testnet) and play around with it!\\

To learn more about Mode and how to turn your code into a business, join our [Discord](https://discord.gg/modenetworkofficial) and say hello 👋


# Deploying a Smart Contract

In this section you will learn how to deploy simple smart contracts with all the most popular tooling in the ethereum ecosystem.

## [Foundry](https://getfoundry.sh/)

Foundry is a toolkit for developing and deploying smart contracts.

Follow [this tutorial](/tutorials/deploying-a-smart-contract/using-foundry) to learn how to deploy a smart contract on Mode using Foundry.

## [Hardhat](https://hardhat.org/)

Hardhat is a framework for developing smart contracts. You can use Hardhat to deploy to Mode as any other Ethereum - see the network information [here](https://github.com/mode-network/documentation/blob/main/build-on-mode/deploying-a-smart-contract/broken-reference/README.md)[.](https://github.com/mode-network/documentation/blob/main/build-on-mode/deploying-a-smart-contract/broken-reference/README.md)

## [Thirdweb CLI](https://portal.thirdweb.com/cli)

Thirdweb CLI is an interactive command line interface for creating tools using thirdweb infrastructure. You can learn how to deploy a smart contract to Mode using thirdweb CLI [here](/tutorials/deploying-a-smart-contract/using-thirdweb).

## [Remix IDE](https://remix.ethereum.org/)

Remix IDE is an open-source, web-based tool for developing smart contracts using the Solidity programming language.Learn how to deploy your smart contracts to Mode using Remix [here](/tutorials/deploying-a-smart-contract/using-remix).


# Using Hardhat

How to deploy a sample smart contract with Hardhat on Mode

This tutorial will guide you through the process of deploying a smart contract on Mode's Ethereum L2 using Hardhat and TypeScript.

#### Prerequisites

* **Node.js and npm:** Ensure both are installed. [Download here](https://nodejs.org/).
* **Ethereum Wallet:** A private key for the Mode Testnet that has testnet ETH. You can follow [Bridging to Testnet](/user-guides/bridge/bridging-to-mode-testnet) to get some or go to [Testnet Faucets](/tools/testnet-faucets). We recommend using a new wallet without real funds in case the PK gets compromised.
* **Solidity and CLI knowledge:** A little knowledge is always helpful to follow along but it's not mandatory!

## What you'll accomplish

* Initialize a TypeScript-based Hardhat project.
* Craft a basic Ethereum smart contract.
* Set up Hardhat for Mode Testnet deployment.
* Deploy your smart contract on Mode.

## 1. Initialize a Hardhat TypeScript project

Open your terminal and create a new directory for your project, then navigate into it:

```bash
mkdir my-hardhat-project && cd my-hardhat-project
```

Initialize an npm project:

```bash
npm init -y
```

Install the necessary packages for Hardhat and TypeScript:

```bash
npm install --save-dev hardhat ts-node typescript @nomiclabs/hardhat-ethers ethers
```

Start a new Hardhat project with TypeScript:

```bash
npx hardhat init
```

When prompted, make the following selections:

* Choose "Create a TypeScript project".
* For the `.gitignore` prompt, select "Yes" (or `y`).
* For installing the projects dependencies select "Yes" (or `y`).

```bash
[~/Mode/my-hardhat-project]$ npx hardhat

888    888                      888 888               888
888    888                      888 888               888
888    888                      888 888               888
8888888888  8888b.  888d888 .d88888 88888b.   8888b.  888888
888    888      88b 888P   d88  888 888  88b      88b 888
888    888 .d888888 888    888  888 888  888 .d888888 888
888    888 888  888 888    Y88b 888 888  888 888  888 Y88b.
888    888  Y888888 888      Y88888 888  888  Y888888  Y888

👷 Welcome to Hardhat v2.18.2 👷‍

✔ What do you want to do? · Create a TypeScript project
✔ Hardhat project root: · /Users/Mode/my-hardhat-project
✔ Do you want to add a .gitignore? (Y/n) · y
✔ Do you want to install this sample project's dependencies with npm (@nomicfoundation/hardhat-toolbox)? (Y/n) · y
```

## 2. Drafting the Smart Contract

In the `contracts` directory, delete the sample smart contract `Lock.sol` and then create a new file named `HelloWorld.sol`:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract HelloWorld {
    string public greet = "Hello, Mode!";

    function setGreet(string memory _greet) public {
        greet = _greet;
    }

    function getGreet() public view returns (string memory) {
        return greet;
    }
}
```

## 3. Configuring Harhdat for Mode

Edit the `hardhat.config.ts` file to include Mode Testnet settings:

```typescript
import "@nomiclabs/hardhat-ethers";

import { HardhatUserConfig } from "hardhat/config";

const config: HardhatUserConfig = {
  networks: {
    mode: {
      url: "https://sepolia.mode.network",
      chainId: 919,
      accounts: ["YOUR_PRIVATE_KEY_HERE"] //BE VERY CAREFUL, DO NOT PUSH THIS TO GITHUB
    }
  },
  solidity: "0.8.0",
};

export default config;
```

Replace `YOUR_PRIVATE_KEY_HERE` with your Mode Testnet private key.

{% hint style="danger" %} <mark style="color:red;">**IMPORTANT:**</mark> Do not push your <mark style="color:yellow;">`hardhat.config.ts`</mark> file to github nor share your private key with anyone. It is a very common mistake to push your PK to github so make sure that in the .gitignore you add the <mark style="color:yellow;">`hardhat.config.ts`</mark>
{% endhint %}

## 4. Compilation

Compile the smart contract:

```bash
npx hardhat compile
```

## 5. Deployment

In the `scripts` directory, create a new file named `deploy.ts`:

```typescript
import { ethers } from "hardhat";

async function main() {
    const HelloWorld = await ethers.getContractFactory("HelloWorld");
    const gasPrice = ethers.utils.parseUnits('10', 'gwei'); // Adjust the '10' as needed
    const gasLimit = 500000; // Adjust this value based on your needs
    const helloWorld = await HelloWorld.deploy({ gasPrice: gasPrice, gasLimit: gasLimit });
    await helloWorld.deployed();
    console.log("HelloWorld deployed to:", helloWorld.address);
}

main()
  .then(() => process.exit(0))
  .catch(error => {
    console.error(error);
    process.exit(1);
  });
```

{% hint style="warning" %}
If you get any gas related issues you will need to check what's the best gasPrice and gasLimit, you can find some info about the state of the chain in [BlockScout](https://sepolia.explorer.mode.network/)
{% endhint %}

Deploy the smart contract to the Mode Testnet:

```bash
npx hardhat run scripts/deploy.ts --network mode
```

####

## 6. Check your contract in a block explorer

Verify your smart contract's deployment on the Mode Testnet block explorer: <https://sepolia.explorer.mode.network/>.\
\
Input the contract address from the console to view its details.

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

## 7. Conclusion

Congratulations! You've successfully deployed a smart contract on the Mode Testnet using Hardhat and TypeScript.\
\
To learn more about Mode and how to turn your code into a business, join our [Discord](https://discord.gg/modenetworkofficial) and say hello 👋

If you want the next challenge, you can try registering a contract for the SFS following this guide: [SFS - Registering a contract with Remix](/tutorials/sfs-sequencer-fee-sharing/register-a-smart-contract/sfs-registering-a-contract-with-remix)\
\\


# Using Thirdweb

How to deploy a smart contract on Mode with ThirdWeb CLI & Smart contract Dashboard

Thirdweb is a complete web3 development framework that provides everything you need to connect your apps and games to decentralized networks. Mode is now integrated with Thirdweb, allowing you to use all these fantastic features to deploy and interact with your smart contracts quickly.

{% hint style="info" %}
This guide assumes you have got Sepolia ETH and bridged to the Mode Testnet Network.
{% endhint %}

{% hint style="info" %}
You can use deploy pre-built contracts direct from the [thirdweb dashboard](https://portal.thirdweb.com/contracts/explore/overview?utm_source=modedocs\&utm_medium=docs) as another option.
{% endhint %}

## 1. Download the ThirdWeb CLI

We’ll go through the steps of installing and running the Thirdweb CLI, but if you encounter any issues with these steps, please refer to the [official documentation](https://portal.thirdweb.com/cli/create).

To download the Thirdweb CLI globally, open a terminal and run the following command:\
\
`npm i -g thirdweb`

Now try running:\
\
`thirdweb --version`\
\
if the CLI is installed correctly, you will be prompted to go to the installed version.

## 2. Create the Local Environment

Let’s create a new project to work on our local machine using the command:\
\
`npx thirdweb create`

You will be prompted with a menu with different options to help you set up your environment for coding the smart contract. For the sake of this tutorial, we will be deploying an ERC-20 token and adding the Drop extension from Thirdweb. This will set up a basic ERC-20 token with the possibility to mint, burn, and airdrop tokens from the dashboard. What’s even better is that these contracts are all audited and ready to deploy!

Follow the following screenshot to create an example smart contract, or you can use your own code.

<figure><img src="https://lh3.googleusercontent.com/4oIJmVWET14ccRu4lAcqFMc2GZrBJcXzdJF6UvaH2CAOCY5m7s9SZZaKKViBxOViEW-RcBooGKlFFleX286ip6rwqqN0Sx4IS-9aR64VZRUv0XUVBZRo5BT9vlhrnekNxZMqsXO20ES0lNcYV2ycJ44" alt=""><figcaption></figcaption></figure>

After a few seconds, you should now have a folder called “my-mode-token” or whatever you named your project.

To modify your smart contract, you can launch Visual Studio Code (or your preferred code editor) and access the designated project folder. We will leave it as is since we want to focus on showing the deployment process. We already have a fully functional smart contract code thanks to thirdweb’s templates.

## 3. Create a ThirdWeb API Key

Thirdweb services require an API key, so let’s create one. There is an official tutorial [here](https://blog.thirdweb.com/changelog/api-keys-to-access-thirdweb-infra/) but let’s go through it quickly.\
\
To get an API key, go to <https://thirdweb.com/dashboard/settings/api-keys>.\
\
Connect your wallet and you will be prompted with a message to sign from Metamask (you can use other wallets if you prefer). Once your wallet is connected, you should be able to switch to Mode network and also Create an API Key.

<figure><img src="https://lh3.googleusercontent.com/fGJoHbCOPwfPw7oZChraQaMMK1H4EzcyizWMUlX-MYlpb28FrRj_1wNqlRYnE49rxvzm3hA22Q6L6Yk1YK_123yny8GFpWY-B53FATKRpUQQ8aGPMx_dN281YPchcM8TuWT9ucCf3pYMx8Es839RqOI" alt=""><figcaption></figcaption></figure>

Follow the steps as shown below

\
![](https://lh5.googleusercontent.com/ZIzthFACIeR8Vcb5H1BavHD8l-xHkTi3Eq1YqCXCAWky94SZiJEp7QIHbxL-eQ5eBjgCYeY__SJ7C6LiCgbeH6mDF4UcMrjRNWuc4jNVdPNCuPBZIAH4IVTLeDm_YMunu5y1b0d3Ua7xFBFLaAtYw5I)![](https://lh3.googleusercontent.com/aguPxJop2uFe2JMY3HVsrGNldl2T0KD-Rp8vJVXQR_fHzfIU8JE7BJk5q_ysWuKShW_cZHp5RKghI0LfU0_x_pb9bz2w2kyo1xkOoj9XyQDDUgHH_QZitmifuGBHeXQ1i93b8YV9yMb4nJIS9-oq-ho)

It’s very important that you now save your Client ID and Secret Key securely. Don’t lose this because if you do, you must create a new API key.

<figure><img src="https://lh5.googleusercontent.com/Hljcafl_tXKmd_1NrRLxXA7VOnNnEbAMoNCBk_FsY5d1YE35bKVx_tq2I13WdxCemNjl4c_dWMPl0mwtJ-1-8O0_Gp2az1fSpn8I4fz9nE2RZrDequaW_7hCTFVqn7q4mH5r-HkrENyfcsIpfZ7gTcU" alt=""><figcaption></figcaption></figure>

## 4. Deploy

Now, when your contract is ready to deploy, run the following command at the root of your project:\
\
`Npx thirdweb deploy`

You should be prompted with something similar to this:

<figure><img src="https://lh6.googleusercontent.com/mEFhvKgccMQ_i1BMY07N1Pbyl70LRs9YpCk3KySt8ByOtJlXaWydo6Jq2tTD6lJkw_sGYhzHxKcwYTwBxdzDy2rlCN0j-7RI0nHlyj43rxRDAplqZBW2p-CLNI6ZB86Z4moys54ATHSYZ-TnELpAERY" alt=""><figcaption></figcaption></figure>

If your browser doesn’t automatically pop up with the link to deploy your contract, just copy the link shown in the terminal and paste it into a browser.

Select the Mode testnet network from the search list

<figure><img src="https://lh5.googleusercontent.com/wvFpjpxBgIeZyPGMETJkIg-3UD8QvZIeR0BJ2C7uvhQ-tZkpXDAcSaFVsQQzmVtcC4ozo0jS_lepDojuMw1UQnbSImeFzaNicAIP2bxQZD8mfikd8TyLv8b78dRGPQ-QoDm-XJDLYyBm1bPAZcb2L4o" alt=""><figcaption></figcaption></figure>

A screen like the one below should appear; just fill in the fields with the names and values you want for your contract parameters. When you are done, just hit Deploy Now. This will cost you gas paid in ETH. This transaction might fail if you don’t have enough ETH on Mode for gas.

Also, make sure to tick the box to add a dashboard for our contract. This will give us some exciting features to interact with our contract later on.

<figure><img src="https://lh3.googleusercontent.com/wECUgA6dG3Vo7hpT0rVoDuftCRpDliQm8P14aec_hYc_wrRg_LGhowFu9XOGrGFgG6aw4yJgHnHwsxbLPOBa284llfLyhCnIsbsNVNZpEz9HHZ3GCSaTxQmN3bFnGR0m0utyHa2M1EZUDJ7RVMv_Dfw" alt=""><figcaption></figcaption></figure>

You will also have to sign a transaction to approve the dashboard, but this step is gasless.

That’s it! You have successfully deployed a smart contract to Mode with the Thirdweb CLI!

## 5. Smart Contract Dashboard

To track all your smart contracts and easily interact with them, Thirdweb provides us with a contracts dashboard. Just go to <https://thirdweb.com/dashboard/contracts> and you will see all your deployed contracts.

<figure><img src="https://lh3.googleusercontent.com/2nbShWLWTkSnIAdskIK-Ph_mco2WYGq6pSoucNN78Nj1GRETFWaFDJ8-AHk5vQomzNHs_uoVeqt6UGZOm5IXSNnIZIiotL7-DFVFhauoeH-d7ZRnpq5KMTRILcNXT2aWaHrOeQzImcesDWunZLrWPbw" alt=""><figcaption></figcaption></figure>

Now just click on the smart contract you want to see the whole dashboard and start playing around!

For example, you can go to the explorer tab and see all the read-and-write methods your contract has and even use them. It’s super easy to just look at variables and manually test out some methods.

<figure><img src="https://lh5.googleusercontent.com/RqDMTSa6OhOvdBPR8ch7YcZJqGwevWUVgNvvqBkEDBa9J6BMxC1lMd3FQ3LcHiwUL-k3-GmdjKidBg6iXVqZzhgprZft9T7mue4-uNLfgxBZ1WbfifuDolLYkaPK3sXYBAmUnHMxRI4BRGi1-SOkfVE" alt=""><figcaption></figcaption></figure>

One of the features we liked the most was the “Build” tab in your smart contract dashboard. This section will have a lot of examples of code snippets to connect with your smart contract programmatically from an app. You can choose between several languages and frameworks, such as Javascript, React, and Python.\
\\

<figure><img src="https://lh3.googleusercontent.com/aWeDDj0x77Elg_9l0l0mdkf-U9mt7QCCUgCVHo9OzlL6GYHo5cQxdTgx_ccRWeHyEBGimHbA0cK95bc3FGxH2Oa-fGyBhR2Ya9biR7S6WsKXWrzyK4uVeUlbVECYK8_4xE_fKlpmJbjb8LiT7piqng0" alt=""><figcaption></figcaption></figure>

Congratulations! Now you have created and deployed a smart contract on Mode using the Thirdweb CLI. To learn more about Mode and how to turn your code into a business, join our [Discord](https://discord.gg/modenetworkofficial) and say hello 👋

If you want the next challenge, you can try registering a contract for the SFS following this guide: [SFS - Registering a contract with Remix](/tutorials/sfs-sequencer-fee-sharing/register-a-smart-contract/sfs-registering-a-contract-with-remix)\
\\


# Using Foundry

How to deploy with Foundry on Mode

This guide will walk you through the deployment of an ERC20 token on MODE using [Foundry](https://book.getfoundry.sh/).\
Foundry is a smart contract development toolchain written in Rust.

Foundry manages your dependencies, compiles your project, runs tests, deploys, and lets you interact with the chain from the command-line and via Solidity scripts.

Given that MODE is built on the OP Stack and is EVM-compatible, you can easily port any Ethereum-based smart contract without modifying the core code, requiring only minor setting adjustments.

## Prerequisites

Even if you need to do these 3 steps, it won’t take more than 10 minutes to set up:

* Have some ETH on Mode Testnet Network. You can follow our guide on [how to bridge](/user-guides/bridge/bridging-to-mode-testnet). Or use [this faucet](https://faucet.modedomains.xyz/) to claim some ETH on Mode.
* Rust must be installed on your computer. If it's not, [follow this guide](https://doc.rust-lang.org/book/ch01-01-installation.html).
* Foundry must be installed on your computer. If it’s not, [follow this guide](https://book.getfoundry.sh/getting-started/installation).

{% hint style="info" %}
If you just want to skip to the build & deploy section of this tutorial, you can clone [this repository](https://github.com/LuchoLeonel/foundry-mode-boilerplate) that contains a boilerplate Foundry project and skip to [step 3](#3.-building-the-contract).
{% endhint %}

Let's get started!

## 1. Setting up the project

1.1 Initialize a new Foundry project:

Forge is the command-line interface (CLI) tool for Foundry, allowing developers to execute operations directly from the terminal.

Open up a terminal and run this command:

<pre class="language-bash"><code class="lang-bash"><strong>forge init my-project
</strong></code></pre>

1.2. Install the OpenZeppelin contracts library inside your project, which provides a tested and community-audited implementation of ERC20:

<pre class="language-bash"><code class="lang-bash"><strong>forge install OpenZeppelin/openzeppelin-contracts
</strong></code></pre>

## 2. Writing the ERC20 token contract

2.1. In **/src** of your project directory, create a text file named **MyERC20.sol** and add:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";

contract MyERC20 is ERC20 {
    constructor() ERC20("MyToken", "MTK") {}
}
```

This is a simple ERC20 token named "MyToken" with the symbol "MTK". You can name it any way you want and also write any other contracts. Just remember that if your file name is called differently, the commands to deploy will be slightly different.

This is what you should have up to now:

<figure><img src="https://lh6.googleusercontent.com/1jahpfwmFhOAiT_xMNIb0-kux3ARUGOy-3euxZ7_gT6Gg17CnCIGNbaeLIqrisbaNa1ZyJ_npaKhMyHNnyZCZ_fnmWknw3fo4P_1immNKd6fDyWDYc8rU6srodquISlaY64TTpbdar9d57v5RSuWWFk" alt=""><figcaption></figcaption></figure>

## 3. Building the contract

3.1. Use Foundry to compile your smart contract running the following command:

{% code fullWidth="false" %}

```bash
forge build
```

{% endcode %}

## 4. Deploying the ERC20 token contract

4.1. To deploy your contract you will need to run the following command and replace \<YOUR\_PRIVATE\_KEY> with your credentials:

{% hint style="warning" %}
Never share or expose your private key publicly. This will grant complete control to whoever has it. Please store it safely.
{% endhint %}

{% code overflow="wrap" lineNumbers="true" %}

```bash
forge create --rpc-url https://sepolia.mode.network --private-key <YOUR_PRIVATE_KEY> src/MyERC20.sol:MyERC20
```

{% endcode %}

{% hint style="success" %}
PRO TIP: You can add the --verify flag and use blockscout to verify your contract while deploying.
{% endhint %}

The following is the command to deploy and verify the contract. If you already deployed your contract but still want to verify it, don't panic! Next step will walk you through that case.

{% code overflow="wrap" lineNumbers="true" %}

```bash
forge create --rpc-url https://sepolia.mode.network --private-key <YOUR_PRIVATE_KEY> src/MyERC20.sol:MyERC20 --verify --verifier blockscout --verifier-url https://sepolia.explorer.mode.network/api\?
```

{% endcode %}

In the output you should get something like:

{% code overflow="wrap" %}

```
[⠢] Compiling... No files changed, compilation skipped 
Deployer: 0x3F26b51E23D01b09f4079B2a9e00e6873a8409D8 
Deployed to: 0x628F56856386A4De8414A4D8217D519bF94d03f0 
Transaction hash: 0xbe2d27554f130a720c4dd82dad055c941ca44dee836f6333a8507d76022c158
```

{% endcode %}

Copy the “Deployed to” value and store it somewhere to use later. This is the address of your contract.

## 5. Verifying the ERC20 token contract after deployment

5.1. For already deployed contracts you can use the verify-contract command:

{% code overflow="wrap" lineNumbers="true" %}

```bash
forge verify-contract <CONTRACT_ADDRESS> src/MyERC20.sol:MyERC20  --verifier blockscout --verifier-url https://sepolia.explorer.mode.network/api\?
```

{% endcode %}

## 6. Exploring and interacting with your deployed contract

Use the [blockscout](https://sepolia.explorer.mode.network/) explorer to view your contract's details. Paste your contract's address you saved from the deployment output into blockscout's search bar.

In the "Contract" tab you'll find your verified contract.

<figure><img src="https://lh5.googleusercontent.com/OJLvZ0NHyU_z-JXDaPXZGfjMhAPsWr0PENTz5FCGAvB89b57lT05jwVJu6CFwW-isDp_5ySWmP55IS4mP7QO9ybM5J0N88dcHLHXSJo_f-IGaXxbb-oEUUGj5mjG6J64Tmb-oxNYKD1A3Xpg6hXZ_gk" alt=""><figcaption></figcaption></figure>

***

Congratulations, you just deployed and verified a contract on Mode Network using Foundry.

To learn more about Mode and how to turn your code into a business, join our [Discord](https://discord.gg/modenetworkofficial) and say hello 👋

If you want the next challenge, you can try registering a contract for the SFS following this guide: [SFS - Registering a contract with Remix](/tutorials/sfs-sequencer-fee-sharing/register-a-smart-contract/sfs-registering-a-contract-with-remix)\\


# Using Remix

How to deploy with Remix IDE on MODE

Mode is an OP Stack Layer-2 designed for hyper-growth. Since MODE is built with the OP Stack, it is EVM compatible, allowing you to easily port your existing Ethereum-based smart contracts without modifying the code.

Let’s see how to deploy a smart contract on MODE using the [Remix IDE](https://remix.ethereum.org).

{% hint style="info" %}
This guide assumes you have got Sepolia ETH and bridged to the Mode Testnet Network.
{% endhint %}

## 1. Deploy using Remix

First of all you will need to have Mode network added to your Metamask. Follow [https://github.com/mode-network/documentation/blob/main/build-on-mode/deploying-a-smart-contract/broken-reference/README.md](https://github.com/mode-network/documentation/blob/main/build-on-mode/deploying-a-smart-contract/broken-reference/README.md "mention") for the step-by-step on how to add Mode testnet to Metamask.

We are ready to get started!

[Remix](https://remix.ethereum.org) is a no-setup tool with a graphical interface for developing smart contracts. It’s easy to get started allowing a simple deployment process, debugging, interacting with smart contracts, and more. It’s a great tool to test quick changes and interact with deployed smart contracts.

<figure><img src="https://lh4.googleusercontent.com/AdHTInVXjMKYbUPeok0GuLdiZDDTsdxodDjApKYvJ-kEfqQ2dbgEwp1dHhveeYi0m1VkiW6wnBJV_1Tnn4S4JR6KIvuQGZ5eKukwsWAHxF6PsffOneea6mgZzh_OFZThQok1DkpJmtWLkzN1oCmJEYg" alt="This is a screenshot showing Remix I D E. There is a basic smart contract that will be used for the tutorial."><figcaption></figcaption></figure>

For the sake of this tutorial, we will be deploying the ‘1\_Storage.sol’ smart contract that comes as an example in Remix, but you can use any of your code.\
\
Here is the sample code, you can paste this in any .sol file:

{% code title="1\_Storage.sol" fullWidth="true" %}

```solidity
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.8.2 <0.9.0;

contract Storage {

    uint256 number;
    
    function store(uint256 num) public {
        number = num;
    }

    function retrieve() public view returns (uint256){
        return number;
    }
}


```

{% endcode %}

To compile your smart contract, go to the Solidity Compiler tab and select the contract you want to compile. Click on "Compile", you can also enable "Auto Compile" for automatic compilation whenever you change the contract code.

{% hint style="info" %}
Make sure to open the advanced configurations and setting the EVM version to London. This is to avoid an issue with the PUSH0 opcode. You can read more on the issue with all the Optimism chains [here](https://community.optimism.io/docs/developers/build/differences/#opcode-differences).
{% endhint %}

<div align="center"><figure><img src="/files/2Eyt9rahCUjlgdDg424g" alt="" width="371"><figcaption><p>Solidity Compiler Tab</p></figcaption></figure></div>

Once the smart contract is compiled successfully, switch to the "Deploy & Run Transactions" tab.

In the "Environment" dropdown menu, select "Injected Provider - MetaMask"; this will connect your MetaMask to Remix and will allow you to make transactions from that connected wallet.

{% hint style="info" %}
Make sure to have Mode as your selected network in Metamask before deploying
{% endhint %}

\
![](https://lh4.googleusercontent.com/jmsucoJ4vr4ByW3_0Nt4gwlckzu78pvh7ugVp2nEep9z9LtpY-BuC5WmhX4k_uKk2vA_iIvDZg-VEn8YDzKdoSzmE327wjbLiCIpCGe9xc_GAxBOC5-LYet-qBNPQ54W5waFpeMZak61a-rmk_ITxog) ![](https://lh6.googleusercontent.com/nIYOD8FEnw-1qCtgMI_uKK4qRwEjciveycdc3q6iLtuW7su7sOQMZHhG1dw8Rwk2ulO4JFlQU8YxQlJIB8c6uMZJ5t19PCikrkIKVsRZW68PVRz8RVs1NtQOxrQ6x7CwZXtwjlv6W4Fe9x45_44LWSQ)

Select the compiled contract you want to deploy and click ‘Deploy.’

Now, MetaMask should pop up and ask you to confirm the transaction with super low fees.

<figure><img src="https://lh4.googleusercontent.com/u2Y8C7HIZLdoXt_3UW_bEGSj8fI0oRCoWsvLDfJaHjzviK7ucJKzrCgh8Qiw4OD7Zj8EK3-KGCK7H2fXn5Am5iUbDKHoD44ZDZkHUqC2R8UQmbkvStnjWNMMM9EwDcp_Sgl9Ml-ONlK8wCE0T21wEqo" alt="This image shows a screenshot of Metamask wallet with the transaction to deploy the smart contract. It shows very low fees of around 0.35 dollars or 0.00018852 ETH." width="375"><figcaption></figcaption></figure>

**CONGRATULATIONS! You just deployed your first smart contract to Mode.**

***

### 2. How to explore and interact with your deployed smart contract?

Now that you have deployed your first smart contract to Mode let’s see how to interact with it.

You will see your deployed smart contract below in the ‘Deploy & Run Transactions’ tab. You can use the Remix interface to call the methods defined in your smart contract and access it’s public variables.

We can also find our deployed smart contract in [Blockscout](https://sepolia.explorer.mode.network/), the Mode block scanner. Copy the contract address from Remix, go to [Blockscout](https://sepolia.explorer.mode.network/), and paste it into the search bar.

<figure><img src="https://lh5.googleusercontent.com/vNj7xV8ITJhBVEVimTgm6OBRU-9YPTreXCc78v8uoTPMgGQtw6BBBXWwDXZVkC_ZeIrHL5d2ko0a1KS6aSSG6LVidwKgobsQRJuujwjRmeGJG9Aj8ng1mMCiKCN9cdqPjPOLDLlYIL8m5ReZnoNrcXw" alt="" width="375"><figcaption></figcaption></figure>

The screenshot below shows our deployed smart contract, where you can see all transactions, the creator wallet, balance, and more!

Notice that if you call one of the smart contract methods in Remix, you should see the transaction pop up in this explorer. You can directly interact with your deployed smart contract with Remix.

<figure><img src="https://lh5.googleusercontent.com/8ZHx1tXtti3mgDFF8up5unacb3aiFwa5xxI6N2VZOI32G0kXC8XmAFTLeF3im4vHYUiVsM5pYsPKy13pCo-GwiJSTgVFZuRwwml9a8uBWAOE7BADWzE27FuXvOEPdWbQRCYXArfJeh20LdOqamINYQE" alt=""><figcaption><p>Blockscout</p></figcaption></figure>

{% hint style="success" %}
**You now have learned how to deploy a smart contract on Mode using Remix online IDE!**
{% endhint %}

In this tutorial, we also went through the Mode bridge, block explorer, and how to interact with your contract.

To learn more about Mode and how to turn your code into a business, join our [Discord](https://discord.gg/modenetworkofficial) and say hello 👋

If you want the next challenge, you can try registering a contract for the SFS following this guide: [SFS - Registering a contract with Remix](/tutorials/sfs-sequencer-fee-sharing/register-a-smart-contract/sfs-registering-a-contract-with-remix)

\\


# Verifying your smart contract

Verifying a smart contract involves confirming that the contract's code on the blockchain matches the source code provided by the developer. This process allows all other users to see the source code in clear text that was deployed on chain.\
\
For example, in our SFS contract you can see it's verified and you can see the code:\
\
<https://explorer.mode.network/address/0x8680CEaBcb9b56913c519c069Add6Bc3494B7020?tab=contract>\
\
**Purpose and Importance:**

1. **Transparency:** Verification allows users and stakeholders to review the contract's code, ensuring that it performs the intended functions without hidden or malicious operations.
2. **Trust:** In the blockchain ecosystem, trust is paramount. By verifying a contract, developers assure users that the deployed contract is genuine and operates as advertised.
3. **Security:** Verification enables the identification and auditing of the contract's code by the community or security experts, which can help in spotting vulnerabilities or bugs.
4. **Interoperability:** Verified contracts can be more easily integrated with other applications and services, as their functionality and interfaces are clear and validated.


# Using Hardhat

How to verify smart contract on Mode using hardhat

## Introduction

Verifying a smart contract on the blockchain is an essential step to ensure its transparency, security, and ease of interaction for users and other developers. Hardhat has emerged as a powerful tool for compiling, testing, deploying, and verifying smart contracts.

This tutorial will guide you through the process of verifying your smart contract on Mode network using Hardhat.

## Prerequisites

Before diving into the verification process, ensure you have the following ready:

1. Hardhat Installed: A foundational requirement, as Hardhat will be used for compiling, deploying, and verifying your smart contract.
2. Node.js and NPM: Hardhat runs on Node.js, and you'll use NPM (Node Package Manager) to install the Hardhat verification package.
3. Ethereum Wallet: A wallet like MetaMask, connected to the Mode network, is essential for deploying and managing your contracts.
4. Your Smart Contract Deployed: A smart contract already deployed on the Mode network. This guide assumes you've completed the deployment process but if you haven' t please check [Deploying a Smart Contract](/tutorials/deploying-a-smart-contract)

### Step 1: Installing Hardhat Verify Package

The first step is to integrate verification capabilities into your Hardhat environment. This is achieved by installing the @nomicfoundation/hardhat-verify plugin. Run the following command in your project's root directory:

```sh
npm install --save-dev @nomicfoundation/hardhat-verify
```

### Step 2: Configuring Hardhat

With the verification plugin installed, you need to import it and enable Sourcify integration in your `hardhat.config.ts`. This configuration aids in the verification process by ensuring your source code is published and verified through Sourcify.\
\
Add the following lines to your hardhat.config.ts:

```typescript
import "@nomicfoundation/hardhat-verify";
// Your existing configuration
module.exports = {
  // Other configurations
  sourcify: { enabled: true },
};
```

You hardhat.config file should look something like this:

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

```typescript
import "@nomiclabs/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";

import { HardhatUserConfig } from "hardhat/config";

const config: HardhatUserConfig = {
  networks: {
    modeTestnet: {
      url: "https://sepolia.mode.network",
      chainId: 919,
      accounts: ["YOUR_PRIVATE_KEY"],
    },
    modeMainnet: {
      url: "https://mainnet.mode.network/",
      chainId: 34443,
      accounts: ["YOUR_PRIVATE_KEY"],
    },
  },
  sourcify: {
    enabled: true,
  },
  solidity: "0.8.0",
};

export default config;
```

{% endtab %}
{% endtabs %}

### Step 3: Verifying Your Contract

With your project configured for verification, you're ready to verify your smart contract on the Mode network. Replace \<contract-address> with the actual address of your deployed contract. The command below initiates the verification process:

**For Testnet Verification**

If your contract is on the Mode testnet, use the following command, replacing `CONTRACT_ADDRESS` with your contract's actual address:

{% code fullWidth="true" %}

```sh
npx hardhat verify --network modeTestnet <contract-address>
```

{% endcode %}

**For Mainnet Verification**

For contracts deployed on the Mode mainnet, the command adjusts slightly to point to the mainnet explorer:

```sh
npx hardhat verify --network modeMainnet <contract-address>
```

{% hint style="info" %}
NB: Ensure the network name in your command aligns with your `hardhat.config.ts` setup.
{% endhint %}

This command communicates with the Mode network (as defined in your Hardhat configuration) and submits your contract's source code and metadata for verification. Upon successful verification, your contract's source code will be publicly visible on the blockchain, associated with its on-chain address.\
\
You should get a similar response to the one below:

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

### Conclusion

Verifying your smart contract on Mode using Hardhat not only enhances the transparency and credibility of your project but also significantly improves the end-user experience by facilitating easier interactions and verifications. Following the steps outlined in this guide, developers can ensure their contracts are verified and open for scrutiny, fostering a more secure and trustworthy ecosystem.

**Further Resources**

[Hardhat Documentation](https://hardhat.org/docs)

[Mode Network Explorer](https://explorer.mode.network/) (For checking contract verification status)


# Using Foundry

How to verify smart contract on Mode using foundry

## Introduction

Foundry is the Rust-built toolbox designed to streamline your smart contract development process. It's your comprehensive toolkit for not just creating and testing, but also for the crucial step of verifying your smart contracts. Verification ensures your code's transparency and trustworthiness on the blockchain. This guide focuses on verifying any smart contract on the Mode network's mainnet and testnet using Foundry.

## Getting Ready

Before we dive in, make sure you've got a few things in place:

* Deployed your smart contract to the Mode network. This guide assumes you've completed the deployment process but if you haven' t please check [Deploying a Smart Contract](/tutorials/deploying-a-smart-contract)
* Installed Rust and Foundry, as Foundry leverages Rust for its operations.

Got everything? Great! Let's get started.

## Step 1: Prepare Your Contract for Verification

Ensure your smart contract, such as an ERC20 token, is ready and deployed. Keep the contract's address at hand, as you'll need it for the verification command.

## Step 2: Verifying Your Contract

Verification is a straightforward process with Foundry. Depending on where your contract is deployed, you'll use either the mainnet or testnet command.

**For Testnet Verification**

If your contract is on the Mode testnet, use the following command, replacing `CONTRACT_ADDRESS` with your contract's actual address:

{% code fullWidth="true" %}

```sh
forge verify-contract CONTRACT_ADDRESS src/MyERC20.sol:MyERC20 --verifier blockscout --verifier-url https://sepolia.explorer.mode.network/api\?
```

{% endcode %}

**For Mainnet Verification**

For contracts deployed on the Mode mainnet, the command adjusts slightly to point to the mainnet explorer:

```sh
forge verify-contract CONTRACT_ADDRESS src/MyERC20.sol:MyERC20 --verifier blockscout --verifier-url https://explorer.mode.network/api\?
```

{% hint style="info" %}
Remember to replace CONTRACT\_ADDRESS with your contract's address and src/MyERC20.sol:MyERC20 with the correct path to your contract.
{% endhint %}

## Step 3: Confirm Your Contract's Verification

After executing the relevant command:

* Visit the Mode explorer ([mainnet](https://explorer.mode.network/) or [testnet](https://sepolia.explorer.mode.network/), as applicable).
* Enter your contract's address in the search bar.
* You should find your contract listed and verified, it should have the green checkmark just like the image below.

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

## Conclusion

And that's it! You've just verified your ERC20 token on the Mode network using Foundry. Not too bad, right? Foundry makes these tasks less of a headache, so you can focus on the fun part: building your project.


# Network Details

## **Mode Mainnet**

<table><thead><tr><th width="292.5">Name</th><th>Value</th></tr></thead><tbody><tr><td>Network Name</td><td>Mode Mainnet</td></tr><tr><td>RPC Endpoint</td><td><a href="https://mainnet.mode.network/">https://mainnet.mode.network/</a></td></tr><tr><td>Chain ID</td><td>34443</td></tr><tr><td>Currency Symbol</td><td>ETH</td></tr><tr><td>Block Explorer</td><td><a href="https://explorer.mode.network/">https://explorer.mode.network/</a></td></tr><tr><td>Bridge</td><td><a href="https://bridge.mode.network/">https://bridge.mode.network/</a></td></tr><tr><td>ETH Mainnet Bridge Contract</td><td><a href="https://etherscan.io/address/0x735aDBbE72226BD52e818E7181953f42E3b0FF21">0x735aDBbE72226BD52e818E7181953f42E3b0FF21</a></td></tr></tbody></table>

## Mode Testnet

| Name            | Value                                    |
| --------------- | ---------------------------------------- |
| Network Name    | Mode Testnet                             |
| RPC Endpoint    | <https://sepolia.mode.network>           |
| Chain ID        | 919                                      |
| Currency Symbol | ETH                                      |
| Block Explorer  | <https://sepolia.explorer.mode.network/> |
| Bridge          | <https://sepolia-bridge.mode.network/>   |


# Add Mode

This guide shows how to add Mode network to your wallet

## Mainnet <a href="#metamask" id="metamask"></a>

To add Mode Mainnet as a custom network to MetaMask:

1. Open the MetaMask browser extension.
2. Open the network selection dropdown menu by clicking the dropdown button at the top of the extension.
3. Click the **Add network** button.
4. Click **Add a network manually**.
5. In the **Add a network manually** dialog that appears, enter the following information:

<table><thead><tr><th width="292.5">Name</th><th>Value</th></tr></thead><tbody><tr><td>Network Name</td><td>Mode Mainnet</td></tr><tr><td>RPC Endpoint</td><td><a href="https://mainnet.mode.network/">https://mainnet.mode.network/</a></td></tr><tr><td>Chain ID</td><td>34443</td></tr><tr><td>Currency Symbol</td><td>ETH</td></tr><tr><td>Block Explorer</td><td><a href="https://explorer.mode.network/">https://explorer.mode.network/</a></td></tr></tbody></table>

You should now be able to connect to the Mode Mainnet by selecting it from the network selection dropdown menu.

## Testnet

#### MetaMask[​](https://docs.base.org/using-base#metamask) <a href="#metamask" id="metamask"></a>

To add Mode Sepolia Testnet as a custom network to MetaMask:

1. Open the MetaMask browser extension.
2. Open the network selection dropdown menu by clicking the dropdown button at the top of the extension.
3. Click the **Add network** button.
4. Click **Add a network manually**.
5. In the **Add a network manually** dialog that appears, enter the following information:

| Name            | Value                                   |
| --------------- | --------------------------------------- |
| Network Name    | Mode Sepolia                            |
| RPC Endpoint    | <https://sepolia.mode.network>          |
| Chain ID        | 919                                     |
| Currency Symbol | ETH                                     |
| Block Explorer  | <https://sepolia.explorer.mode.network> |

6. Tap the Save button to save Mode Sepolia as a network.

You should now be able to connect to the Mode Sepolia testnet by selecting it from the network selection dropdown menu.


# Contract Addresses

Addresses to the main contract addresses

In this section you will find useful contract addresses you may need while developing on Mode.\
\
L1/L2 Contracts are the main contacts from the L1 (Ethereum) and the L2 (Mode) such as the SFS contract, L1Standard Bridge, and more.

Token Addresses has all the official tokens deployed by Mode team, please be careful with other tokens not listed here as they may not be legitimate.

If you would like us to add any other contracts or tokens please let us know in our [Discord](https://discord.gg/modenetworkofficial).


# Tokens

In this page you will find all the official token addresses on Mode Mainnet.

{% hint style="warning" %}
If there are any missing tokens, you can edit this page and submit a PR to github. Click the "Edit on Github" link on the right of this page.
{% endhint %}

{% hint style="info" %}
Pyth Price feed ID for $MODE:\
\
0x0386e113cc716a7c6a55decd97b19c90ce080d9f2f5255ac78a0e26889446d1e\
\
<https://pyth.network/price-feeds/crypto-mode-usd>
{% endhint %}

<table><thead><tr><th width="344">NAME</th><th width="592">ADDRESS</th></tr></thead><tbody><tr><td>MODE</td><td><a href="https://explorer.mode.network/address/0xDfc7C877a950e49D2610114102175A06C2e3167a">0xDfc7C877a950e49D2610114102175A06C2e3167a</a></td></tr><tr><td>mBTC</td><td><a href="https://explorer.mode.network/address/0x59889b7021243dB5B1e065385F918316cD90D46c">0x59889b7021243dB5B1e065385F918316cD90D46c</a></td></tr><tr><td>rsETH</td><td><a href="https://explorer.mode.network/token/0x4186BFC76E2E237523CBC30FD220FE055156b41F">0x4186BFC76E2E237523CBC30FD220FE055156b41F</a></td></tr><tr><td>wrsETH</td><td><a href="https://explorer.mode.network/token/0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd">0xe7903B1F75C534Dd8159b313d92cDCfbC62cB3Cd</a></td></tr><tr><td>weETH</td><td><a href="https://explorer.mode.network/address/0x028227c4dd1e5419d11Bb6fa6e661920c519D4F5">0x028227c4dd1e5419d11Bb6fa6e661920c519D4F5</a></td></tr><tr><td>ezETH</td><td><a href="https://explorer.mode.network/address/0x2416092f143378750bb29b79eD961ab195CcEea5">0x2416092f143378750bb29b79eD961ab195CcEea5</a></td></tr><tr><td>STONE</td><td><a href="https://explorer.mode.network/address/0x80137510979822322193FC997d400D5A6C747bf7">0x80137510979822322193FC997d400D5A6C747bf7</a></td></tr><tr><td>USDC</td><td><a href="https://explorer.mode.network/token/0xd988097fb8612cc24eeC14542bC03424c656005f">0xd988097fb8612cc24eeC14542bC03424c656005f</a></td></tr><tr><td>USDT</td><td><a href="https://explorer.mode.network/token/0xf0F161fDA2712DB8b566946122a5af183995e2eD">0xf0F161fDA2712DB8b566946122a5af183995e2eD</a></td></tr><tr><td>weETH.mode (wrapped eETH)</td><td><a href="https://explorer.mode.network/token/0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A?tab=token_transfers">0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A</a></td></tr><tr><td>WETH</td><td><a href="https://explorer.mode.network/address/0x4200000000000000000000000000000000000006"><strong>0x4200000000000000000000000000000000000006</strong></a></td></tr><tr><td>WBTC</td><td><a href="https://explorer.mode.network/address/0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF">0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF</a></td></tr><tr><td>UNI</td><td><a href="https://explorer.mode.network/address/0x3e7eF8f50246f725885102E8238CBba33F276747">0x3e7eF8f50246f725885102E8238CBba33F276747</a></td></tr><tr><td>SNX</td><td><a href="https://explorer.mode.network/address/0x9e5AAC1Ba1a2e6aEd6b32689DFcF62A509Ca96f3">0x9e5AAC1Ba1a2e6aEd6b32689DFcF62A509Ca96f3</a></td></tr><tr><td>LINK</td><td><a href="https://explorer.mode.network/address/0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb">0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb</a></td></tr><tr><td>DAI</td><td><a href="https://explorer.mode.network/address/0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea">0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea</a></td></tr><tr><td>BAL</td><td><a href="https://explorer.mode.network/address/0xD08a2917653d4E460893203471f0000826fb4034">0xD08a2917653d4E460893203471f0000826fb4034</a></td></tr><tr><td>AAVE</td><td><a href="https://explorer.mode.network/address/0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2?tab=txs">0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2?</a></td></tr></tbody></table>


# L1/L2 Mainnet Contracts

Ethereum and Mode Mainnet useful contract addresses

{% hint style="warning" %}
These are Mainnet contract addresses. If you want to add a missing one please submit a PR to [this repo](/) with your changes.
{% endhint %}

| Name                              | Address                                                                                                                                     |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| $MODE Staking Contract            | [0x74B847b308BD89Ef15639E6e4a2544E4b8b8C6B4](https://explorer.mode.network/address/0x74B847b308BD89Ef15639E6e4a2544E4b8b8C6B4?tab=tokens)   |
| SFS Contract                      | [0x8680CEaBcb9b56913c519c069Add6Bc3494B7020](https://explorer.mode.network/address/0x8680CEaBcb9b56913c519c069Add6Bc3494B7020?tab=txs)      |
| Pyth Oracle contract              | [0xA2aa501b19aff244D90cc15a4Cf739D2725B5729](https://explorer.mode.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729)              |
| Supra Pull Oracle contract        | [0x2FA6DbFe4291136Cf272E1A3294362b6651e8517](https://explorer.mode.network/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517?tab=contract) |
| Redstone Oracles Price Feeds      | [0x7C1DAAE7BB0688C9bfE3A918A4224041c7177256](https://explorer.mode.network/address/0x7C1DAAE7BB0688C9bfE3A918A4224041c7177256?tab=txs)      |
| OptimismMintableERC20FactoryProxy | 0x69216395A62dFb243C05EF4F1C27AF8655096a95                                                                                                  |
| OptimismMintableERC20Factory      | 0xc0c6A811BBf07FA01b946F1C46a9A94c2eE8C73E                                                                                                  |
| SystemConfig                      | 0x951754B08C52b2aC5d5a2aF1D52C2D12aED5Bcaf                                                                                                  |
| SystemConfigProxy                 | 0x5e6432F18Bc5d497B1Ab2288a025Fbf9D69E2221                                                                                                  |
| L1ERC721BridgeProxy               | 0x2901dA832a4D0297FF0691100A8E496626cc626D                                                                                                  |
| L2OutputOracle                    | 0x6093023a4A7E6873EDFb02B4bCE48c53FD310EEc                                                                                                  |
| L1CrossDomainMessenger            | 0x14DdD08c0e28764FC89a266eC95A93619b0EE835                                                                                                  |
| OptimismPortalProxy               | 0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07                                                                                                  |
| L1CrossDomainMessengerProxy       | 0x95bDCA6c8EdEB69C98Bd5bd17660BaCef1298A6f                                                                                                  |
| OptimismPortal                    | 0xad3DC277d3242938F8Be18f0560e3d9B9988C46A                                                                                                  |
| L2OutputOracleProxy               | 0x4317ba146D4933D889518a3e5E11Fe7a53199b04                                                                                                  |
| ProxyAdmin                        | 0x470d87b1dae09a454A43D1fD772A561a03276aB7                                                                                                  |
| L1ERC721Bridge                    | 0x8b91Af069928bA6591c950354d1EA29e08192Bf8                                                                                                  |
| L1StandardBridge                  | 0x9c67ACcb38137CB761587032179b176c9276Eb5a                                                                                                  |
| AddressManager                    | 0x50eF494573f28Cad6B64C31b7a00Cdaa48306e15                                                                                                  |
| L1StandardBridgeProxy             | 0x735aDBbE72226BD52e818E7181953f42E3b0FF21                                                                                                  |
| L2CrossDomainMessenger            | [0x4200000000000000000000000000000000000007](https://explorer.mode.network/address/0x4200000000000000000000000000000000000007?tab=txs)      |
| L2StandardBridge                  | [0x4200000000000000000000000000000000000010](https://explorer.mode.network/address/0x4200000000000000000000000000000000000010)              |


# Testnet Contracts

This page shows useful testnet contract addresses for Mode Sepolia Testnet and ETH Sepolia Testnet.

## Ethereum **Sepolia Testnet and Mode Testnet Contract Addresses**

<table><thead><tr><th width="304">Name</th><th>Address</th></tr></thead><tbody><tr><td>$MODE testnet token</td><td><a href="https://sepolia.explorer.mode.network/token/0x4FFa6cDEB4deF980b75e3F4764797A2CAd1fAEF3">0x4FFa6cDEB4deF980b75e3F4764797A2CAd1fAEF3</a></td></tr><tr><td>Pyth Oracle Price Feed</td><td><a href="https://sepolia.explorer.mode.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729">0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</a></td></tr><tr><td>SFS Contract</td><td><a href="https://sepolia.explorer.mode.network/address/0xBBd707815a7F7eb6897C7686274AFabd7B579Ff6">0xBBd707815a7F7eb6897C7686274AFabd7B579Ff6</a></td></tr><tr><td>Proxy__OVM_L1StandardBridge</td><td>0xbC5C679879B2965296756CD959C3C739769995E2</td></tr><tr><td>L2StandardBridge</td><td>0x4200000000000000000000000000000000000010</td></tr><tr><td>L1ERC721Bridge</td><td>0x7Bf471d9181AD783c7510243D1B0EBc6f29e9a81</td></tr><tr><td>SystemDictator</td><td>0x92fE7f11452D8fff92ebfFb47036e0443ea110F1</td></tr><tr><td>PortalSender</td><td>0xd1b3CBdB812712d71F5440Af34bf605b34b6c21C</td></tr><tr><td>L1StandardBridge</td><td>0x98C41994F0b4DcCD52fad6BfeA6615de34C2ce0f</td></tr><tr><td>Lib_AddressManager</td><td>0x83D45725d6562d8CD717673D6bb4c67C07dC1905</td></tr><tr><td>L2OutputOracleProxy</td><td>0x2634BD65ba27AB63811c74A63118ACb312701Bfa</td></tr><tr><td>OptimismMintableERC20FactoryProxy</td><td>0x00F7ab8c72D32f55cFf15e8901C2F9f2BF29A3C0</td></tr><tr><td>Proxy__OVM_L1StandardBridge</td><td>0xbC5C679879B2965296756CD959C3C739769995E2</td></tr><tr><td>ProxyAdmin</td><td>0xE7413127F29E050Df65ac3FC9335F85bB10091AE</td></tr><tr><td>OptimismMintableERC20Factory</td><td>0x0f5908861962DfFaB7e4d9a1c9F513F1988E8dCC</td></tr><tr><td>OptimismPortal</td><td>0xd9B9DCE20d7837379cbD4Fa1a58Bc70E595bb9a5</td></tr><tr><td>Proxy__OVM_L1CrossDomainMessenger</td><td>0xc19a60d9E8C27B9A43527c3283B4dd8eDC8bE15C</td></tr><tr><td>L1ERC721BridgeProxy</td><td>0x015a8c2e0a5fEd579dbb05fd290e413Adc6FC24A</td></tr><tr><td>SystemConfig</td><td>0x2238382DCEA03f024993c8a0355917c80B20301F</td></tr><tr><td>OptimismPortalProxy</td><td>0x320e1580effF37E008F1C92700d1eBa47c1B23fD</td></tr><tr><td>L1CrossDomainMessenger</td><td>0x9B800c1e8b61Aa9D141BCD317dDe7849F7A043E5</td></tr><tr><td>L2OutputOracle</td><td>0xEeBD920aE8444C4F5d6aD07879cCBeb53663d93A</td></tr><tr><td>SystemDictatorProxy</td><td>0x20c608922171A06A7bC5448acf6197fEE7448a8b</td></tr><tr><td>SystemConfigProxy</td><td>0x15cd4f6e0CE3B4832B33cB9c6f6Fe6fc246754c2</td></tr></tbody></table>

## **Uniswap V3 Contract Addresses**

<table><thead><tr><th width="306">Name</th><th>Address</th></tr></thead><tbody><tr><td>weth9</td><td>0xeb72756ee12309Eae82a0deb9787e69f5b62949c</td></tr><tr><td>factory</td><td>0x879A0F1E8402E37ECC56C53C55B6E02EB704eDD4</td></tr><tr><td>router</td><td>0x9eE1289c21321E212994B23Bf0b4Cdc453C17EEE</td></tr><tr><td>nftDescriptorLibrary</td><td>0x5e768819Cf3a393345d71D3533E64A4A925F23a9</td></tr><tr><td>positionDescriptor</td><td>0x998dC24E97762BC27f855e5890A0695cad1a3541</td></tr><tr><td>positionManager</td><td>0x824B5ea461dd695c9bE0AAE07115D1aA1cf737DC</td></tr></tbody></table>

## **Uniswap V2 Contract Addresses**

<table><thead><tr><th width="310">Name</th><th>Address</th></tr></thead><tbody><tr><td>UniswapV2Factory</td><td>0x9fBFa493EC98694256D171171487B9D47D849Ba9</td></tr><tr><td>UniswapV2Router02</td><td>0x5951479fE3235b689E392E9BC6E968CE10637A52</td></tr></tbody></table>


# Bridge

Mode's canonical bridge is a fork of Optimism's bridge. The bridge only allows moving funds from Mode to Ethereum Mainnet and viceversa. The tokens supported for now are ETH, USDC, USDT and WBTC.\
\
The ETH bridged from Ethereum mainnet to Mode is ETH on Mode mainnet as well, it's not a wrapped version as it is the base token of Mode.

We refer to "Deposit" when bridging from L1 to the L2 - [Bridge to Mode](/user-guides/bridge/bridge-to-mode)\
\
We refer to "Withdrawal" when bridging from L2 to the L1 - [Bridge from Mode](/user-guides/bridge/bridge-from-mode)\\


# Bridge to Mode

How to bridge ETH to Mode

{% hint style="warning" %}
Withdrawal of funds from Mode will take up to 7 days due to Mode's optimistic rollup nature. Keep this in mind before Bridging.
{% endhint %}

## **To bridge funds to Mode you can use our** [**Bridge**](https://app.mode.network/)**.** <a href="#metamask" id="metamask"></a>

<details>

<summary>☢️ <strong>Programatically Deposit via the Mode Bridge</strong></summary>

Bridging to Mode Mainnet Programatically is for experienced users only:\
\
\- **Only send ETH from the Ethereum Mainnet network:** Sending ETH from any other network will also result in unrecoverable loss of assets.\
\
\- **Do not send from Centralized Exchanges:** The bridge sends the ETH to the address that sent the ETH. If you send from an exchange, you will lose your assets and they will be sent to the exchange's address in Mode Network resulting in unrecoverable loss.\
\
In order to bridge you just need to send ETH to the Bridge contract in the Ethereum Mainnet network and it will bridge the tokens to the Mode Mainnet network. Please note that this process might take up to 10 minutes to complete.\
\
This is the Mainnet Bridge address on Ethereum:\
\
[0x735aDBbE72226BD52e818E7181953f42E3b0FF21](https://etherscan.io/address/0x735aDBbE72226BD52e818E7181953f42E3b0FF21)

</details>


# Bridge from Mode

Bridging ETH from Mode to Ethereum

Mode's bridge is a fork of Optimism's canonical bridge. With Optimism's Bedrock upgrade, a two-step withdrawal process designed to enhance the safety and integrity of cross-chain transactions was introduced.

{% hint style="info" %}
You can check the status of your withdrawal in the [Transactions](https://app.mode.network/transactions/) section.\
\
The 7 day withdrawal period is due to how optimistic rollups work, it's called the challenge period. Read more about it [here](https://docs.optimism.io/builders/app-developers/bridging/messaging)
{% endhint %}

<details>

<summary>1 - Bridge to Ethereum</summary>

First, go to [Mode's Bridge](https://app.mode.network/), click on **`Switch`** and select the token and input the amount you want to withdraw.

Click on <mark style="color:purple;">**`Review Withdrawal`**</mark> , then check the 7 days checkbox and initiate the withdrawal.

You can see the transaction status of your withdrwal in the [<mark style="color:purple;">**`Transactions`**</mark>](https://app.mode.network/transactions/) section

![](/files/Uj0Ni8hu9SPuyG209nTR)

**Please wait up to 1 hour until the status of your tx is ready to prove.**

</details>

{% hint style="danger" %}
The steps to Prove and Finalize withdrawals are executed on Ethereum Mainnet. You will need ETH on Ethereum Mainnet to pay for these fees. This is also why these fees may seem high.\
\
Make sure you have ETH on Ethereum to pay for gas.
{% endhint %}

<details>

<summary>2 - Prove Withdrawal</summary>

After waiting for 1 hour, your transaction should be ready to "Prove withdrawal".

<img src="/files/XYnzkYmEF1CnomAfMfUx" alt="" data-size="original">\
\
Now click <mark style="color:purple;">**`Prove`**</mark> and submit the transaction, this will start the[ 7 day waiting period for the withdrawal.](#user-content-fn-1)[^1]

</details>

<details>

<summary>3 - Finalize Withdrawals</summary>

After proving the transaction you will have to wait 7 days until the status of the transaction is ready to finalise.\
\
![](/files/COG5UmB7H6N2K5qvzHGy)\
\
You can now click <mark style="color:purple;">**`Claim`**</mark> and after approving the transcation you should see the funds in your wallet on the Ethereum network shortly.\
\
The fees paid here are on Ethereum network.

</details>

[^1]: The waiting period will only start counting after proving the withdrawal.


# Bridging to Testnet

How to bridge assets to Mode Testnet

{% hint style="info" %}
There are 2 ways to get Sepolia ETH on Mode Sepolia Testnet:\
\
1\. Bridging Sepolia ETH from Ethereum Sepolia Testnet to Mode's Sepolia Testnet.\
2\. Using a Mode Sepolia ETH faucet. [Testnet Faucets](/tools/testnet-faucets)
{% endhint %}

## Depositing Sepolia ETH

You can instantly deposit Testnet ETH by following the following steps:

1. Visit the [**Mode Testnet Bridge**](https://sepolia-bridge.mode.network/)
2. Connect your Metamask wallet to the Mode Bridge.
3. Open the network selection dropdown menu by clicking the dropdown button at the top of the extension and click on Sepolia Testnet.
4. Send Sepolia Testnet ETH to Mode Testnet using the Mode Bridge.
5. Open the network selection in Metamask and go to Mode Testnet to view the ETH in your Mode account.


# Move to/from CEX

Deposit or Withdraw USDC, USDT or ETH between your favorite centralized exchanges and Mode!

## Introduction - Global Addresses

Mode leverages [ZeroDev’s Global Address](https://global-address.zerodev.app/) system to make transferring funds between Mode and centralized exchanges (CEXs) simple and flexible. A global address is a unique, chain-abstracted account that lets you send and receive assets (like USDC, USDT, and ETH) across different chains without the need for traditional bridging.

For Mode users, this means that moving funds to and from CEXs like Binance or Coinbase is seamless. By creating a global address, you can manage your assets across multiple chains as one unified balance, enabling fast and efficient transfers no matter where your assets are held.\
\
You can read [ZeroDev's documentation](https://zerodev.app/) to know more.

## Send funds from CEX to Mode

1. Select your Mode 0x address and paste it into the Receiver Address box on <https://global-address.zerodev.app/> and select Mode Mainnet as the Target Chain.\
   \
   Click Create a Global Address.

<figure><img src="/files/r68zo1zusRgP0jO7cnHh" alt="" width="375"><figcaption><p>Global Address creation</p></figcaption></figure>

2. Visit your favorite centralized exchange (Binance, Bybit, Coinbase, OKX, etc.)

   \
   Select your balance of USDC, USDT or ETH and click Send or Withdraw.\\
3. Choose the cheapest chain to withdraw to between Base, OP Mainnet, Polygon, Arbitrum One, Scroll, and Ethereum.\\

   For example, withdrawing from Coinbase to Base is typically free. :wink:\\
4. Choose the desired amount and paste **your Global Address you created** in Step 1 as the destination.

{% hint style="danger" %}
Before sending your transaction, please double check that:\
\
1\. You are sending supported funds to a supported chain. Check all the combinations [here](https://zerodev.notion.site/ZeroDev-Global-Address-Supported-Tokens-137e616047d18088a11cc84ab56fc5cc).\
\
2\. You are sending the funds to your generated Global Address.\
\
3\. The target chain of the Global Address is pointing to Mode Mainnet\
\
Mistakes can lead to the loss of funds.
{% endhint %}

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

5. Click Send and proceed with any additional verification steps required by your exchange.

{% hint style="success" %}
PRO TIP:\
\
While trying this flow for the first time, it's always recommended to send a small test transaction to make sure everything is working smoothly.
{% endhint %}

\
Wait a few moments and enjoy your deposit directly to Mode! 💛\\

## Send funds from Mode to CEX

1. Visit your favorite centralized exchange (Binance, Bybit, Coinbase, OKX, etc.)\\

   Select your balance of USDC, USDT or ETH and click Receive or Deposit.\\
2. Choose the **fastest** chain to receive/deposit from between Base, OP Mainnet, Polygon, Arbitrum One, Scroll, and Ethereum. This will be your Target Chain in the following step.\\
3. Select your exchange receiver `0x` address for USDC, USDT or ETH and paste it into the Receiver Address box on <https://global-address.zerodev.app/> and select the chain you selected in Step 2 as the Target Chain.

<figure><img src="/files/r68zo1zusRgP0jO7cnHh" alt="" width="375"><figcaption><p>Global address creation</p></figcaption></figure>

4. Open your wallet on Mode.\
   \
   Select your balance of USDC, USDT or ETH and click Send or Withdraw. \\
5. Paste your Global Address you created in Step 3 as the destination. You will be sending funds from your wallet on Mode to the global address you just created.

{% hint style="danger" %}
Double check the Target Chain matches the chain your exchange is expecting to receive the deposit from (Step 2).\
\
**Failing to do this can result in loss of funds.**
{% endhint %}

6. Click Send and proceed with checking and signing the transactions. (Consider sending a test amount.)\
   \
   \
   Wait a few moments and enjoy your deposit directly from Mode! 💛


# MODE Tokenonomics

Mode’s tokenomics have been designed to decentralize Mode and reward users and developers that contribute to growing the Mode ecosystem.

**MODE Token**

Ticker: $MODE\
Contract Address: [0xDfc7C877a950e49D2610114102175A06C2e3167a](https://explorer.mode.network/token/0xDfc7C877a950e49D2610114102175A06C2e3167a)\
Total Supply: 10,000,000,000\
Current Circulating Supply: 2,500,000,000 \\

**MODE Token Utility**

MODE will be used to govern and grow the Mode protocol and ecosystem through:

* Mode Governance
* User and Developer Campaigns
* DeFi Integration Grants
* Community Grants
* Growing the Mode ecosystem

\
**Tokenonomics**

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

**User and Developer Airdrops:** 35%

Allocated to users and developers that contribute to growing the Mode ecosystem.

* 5.5% of the supply has been allocated to Mode users and developers for Airdrop 1
* 5% of the supply has been allocated to Mode users and developers for Airdrop 2
* The remaining will be allocated to future airdrops

**Investors:** 19%

Mode investors from past and future investment rounds.

* Investor allocations are subject to 12-month cliff from TGE followed by a 24-month linear vest

**Core Contributors:** 19%

Mode core contributors that contribute to developing the Mode ecosystem

* Core contributor allocations are subject to 12-month cliff from TGE followed by a 24-month linear vest

**Foundation and Onchain Treasury:** 27%

* The Foundation allocation will be used to fund initiatives to grow MODE network
* The Onchain Smart Treasury will be allocated MODE tokens by the Foundation on an ongoing basis decided by governance. The Onchain Smart Treasury will stream tokens to applications to be used as user incentives.

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

**Token Distribution Details**

Total supply of 10,000,000,000 tokens. The token supply is fixed.

In Year 1, Mode Foundation's core goal is to distribute tokens to users and developers that grow the ecosystem in addition to developing the onchain treasury. From Year 2 onwards governance will manage distributions.

The Mode foundation estimates the total supply of circulating MODE tokens to increase as [detailed in this sheet (opens new window).](https://docs.google.com/spreadsheets/d/1iU4irsKAIhLdNqkJCC00gMmwVZD_L9nxJOsYqk9Dl9c/edit#gid=470961921)


# 1️⃣ Season 1 (ended)

{% hint style="info" %}
Check your Season 1 points here - [MODE Season 1 Points](https://docs.google.com/spreadsheets/d/1zW1j6KTjx-hP9MhXlfS8xg46Ul8QzywcEf4S8u-ktfg)\
Points will be converted to $MODE and claimable on the 7th May
{% endhint %}

Airdrop Season 1 will conclude on the 5th May. Airdrop 2 begin on the 5th May 2024 and run until 6th September 2024.

User points from Airdrop 1 will be converted to MODE tokens and claimable on the 7th May at approximately 11.00am UTC at [claim.mode.network](https://claim.mode.network/)

The top 2,000 wallets by points will receive 50% MODE at launch and 50% MODE after 90 days. User assets must stay in the ecosystem through this period to earn the second tranche of tokens and this will be assessed on a pro-rata basis. For example if a vested user exits after 45 days they will receive 50% of the second tranche of tokens and 50% will be forfeited. Any tokens forfeited will be reallocated to other participants in Airdrop 2.

There will be a minimum amount of points required to qualify for the airdrop to reduce sybils.

Users will have 30 days to claim tokens from Airdrop 1 and unclaimed tokens will be allocated to future rewards for users and developers on Mode.

Users who participated in Airdrop 1 and continue to participate in Airdrop 2 will receive a significant multiplier.

## FAQ - Season 1

<details>

<summary><strong>How do I claim MODE?</strong></summary>

You will be able to claim MODE from [claim.mode.network](https://claim.mode.network/) on the 7th May. Exact times will be shared closer to the launch date.

*Please be vigilant and do not click on any links from 3rd parties. The official link will be posted on the Mode Dashboard.*

</details>

<details>

<summary><strong>Is there a minimum amount of points needed to claim an airdrop?</strong></summary>

The minimum points needed to qualify is 250 points

Any user that had pre-check points but did not bridge to Mode did not meet the minimum requirements

</details>

<details>

<summary><strong>How long do I have to claim my MODE tokens?</strong></summary>

Users have 30 days to claim MODE tokens from the initial claim date.

</details>

<details>

<summary><strong>How do I know if I am in the top 2000 wallets and have 50% vested tokens?</strong></summary>

Users with vested tokens can visit the Mode Dashboard on the 7th May and will see claiming instructions for the first 50% and instructions for the claiming the second vested 50% tranche will be released very soon.

</details>

<details>

<summary><strong>If I have vested MODE and I bridge off Mode will I forfeit all my MODE?</strong></summary>

If a user has vested MODE tokens they will only receive the full amount for the vested tranche if they keep assets on Mode. Assets on Mode/TVL snapshots were taken on 29th April and 2nd May.\
\
If a user bridges off Mode during the vesting period they will receive a pro-rata amount of tokens based on the time and assets on Mode during the vesting period.\
\
Examples:\
\
A user that bridges off Mode at the start of Season 2 and does not bridge back will forfeit their vested tokens. The tokens forfeited will be added to the total tokens available for Airdrop 2.\
\
A user that keeps their assets on Mode for 45 days and then bridges off Mode will receive 50% of their vested tokens.\
\
A user that keeps their assets on Mode for 45 days and bridges off for 22.5 days, then bridges back their assets for 22.5 days will receive 75% of their vested tokens.

</details>

<details>

<summary><strong>If I have vested tokens and I bridged off Mode in Season 1 and now have a smaller amount of assets on Mode what will be the asset base for the vesting period?</strong></summary>

Ongoing Snapshots have been taken of the top wallets during Season 1. If a user bridged off Mode then they may not receive the full vested amount of tokens. Users can bridge back at anytime to be eligible through the vesting period on a pro-rata basis.

</details>

<details>

<summary><strong>If I have vested tokens are you tracking TVL in $ on Mode or the balance of assets in a wallet on Mode?</strong></summary>

For users with vesting we track the assets in a wallet overtime. If a user is active onchain and does not move assets to another wallet or bridge off Mode then they will receive their full vesting. If not they will receive a pro-rata amount.

</details>

\
\\

\
\
\
\
\
\
\
\
\
\\


# 2️⃣ Season 2 (ended)

Airdrop 2 began on May 5th, 2024, and runs until October, 2024.

{% hint style="info" %}
Season 2 Airdrop is live, you can check your status on your [Mode Dashboard here.](https://app.mode.network/early/)
{% endhint %}

**Summary:**

* 500,000,000 MODE tokens, 5% of MODE total supply available. This amount will be increased.
* Up to 1,000,000 in OP tokens incentives
* MODE staking is available to earn points multipliers and ecosystem airdrops

Airdrop Season 2 is designed to reward users and developers that continue to grow the Mode ecosystem.

Airdrop 2 has been allocated **500,000,000 MODE tokens (5% of MODE total supply),** in addition up to 1,000,000 OP tokens will be available through various incentive campaigns.

This campaign will align incentives with growing Mode into a leading L2 network and DeFi Hub for the Optimism Superchain and Ethereum ecosystem.

## Earning points in season 2

<details>

<summary>1. Assets on Mode and Asset Multipliers</summary>

All users on Mode get **70.5 points** per ETH or $ equivalent indexed token per week. Users can see which tokens are indexed on their Mode dashboard.

Asset multipliers may be applied to help new assets bootstrap on Mode. Asset multipliers are available on the Mode Dashboard.

**Assets on Mode:**

* **2x Mode Points** – $MODE
* **1.2x Mode Points** – ezETH, weETH.mode, MBTC, rsETH, STONE/CSTONE
* **1x Mode Points** – All other assets shown on the Mode Dashboard

*\*\*This is tracked and will be reflected in your points from May 7th*

</details>

<details>

<summary>2. Dapp and Asset Mode Points Multipliers</summary>

Users on Mode can earn multipliers on base asset points when they add assets to applications that are shown on the Mode Dashboard.

The following multipliers are being applied in season 2.

**DEXs:**

* **5x Mode Points** – All $MODE pools + ETH/USDC pair
* **3x Mode Points** – All other DEX Liquidity Pools

**Lending Protocols:**

* **3x Mode Points** – All $MODE pools
* **2x Mode Points** – All other lending pools

*\*\*This is being tracked and awarded from May 7th, but will not be reflected in your Daily Points update until next week.*

</details>

<details>

<summary>3. $MODE Staking Multipliers</summary>

Users will be able to stake their $MODE tokens to earn a Global Multiplier on all of their activities for Season 2.

* If users stake $MODE greater than 50% of the value of their total Assets on Mode (updated daily) – **they will receive a 1.5x multiplier on all Mode Points**
* If users stake $MODE greater than 25% of the value of their total Assets on Mode (updated daily) – **they will receive a 1.25x multiplier on all Mode Points**
* e.g. if the user had a portfolio value of $100k on Mode today, they would need to stake $25k or more of $MODE to be eligible for the 1.25x multiplier.

Read more in [Staking](/usdmode/staking)

In addition, users that stake $MODE can earn airdrops from ecosystem teams and in the future staking $MODE will earn revenue via restaking to secure Mode’s L3 ecosystem.

*\*\*This is being tracked and awarded from May 7th, but will not be reflected in your Daily Points update until later this week.*

</details>

<details>

<summary>4. Transaction Fee Points</summary>

As with Airdrop 1, users receive Mode Points for transaction fees paid on Mode. These fees are calculated by the gas spent when interacting with protocols to trade, swap, stake, lend and mint on Mode.

</details>

<details>

<summary>5. Volume points</summary>

Volume points aim to reward users for their transaction volumes across key pools on Kim, Supswap, SwapMode, Velodrome, and more with a share of 5 million points daily. These points will be distributed based on the users' share of the volume for that day. We run the calculations daily.

#### Why do we do it?

The primary goal of Activity Points is to incentivize genuine transaction volumes on Mode. By excluding volumes from smart contracts, including multisig wallets, we ensure that rewards are allocated to individual users who actively participate and contribute to our ecosystem. This helps maintains the integrity of our reward system and fosters a more engaged community.

**How does it work?**

1. **Participation**: Users swap tokens within designated pools on supported dapps. Check volume pairs support in [#supported-volume-pairs](#supported-volume-pairs "mention")
2. **Volume Calculation**: The total volume from these pools is aggregated daily.
3. **Point Distribution**: Points are distributed based on each user’s share of the total daily volume. For example, a volume of 10 ETH will contribute to the user’s share of the total daily volume, impacting their points accordingly.

**Key Details**

* **Start Time**: Activity Points start accumulating from Block 9227209.
* **Daily Updates**: Calculations are confirmed daily at 11am UTC, and users can view their updated Activity Points on their dashboard at approximately 11.05am UTC.

**Additional Information**

For more details and to check eligibility, visit our [Dashboard](https://app.mode.network/early/). Stay tuned for further updates as we continue to enhance our platform and deliver value to our community.

</details>

## Supported Volume pairs

<table><thead><tr><th>PAIR</th><th>kimv4</th><th>swapmode</th><th>supswap</th><th>izumi</th><th>velodrome</th><th>kimv2</th><th>BetMode</th><th data-hidden>multiplier</th><th data-hidden>mantissa</th></tr></thead><tbody><tr><td>ETH/USDC</td><td>0x468cc91df6f669cae6cdce766995bd7874052fbc</td><td>0x50273860341bb80de359cd391bef9b2eb228753c</td><td>0x0a736e361ab594d7c0c692eb9c5c86b75d6f666c, 0x9aa04739b93ff30eda4080d3e62c2d161f8dda44, 0xd87f0dd632cce09e3f78919c4399f4676bdaab9d, 0xf2e9c024f1c0b7a2a4ea11243c2d86a7b38dd72f</td><td>0x360bb3448d39bc614de5dc05cf299679181fa8aa,<br>0xe3bed2358e4aabb4b4f835a222cc4a6c71493a2e</td><td>0xcc16bfda354353b2e03214d2715f514706be044c</td><td>0x293f2b2c17f8cea4db346d87ef5712c9dd0491ef</td><td>-</td><td>1</td><td>-</td></tr><tr><td>weETH/WETH</td><td>0xe24c8feb38ca2b18b542994bfba7e70880171035</td><td>0x3a7f9f4e5917d0342e49988e0516ecd7e946e718</td><td>0x07ba129b00a91e7b9f9c505c263ac6b2c453a5ea,<br>0x29f0ea0266931831a9cdadfa65931bc01c06dd5b,<br>0xead81d090870a5293131095f0b351a006183c03f,<br>0xf6772e0fe8c7cb9c0b9900a46d463c9e352f3dc8</td><td>0x308b4e527cd958d11314f829397149a0cb70b044,<br>0xe1b5f93e72bcb6891e63ca0f1e25fc13c64c2203</td><td>0x53e85d00f2c6578a1205b842255ab9df9d053744</td><td>0x62c08a8f137195e1ef89fc02a74654c3b76f57c3</td><td>-</td><td>1</td><td>-</td></tr><tr><td>ezETH/WETH</td><td>0xd9a06f63e523757973ffd1a4606a1260252636d2</td><td>0xd5cfdbc1d0e93b04c92f0e4f0c6270b8a5632d05</td><td>0x00551f0ee010f73c4760de6558019f15c2b222e5, 0x7a55c67aaf235cc6620f207a7da74438aac0b58e, 0xcb4aed6bfb7698ef034b01b59123178cab5270c6, 0xde1f05455c3223c5cdab8953a6a7ae55634eb892</td><td>0x3c31ba7d08807c1b511de87729a2dd780490f378,<br>0x82696a001c1c7782fe761bbf15b5af46ba34c261</td><td>0x44c6ccea1f549dc28bacec12edec580f8e1b64cd,<br>0xf05b706826b50122b35cafd31c95ff7a3d6d078e</td><td>0x812d54d483bf049980af7ceb57dbf77fa186d063</td><td>-</td><td>1</td><td>-</td></tr><tr><td>MODE/WETH</td><td>0x8cfe2a02dfbabc56ae7e573170e35f88a38bea55</td><td>0xd724540f997337100b0da0ce5a8df39f15fbb7b3</td><td>0x5af5c0d446468a55efcf26d8e1d291b175751645</td><td>0xd0b3bd22f520d5dd3f5c6135dd9097149e463dc1,<br>0x250f5d65a75459f04f1b8654855ae85364f1ff9b</td><td>0x0fba984c97539b3fb49acda6973288d0efa903db</td><td>0x813f4f7bd6b278fca601cac8d548bf1daca96e44</td><td>-</td><td>1</td><td>-</td></tr><tr><td>KIM/WETH</td><td>0x3c3a173984e3152fed868345904ec0c9325fa516</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0xc5140f1a2baa2055f210a77422a0d473a4b170d6</td><td>-</td><td>1</td><td>-</td></tr><tr><td>ION/WETH</td><td>0x0f73de1ddbe848853f27cbf6e2b4f9e95bf48685</td><td>0xbd2b4eccfbdefe72ac0fef2e1f8d8568af3c157b</td><td>-</td><td>-</td><td>0xc6a394952c097004f83d2dfb61715d245a38735a</td><td>0x61d93e14d8221b5ebaf480c3b1dce6da7491d9e2</td><td>-</td><td>1</td><td>-</td></tr><tr><td>wrsETH/WETH</td><td>0x27f0976b26194c448d987c275bb409eab6083964</td><td>0x7794a80b2d36f35239bd2fcc77ca0e2d2e47d9a3</td><td>0xaa0e56779aef399910f6accbf9f551d94a61c1fd, 0x02505c0db3a15b61cbbe497f5ce8a09b3b9e72a4</td><td>-</td><td>-</td><td>0xd64da7fe45436e9be04c9ff3ccbbc5e1751fb872</td><td>-</td><td>1</td><td>-</td></tr><tr><td>USDT/WETH</td><td>0xd8abc2be7ad5d17940112969973357a3a3562998</td><td>0xe1b9041bc284651bbb7a8bd0b2edbfbdf56d2fdc</td><td>0x4aeeca350f08b546ce1451b3a128f5cc8991a80c, 0x962e5982c1507af4ea5af2d6a25774f6e93b50d4, 0xde7f9b8b6c1756f1b6d3da65afa922c978caa5dc, 0xf560a076be74308bb78d3c6b51345cf4457e49a9</td><td>0xad03a64095d15acdbd3f14a2624533e365874b83,<br>0x49384ba5a4f047e0466e5e799386e45fd5bd53a4</td><td>0x8b4b4f47e62e7bd8b36a5ef6ebd2ac9d2ddd0b0f</td><td>0xf4c85269240c1d447309fa602a90ac23f1cb0dc0</td><td>-</td><td>1</td><td>-</td></tr><tr><td>WBTC/WETH</td><td>0x15173cca4c4c4e5a3f4b5c0e81a1aef7c0bd6ede</td><td>0xc8dab61bc9d83123649691120d1c8350e41abd60</td><td>0x42ff7320a5bf8d4321c5d97e63bdde9bead43a19</td><td>-</td><td>0x77819dcdf28eb9c885fe26b444277c84d51722d4</td><td>0x98514bc2629061a8a4fd0f9b07766200dcf461c4</td><td>-</td><td>1</td><td>-</td></tr><tr><td>MBTC/WETH</td><td>0x79bcc8cf4b017e445293b28d256f40558797a876</td><td>0x03108a2efdd0b74293c4dd40b24f72e4f6d7f610</td><td>0x8836f7741214aced46d928158b01f3bce11e14c3, 0xf9cd7bf85dbbf20d786068dd17210b471cf10f69</td><td>0xb4fc23240766d1671cb1487063c9cfbe340c31a2</td><td>-</td><td>0x84b8953bb9d77a24559226e16ce217c5ca166d88</td><td>-</td><td>1</td><td>-</td></tr><tr><td>STONE/WETH</td><td>0x2509aebb0ea268439bf7aaabe52e621277a76933</td><td>0x71750e746db0ed0c6df9d9b88f36ebc5eafe295d</td><td>-</td><td>-</td><td>0x5613b76ed4cf65d771baa5e68cea787a8ff43cad</td><td>0xf06bccc951811e6a56ba71c2c7447f7e2b1d0c32</td><td>-</td><td>1</td><td>-</td></tr><tr><td>KIM/MODE</td><td>0x86d9d9dd7a2c3146c6fad51646f210cb2e5fc12f</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0x6d2c0e67bb0c34f96e7d6903841f40da1c80ed76</td><td>-</td><td>1</td><td>-</td></tr><tr><td>ION/MODE</td><td>0x2a5475ee65599064a53724255b5066bbb21eb165</td><td>0x610fd7a0fa1e3ea319ed293d2944036826dbfa39</td><td>-</td><td>-</td><td>0x690a74d2ec0175a69c0962b309e03021c0b5002e</td><td>0x07a494212abaf9551121384d31ea553fd6034fdf</td><td>-</td><td>1</td><td>-</td></tr><tr><td>SMD/ETH</td><td>0xc16a85e81244e5fca47283bb42ad8618f3c398bc</td><td>0x7f3315d773350883ebb4f643ab5ec0d32d162c8a</td><td>-</td><td>-</td><td>-</td><td>0xecd1fadbf56fd6a0c9b561969aed4ee27590ad01</td><td>-</td><td>1</td><td>-</td></tr><tr><td>Yolo</td><td>0x79b4be7ed13eef58bd15abd6ed79569f21d6c3af</td><td>0x79b4be7ed13eef58bd15abd6ed79569f21d6c3af</td><td>0x79b4be7ed13eef58bd15abd6ed79569f21d6c3af</td><td>0x79b4be7ed13eef58bd15abd6ed79569f21d6c3af</td><td>0x79b4be7ed13eef58bd15abd6ed79569f21d6c3af</td><td>0x79b4be7ed13eef58bd15abd6ed79569f21d6c3af</td><td>0x79b4be7ed13eef58bd15abd6ed79569f21d6c3af</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>


# 3️⃣ Governance Season 3 (ended)

{% hint style="info" %}
**Season 2 Airdrop Now Claimable!**

The Season 2 airdrop is live! You can view your allocation and claim your rewards directly through the [Mode Dashboard](https://www.mode.network/).

* **Claim Period**:
  * Opens: 18 Oct, 18:30 UTC
  * Closes: 29 Nov, 23:59 UTC

Check your wallet in [this document](https://docs.google.com/spreadsheets/d/1nz_kZQq0dsQm627D4es1Lz4DMvD7rnrDHSnXVIy52IM/edit?gid=0#gid=0) for any vesting details.
{% endhint %}

## Season 3

{% hint style="success" %}
Follow all the voting periods and important dates adding the [Governance Calendar](https://calendar.google.com/calendar/u/0?cid=Y180YTFlYjNlMGNmMzA2ZDJiMDEyOGJkYjc1N2NmOWYyNWVkZGE0YjdjMWZmOGUyMmQxYTBhNGE3MDE1NTUwNjZkQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20)
{% endhint %}

#### Introduction

Welcome to Season 3, where we introduce a new system for community-driven decision-making using veTokens (Vote Escrow Tokens) and gauge voting. This governance model empowers users to participate actively in directing the distribution of community incentives, promoting the growth and sustainability of the Mode ecosystem.

Our governance model includes two types of veTokens (veTKNs) for participation, each influencing a separate reserve of incentives. Participants can stake either or both types of veTokens to gain voting power and shape the allocation of incentives across various ecosystem protocols. Additionally, users who stake and vote will be eligible for OP rewards based on the amount staked and voting activity.

#### How the Governance Model Works

**Types of veTokens (veTKNs):**

Mode’s governance uses two types of veTokens, which users can stake to participate in governance:

* **veMODE:** Acquired by staking MODE tokens. The longer a user stakes veMODE, the more voting power they accumulate with each passing epoch.
* **veBPT:** Obtained by staking an 80/20 MODE/ETH Balancer Pool Token (BPT). Similarly, the longer veBPT is staked, the more voting power the user gains over time.

Both veTokens allow users to participate in gauge voting and direct the distribution of incentives. Users have the flexibility to participate with either veMODE or veBPT, or both, based on their strategy and commitment.\
\
veMODE and veBPT will each direct a separate allocation of incentives (10:1 ratio), so vote power will be independent for each.

**Voting Power and OP Rewards:**

* Voting Power: It increases over time as users stake their veTokens. The longer the staking period, the more voting power users accumulate, allowing them greater influence in governance decisions.
* OP Rewards: Users who stake their veTKNs and vote will be eligible to claim OP rewards each epoch. The rewards are based on the amount staked and whether the user voted in the prior epoch.

#### How Voting Power Increases Over Time

Voting power in Mode Governance is designed to reward long-term commitment and active participation in governance. The longer a user stakes their veTokens, the more voting power they accumulate over time. This mechanism encourages sustained engagement and allows participants to have a more significant impact on governance decisions.

* **Epoch-Based Growth:**\
  Voting power is calculated on an epoch basis, with each epoch lasting two weeks. As a user continues to stake their veTokens (either veMODE or veBPT), their voting power increases progressively at each epoch.
* **Growth Multiplier:**\
  The growth of voting power follows a defined multiplier that scales up over the course of the six epochs:
* **Epoch 1:** Base multiplier of 1.
* **Epoch 2:** Multiplier increases to 1.43.
* **Epoch 3:** Multiplier increases to 2.14.
* **Epoch 4:** Multiplier increases to 3.14.
* **Epoch 5:** Multiplier increases to 4.42.
* **Epoch 6:** Multiplier reaches 6.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfEAZMA7jf6wFNoNvd6wObq8aSOyXM_5_fXJmvm75tvVuC4U6eUIhChmJWndMM6DGl76QY8Qz-FNJdaO4T8bYm_3pfMz-IjE7BQ9FpYw1drRfkPPLqsofgyqdZA7YRBZKLNxk5NM6dksJoUlUKcp-m_Vhqd?key=cl91OfCMUhOOv8yD5HRzWg" alt=""><figcaption></figcaption></figure>

* This multiplier means that if a user stakes their veTokens from the beginning of Season 3 and keeps them staked, their voting power will be 6 times greater by the end of the final epoch compared to the first epoch.

**Increase in Allocated Emissions Over Time:**

The total incentives for Season 3 are distributed over 6 epochs, with a gradually increasing allocation to encourage continued engagement throughout the season. The allocated emissions grow slightly between each epoch, creating a steady growth curve that rewards consistent participation.

* Emission Growth Per Epoch:
  * **Epoch 1:** Emissions start at a base level of 1x.
  * **Epoch 2:** Emissions increase to 1.08x.
  * **Epoch 3:** Emissions increase to 1.2x.
  * **Epoch 4:** Emissions increase to 1.38x.
  * **Epoch 5:** Emissions increase to 1.6x.
  * **Epoch 6:** Emissions peak at 1.88x.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd84-DWY-n0z_nHWib5QfP7s1IjQ2uSzaVE2o9LaNr8XEwoj3QfVYR1hbWbs1cy1nE5DvxfrvDAjhBqYVB3nU5IbmkQtP9hl_HUbp4zCzVRJ0V8WFQuGRYn82kQTOcze45j273BkDi3rU-PlSqfXJ7CeA_K?key=cl91OfCMUhOOv8yD5HRzWg" alt=""><figcaption></figcaption></figure>

This growth pattern ensures that the incentives distributed across the governance participants continue to grow over time, encouraging users to stay staked and actively involved in the voting process. It also ensures that as participation and engagement increase, the rewards distributed match the level of commitment from the community.

**Voting on Eligible Protocols:**

Each epoch, users vote on a list of eligible protocols that have applied to be included as options in the gauge votes. These protocols compete for a share of the community incentives reserved for their growth and development.

* Gauge Voting: Users allocate their veMODE and/or veBPT tokens to vote for their preferred protocols from the eligible list. Voting occurs every 2 weeks over a total of 6 epochs spanning 3 months. Assigned votes do not reset each epoch, so voters who have previously assigned votes will not need to manually vote each epoch unless they wish to reassign votes.
* Incentive Distribution: Incentives are distributed in each epoch based on the previous epoch's results. The more votes a protocol receives, the larger its share of the incentives.

**Incentive Distribution to Protocol Users:**

Protocols that receive incentives from the gauge votes are responsible for distributing these incentives strategically to their users to promote growth and adoption.

* **Restrictions on Reward Usage**: Protocols cannot use the rewards to incentivize further governance participation (OP bribes, incentivizing Mode voting meta-vaults with OP, etc) . They must use the rewards to incentivize user actions that facilitate protocol growth, such as providing liquidity (LPs), trading activity, borrowing/minting from collateralized markets, etc.
  * OP incentives distributed via channels other than Merkl/Fuul need to target assets on Mode and must be claimable/distributed on Optimism Mainnet. OP cannot be sold and then distributed (<https://gov.optimism.io/t/collective-grant-policies/5833).\\\\>
* **Strategic Allocation:** Protocols should use Merkl or Fuul to distribute incentives. If other distribution channels are used, they must be clearly stated and include a way to communicate transparent metrics to ensure accountability and fairness.
* Address Used to Distribute: Protocols should use the same 0x address they listed on their Eligibility Form on the Forums (<https://forum.mode.network/c/governance/6>) to distribute rewards. This ensures better transparency throughout the distribution pipeline.
* **Driving Adoption:** This approach ensures that incentives are not only allocated to protocols but are also used to foster real growth and user engagement within the ecosystem.
* **Initiate Campaigns Within 14 Days:** Protocols should set up campaigns to distribute rewards within 14 days of receiving incentives to remain eligible to receive rewards in future epochs. Length of campaigns are at the discretion of the protocols.

#### Epoch Timeline and Process Flow

Each epoch consists of a detailed process flow to manage protocol applications, voting, incentive distribution, and the cooldown period. Epoch changeovers occur every other Thursday at 00:00:00 UTC. Voting deadlines are on Wednesday.

1. **Staking goes Live**\
   Users and protocols are able to stake to prepare to vote in the first epoch to be eligible to earn OP rewards.
2. **3-Day Protocol Application Period (Prior to 1st Epoch):**\
   Protocols apply for eligibility to be included as options in the gauge votes for the initial epoch.
3. **3-Day Setup of Initial Gauges:**\
   The Governance Council reviews applications and sets up initial gauges that will be included in the voting process.
4. **Warm-Up Period:** A minimum 3-day warm-up period precedes vote eligibility. Warm ups can be up to 6 days if staking well before an upcoming epoch changeover.\
   \
   Staking Deadline is 23:59:59 UTC the day before the voting period as staked positions must at least be In Warmup prior to epoch changeover to be eligible
5. **7-Day Voting Window (Epoch Voting):**\
   Users with staked and warmed up veTKNs vote on their preferred protocols during this period.
6. **3-Day Eligibility Window for New Protocols (Future Epochs):**\
   After the voting window, there is a 3-day eligibility period during which new protocols can apply to be included in future gauge listings.
7. 4-Day Buffer Window:\
   A buffer window allows for the addition of new protocols to the gauge options if applicable. During this time, the Governance Council finalizes and prepares for the next epoch.
8. Cooldown Window (2 Stages):

* Stage 1: Users can request to withdraw their staked veTKNs at any point during the Voting period if they don’t have votes active in the gauge. When a withdrawal request is made, the user’s votes are reset (removed) from the gauges, and their NFT representing the staked veTKNs is transferred to an exit queue.
* Stage 2: After a waiting period of \~3-6 days, users can return to the platform to retrieve their tokens. Retrieving the tokens burns the NFT from the exit queue. There are no restrictions on when users can complete this stage, as the votes have already been removed once the withdrawal request is initiated.

Maximum time for users to wait to withdraw would be up to \~13 days: Distribution period (\~6 days) + Voting period (\~7 days).

Minimum time: 3 days (within Voting period)

8. **Incentive Distribution (Each Epoch for Prior Epoch Results):**\
   Incentives are distributed each epoch for the results of the previous epoch. This involves two separate distributions to the selected protocols.
9. **OP Rewards Claimable (Each Epoch):**\
   After each epoch, users who have staked and voted during the previous epoch can claim their allocated OP rewards. The rewards are based on the amount staked and whether the user voted in the prior epoch.

#### Step-by-Step Guide to Participate in Governance

1. Acquire MODE Tokens or BPT Tokens:

* **MODE Tokens:** Available on both decentralized and centralized exchanges where MODE is listed.
* **Balancer Pool Tokens (BPT):** To obtain BPT tokens, provide liquidity in an 80/20 MODE/ETH pool on the Balancer platform.

2. Stake Your Tokens:

* **Stake MODE Tokens:** Visit gov.mode.network to stake your MODE tokens and receive veMODE tokens, which will grant you voting power.
* **Stake BPT Tokens:** Stake your 80/20 MODE/ETH BPT tokens to receive veBPT tokens, which also provide voting rights in the governance process.

Staking Deadline is 23:59:59 UTC the day before the voting period to allow enough time to warm up to vote

3. Accumulate Voting Power:

* **Voting Power Growth:** As you stake veMODE or veBPT tokens, your voting power grows with each passing epoch, rewarding longer commitments.
* **Monitor Your Stake:** You can track the growth of your voting power and adjust your strategy to maximize your influence in governance.

4. **Vote on Eligible Protocols:**\
   Use your accumulated voting power to vote on your preferred protocols from the eligible list during each epoch's voting window.
5. **Incentive Distribution and Rewards:**\
   At the end of each epoch, incentives from the reserves are distributed to the protocols based on the votes they received. Protocols then allocate these incentives to their users strategically to promote adoption and engagement.
6. **Claim Your OP Rewards:**\
   As you continue to stake and vote, you become eligible to claim OP rewards each epoch based on the amount staked and whether you voted in the prior epoch.
7. **Unstake When Needed:**\
   You can unstake your veTKNs at any time, which will enter a \~3-6 day cooldown before withdrawal . Be aware that unstaking will result in the loss of all accumulated voting power and eligibility for further OP rewards, so consider your strategy carefully.

#### Benefits of Participating in Governance

* **Flexible Participation:** Choose to stake either MODE or MODE/ETH BPT tokens, or both, based on your strategy and preferences.
* **Active Role in Ecosystem Growth:** Directly influence which protocols receive incentives, driving the growth of projects you believe in.
* **Rewards for Engagement:** Earn OP rewards by actively participating

## FAQ

<details>

<summary>I see it says there is a minimum warm-up and cool-down period How does this work in-between voting windows? When do I start accumulating voting power?</summary>

There exist weekly Checkpoint Intervals that align with the start of voting windows. When a user wants to withdraw, they have to wait until at least the upcoming checkpoint interval (plus any remaining cooldown) to withdraw. For warmups, a user must stake at least 3 days before a Checkpoint Interval before being eligible to vote. Furthermore, voting power only starts accumulating at the start of an upcoming Checkpoint Interval.\
\
The Dashboard will clearly indicate time remaining on veTKNs transitioning states.\
\
Examples:

* Voting starts on Thursday, Oct 10th and Alice stakes the Sunday before (Sunday 6th). Her voting power starts accumulating from Thursday, not Sunday.
* Alice queues for a withdrawal on Tuesday. She must wait until Thursday + 1 day of cooldown to withdraw her stake
* Bob wants to exit but has voted last week, as we are currently in the non-voting distribution window he has to wait until voting opens to remove his votes and begin exiting.

</details>

<details>

<summary>Will the Mode foundation be voting in the gauges?</summary>

Mode will participate in the gauges in a limited, strategic fashion - particularly in instances to support new protocols and assets deploying on Mode.

</details>

<details>

<summary>Where can I apply to be eligible to receive gauge incentives?</summary>

Protocols can apply on the Mode Forums anytime and will be added as a gauge option on a rolling epoch basis (every 2 weeks).\
\
Visit the Forum here: <https://forum.mode.network/c/governance/season-3-eligibility/7>

</details>

<details>

<summary>Where can I find the smart contract addresses for the Governance?</summary>

You can find all the contract addresses in [this notion page](https://aragonorg.notion.site/ModeDAO-Contracts-1206b18349dc800c8c08e5fc008d666f).

</details>

<details>

<summary>May I get more details on how this unstaking works during the voting period?</summary>

When a withdrawal request is made, we first check the user is not voting and attempt to reset the votes by removing them from the gauge. If successful, the NFT representing the staked veTKNs is transferred to the Escrow until redemption, after which point it will be burned

</details>

<details>

<summary>I see I can participate with veMODE and veBPT. What is the difference?</summary>

veBPT is acquired by staking 80/20 MODE/ETH LP on [Balancer](https://balancer.fi/pools/mode/v2/0x7c86a44778c52a0aad17860924b53bf3f35dc932000200000000000000000007). So if a user has $100 staked, their position would be $80 in MODE and $20 in ETH.\
\
Other differences:\ <img src="/files/HnW7oTf1e2K0GuPQ4gbP" alt="" data-size="original">

\*240k allocated for voter rewards\\

</details>

<details>

<summary>Where can I find the audits of the governance contracts?</summary>

<https://github.com/aragon/ve-governance/tree/develop/audits>

</details>

<details>

<summary>How do I see how much MODE or BPT that I have staked?</summary>

1. Go to:\
   [https://explorer.mode.network/address/0xB508d9Cd504C740C0C3a7c708F7154c2FC978D16?tab=read\_contract\ <br>](https://explorer.mode.network/address/0xB508d9Cd504C740C0C3a7c708F7154c2FC978D16?tab=read_contract)
2. Select “Contract” -> “Read Contract” -> “2.getTotalStaked”
3. Input your wallet address in the “\_account (address)\*” field
4. Click on “Read”
5. The output will be the amount of staked mode with 18 zeros. Hover over this number, and it will show the staked amount.
6. It will show “ETH” as a ticker; just ignore it. This number equals staked Mode on the selected wallet.
7. For BPT: To check staked BPT, repeat the same steps but on a different smart contract:\
   \
   <https://explorer.mode.network/address/0x394E9C0b312f0013653d764522bA17207eE97D9B?tab=read_contract>\\

   <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcP9icndf0yE71VQgQpj_mX_WHupmnd27aQJThPmfyEBX25pv2mnFpEdouvpUSDoydeSsZAS3INRPpn6XtJV1hWmuk2rNzFTT3HEHXhcEnSAYee9Pc76PAgC4ZQH66jXLwhK3M2Sm7o7ey_v0rsJI930I_v?key=cl91OfCMUhOOv8yD5HRzWg" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>We received very little incentives in the recent gauge votes - too little to simply incentivize pools. What are ways we can use these incentives to encourage growth?</summary>

Fuul has several powerful competition-based strategies to make the smartest use of your incentives:

1\. Liquidity Leaderboard: Reward the top 3 users who provide the most liquidity during a given period. This keeps the competition exciting and meaningful, as each user strives for the top spots.

2\. Trading Competition: Distribute incentives among the top 3 users who trade the highest volume on your platform. This encourages active participation from traders and adds a sense of achievement for reaching the leaderboard.

3\. Referral Competition: Allocate rewards to the top 3 users whose referrals bring in the most liquidity or trading volume. This keeps the focus on quality referrals and incentivizes community-driven growth.

4\. Raffle Draw: Allow all users who meet a basic participation requirement—like providing liquidity or making a minimum trade—earn an entry into a prize draw. The raffle format levels the playing field, making it an attractive option for users of all levels.

You can get started today at app.fuul.xyz or reach out directly to Juan with Fuul at @arditlgr.

</details>

Additional FAQs can be found here: <https://forum.mode.network/t/season-iii-faq/36>\\


# 4️⃣ Mode Governance Season 4

This is the actual Governance Season and all the details about the Mode Governance.

## Season 4

### Overview

Building on the Season 3 framework of community-driven decision-making, Season 4 refines Mode’s governance with enhanced clarity, transparency, and accountability. It introduces:

* Stricter gauge eligibility tied to timely distribution and reporting of incentives.
* Formal bribe marketplace integration (Hidden Hand) to standardize bribe distribution and claims.
* Anytime unstaking within an epoch (no longer limited to voting windows).

### Introduction

Season 4 continues to use veTokens (veMODE and veBPT) for voting and distributing OP incentives to protocols. With each epoch (two-week period), voting power and incentive emissions gradually increase. Protocols compete for gauge votes to secure OP rewards, which must be used to drive on-chain adoption and ecosystem growth.

### **Governance Model Overview**

Mode uses two types of veTokens to facilitate governance decisions:

• **veMODE:** Stake MODE tokens.

• **veBPT:** Stake 80/20 MODE/ETH Balancer Pool Tokens.

Each veToken directs a separate allocation of OP incentives (10:1 ratio in favor of veMODE), and both accrue voting power gradually over the season (up to 6x max voting power). Participants can stake one or both, receiving OP rewards for active voting.

#### **Voting Power: Increases on Curve**

Stakers who commit from the first epoch and remain staked through all six epochs will see their voting power climb steadily from 1x to 6x by the final epoch. This growth applies regardless which epoch stakers begin staking.

#### **Emissions and Incentive Distribution**

Season 4 has up to $2M in OP incentives which follow a multi-epoch structure with a gradually increasing emission schedule. Participants vote for their preferred protocols, influencing the share of OP each protocol receives.

* **OP Rewards:** Entirely OP-based, no MODE tokens are distributed.
* **Gauge Voting:** Active voters earn OP each epoch, and protocols receive OP allocations proportional to their gauge votes.
* **Eligibility Requirements:** Protocols must adhere to distribution and reporting rules (detailed below) to remain gauge-eligible.

#### **Protocol Voting and Bribes**

Voting windows open every two weeks, during which veMODE and veBPT holders assign votes to protocols. The Season 4 bribe system integrates with Hidden Hand, allowing protocols to deposit bribes for voters. At the end of the voting period, a snapshot determines bribe distribution, and users can easily claim via the Hidden Hand UI.\\

**Updated Unstaking and Cooldown Windows**

A key Season 4 improvement is the ability to initiate cooldown at any time during an epoch:

* **Initiate Unstake:** Your votes are removed, and your staked veTKN NFT enters an exit queue.
* **Cooldown (3–6 Days):** Overlaps with voting or distribution windows.
* **Withdrawal**: After cooldown, retrieve your tokens at your convenience.

**Epoch Timeline and Process Flow**

Season 4 maintains a two-week epoch structure, but with more fluidity in cool-down initiation and more rigorous gauge eligibility. A typical epoch includes:

* **Staking (Ongoing):** Users add or remove stake, with at least a short warm-up before newly staked tokens can vote.
* **Voting Window (7 Days):** veTKN holders vote for protocols, and protocols can deposit bribes via Hidden Hand.
* **Distribution Window (\~7 Days):** Protocols receive OP based on the last epoch’s voting results. They must distribute it promptly and transparently.
* **Protocol Eligibility Window:** Protocols must submit or update distribution plans/reports to maintain gauge eligibility for the next epoch (unless using Merkl, in which Merkl will stream the data on protocols’ behalf).

### **Step-by-Step Guide to Participate**

1. Acquire MODE or 80/20 MODE/ETH BPT.
2. Stake on gov.mode.network to receive veMODE or veBPT.
3. Warm Up until the next checkpoint interval.
4. Vote during the 7-day voting window, optionally collecting bribes from Hidden Hand.
5. Earn OP Rewards each epoch for staking and voting.

Unstake Anytime via the new flexible cooldown process.\\

### Maintaining Protocol Eligibility

Season 4 introduces stricter reporting requirements. Protocols have two options:

* **Register with Merkl (Preferred):**

Fill out the [Merkl form](https://tally.so/r/wQ82Zl) (one submission per epoch). Merkl automates your campaigns. If no new form is submitted, the campaign from the previous epoch continues.

* **Custom Distribution & Reporting:**

[Submit](https://forum.mode.network/c/governance/incentive-distributions/8) a detailed distribution plan within 48 hours of receiving OP. Provide a follow-up report (or API/data feed) for each epoch’s distribution by the beginning of the voting window two epochs later.

Failure to comply may result in your gauge being toggled off until the missing distribution data or plan is provided.\\

### Transitional Details (Season 3 → Season 4)

**January 9–15** is reserved for protocol documentation submissions, ensuring compliance and gauge eligibility prior to the first epoch’s voting.

### Benefits of **Participating**

* **Flexible Unstaking:** Enter cooldown any time, not confined to a single voting window.
* **Active Role:** Influence incentive flows to protocols and applications you care about.
* **Transparent & Accountable:** Bribes are centralized in a single marketplace (Hidden Hand), while protocols have clear reporting obligations.
* **Long-Term Rewards:** Earn OP and watch your voting power grow linearly up to 6x when staked for the entire season.


# 5️⃣ Season 5

This page has all the details about Season 5

## Season 5: Mode Trading Agents and Streamers

{% hint style="info" %}
**TLDR:**

* OP incentives will continue in Season 5 for veMODE holders to direct to ecosystem apps, however Streamers and Agents will now be eligible for guages
* Stake Mode to earn OP at approx 20-30% APY
* Voting power carries over from Season 4 to Season 5
* Agents, Streamers and apps can redistribute OP to their users
* Insights must be provided into the distribution of incentives to remain gauge-eligible

Growing Mode and the Superchain: OP rewards aim to fuel tangible growth for Mode and the Superchain
{% endhint %}

### Key Dates

**Start May 8th:** Epoch 1 voting begins, Streamers and Agents can apply to be added to guages on a rolling basis.

**Two-Week Epochs:** Voting and incentive distribution follow a bi-weekly cadence throughout Season 5

### Key Benefits

#### 1. Introducing Streamers and Agents to veMODE

Streamers who live stream or record videos on Mode Trade, Mode AI Terminal and Mode Apps will be eligible to apply for guages and receive OP incentives.

Agents that deploy to Mode will also be eligible to receive ongoing incentives.

#### 2. Focus on Education Content for Growth

This move to bring in Streamers and Agents will help align the ecosystem around educational content designed to onboard users to Mode’s ecosystem of innovative AI powered applications.

#### 3. AI Driven Onchain Experiences

Mode is building at the cutting edge of AI and all new initiatives will focus on enhancing AI driven onchain experiences.

## Introduction

Mode’s governance experiment is about to become a lot more fun and engaging, with the introduction of Streamers and Agents. Building on Season 4 which saw experiments in bribe markets, Season 5 will focus on incentivising education and engagement with AI apps and agents building across the ecosystem.

## What's new in Season 5?

#### 1. Streamers and Agents added to veMODE

Protocols can now rely on Hidden Hand’s established bribe infrastructure, removing confusion around eligibility or claim processes. This translates to frictionless user experiences.

#### 2. Transparency

All eligible participants for guages must provide transparency in how they distribute OP incentives in order to remain gauge-eligible, helping the community stay informed and confident about the deployment of rewards.

#### 3. Tokenomics and Sustainability

Season 5 will use OP as the primary incentive mechanism. Apps, Agents and Streamers that secure votes get a slice of OP each epoch. This model not only rewards active participants but also ensures the broader Mode ecosystem remains vibrant.

#### 4. Agentic Staking and Voting

Thanks to Mode’s AI Terminal, MODE holders can now use AI to stake their Mode to veMODE.

As the AI Terminal comes out of Beta expect to see the barriers for entry to be reduced significantly for all users.\\


# Staking

In this guide we'll explain everything about staking and un-staking $MODE

Staking is enabled for $MODE and the MODE/USDC Balancer Pool Token giving additional benefits for the current Season 2.\
\
By staking your $MODE or MODE/USDC Balancer Pool Token you'll get points boosters and OP rewards. Please note that unstaking has a cooldown period of 7 days.

## Guide to Staking $MODE and MODE-USDC BPT

Users can stake Mode and/or the MODE-USDC Balancer Pool Token via the staking module on the Mode dashboard at <https://app.mode.network/early/>\
\
**Staking $MODE**\
\
Step 1: Ensure you have $MODE in your wallet. You can see how you can get $MODE here\
Step 2: Stake your tokens in the Staking Module on the Mode dashboard at <https://app.mode.network/early/>\
\
**Staking MODE-USDC BPT (MODE-USDC Balancer Pool Token)**\
\
Step 1: Go to Balancer and deposit [$MODE and $USDC into the balancer pool.](https://balancer.fi/pools/mode/v2/0xa4781148e4a8a0903d795464e5c206a7f33851ba000200000000000000000008)\
Step 2: Visit the Staking Module on the Mode Dashboard and select **MODE-USDC BPT** then stake your tokens <https://app.mode.network/early/>

## OP rewards

Once a week 20,000 OP will be distributed to everyone that staked Mode. Your share depends on the amount you staked, and the amount of blocks that passed. [**Read More**](https://mode.mirror.xyz/PZiQ32QH8S_HcyK_NI93KYdlE_koufq92dS7TKPgoIY)**.**\
\
**OP rewards have been live since Thursday May 16th 2024.**

**Key things to know about OP rewards:**

* At 4pm UTC on Thursdays we take the weekly snapshot
* On Fridays at 11am UTC the weekly claim will be released
* You need to claim your OP tokens for the week before the next claim is published.
* **OP rewards will be distributed on the Optimism chain.**

## Criteria for the points booster

1. Users need to stake enough $MODE to equal either 25% or 50% of their entire portfolio valued in USD. All assets from the wallet on Mode Mainnet are taken into account.\
   \
   Example:\
   If you are holding 100 USDC you will have to stake 25$ worth of $MODE or 50$ worth of $MODE in order to get the booster.\\
2. If the ratio drops (due to price action or asset reallocation), there is a day of grace period for users to stake more $MODE to get their ratio balance back.\\
3. When users are eligible for a points boost, they earn either 1.25x or 1.5x for all points they earn on any asset or position during that time. **This is a global multiplier on all other activities.**\
   \
   You earn **1.25x** if staked $MODE is 25% or more of your portfolio.\
   You earn **1.50x** if staked $MODE is 50% or more of your portfolio.\
   \
   If your staked $MODE falls below 25% of your total portfolio, then you will no longer be eligible for the booster until your $MODE staking goes back over 25%. You have a 24 hour grace period before you lose the booster. Same thing happens with 50% and the 1.50x booster.\\
4. Locked tokens in liquidity pools are not counted in the protocols for the booster yet. However, these LP positions do count for points and incentives. \\
5. Eligibility for the booster is calculated daily.

{% hint style="warning" %}
There is an unstaking waiting period (cooldown) of 7 days. Please be mindful of this when staking your tokens.
{% endhint %}

## Stake & unstake

* The user can stake as many tokens as they have in their wallet, and unstake as many tokens as they have staked.
* Tokens will be available to withdraw 7 days after unstaking. Unstaking more tokens resets the cooldown period. The cooldown period resets if you unstake again.\
  \
  Example:\
  \
  You have 20 staked tokens. You unstake 10 tokens on day 1. The withdrawal period starts counting.\
  \
  After waiting for 3 days, you decide to unstake the remaining 10 tokens. Now the withdrawal period resets.\
  \
  You now have to wait 7 days to withdraw the total 20 $MODE.\\
* During the unstaking cooldown period, you will not be able to manage or move these tokens. Tokens can be withdrawn and be managed after the cooldown period.


# Mode Points Design

Mode points calculations

## Mode Incentive Design <a href="#mode-incentive-design" id="mode-incentive-design"></a>

#### Introduction <a href="#introduction" id="introduction"></a>

Mode Points serve as a metric to acknowledge and reward early participants in the Mode ecosystem. These points encapsulate a range of activities, including assets on Mode, interacting with applications within the ecosystem, historical engagement across other blockchain networks, and more.

The points formula can be extracted into three terms:

$$P\_u = P\_{R} + P\_{E} + P\_{V}$$

represents the Mode Reward Points user $$u$$ earns during the Mode Sunrise period. There are three ways users can earn points:

* Referral Points ($$P\_{R}$$)
* Ecosystem Points ($$P\_{E}$$)
* Veteran Points ($$P\_{V}$$).

In the following section, we explain each part of formula.

#### Referral Points

Referral Points incentivizes cooperative onboarding activities. These points are calculated by the formula:

$$P\_{R} = ;m\_{RP}\cdot \alpha RP\_{u,t}$$

where $$RP\_{u,t}$$ is the total referral points earned by user $$u$$ at time $$t$$, multiplied by a share multiplier $$\alpha$$ and referral multiplier $$m\_{RP}$$.

To obtain the total referral points earned by user $$u$$, we sum over eligible points $$\tilde{P\_{r}}$$ generated by $$r$$ wallets that have activated user $$u$$'s referral code.

$$RP\_{u,t} = \Sigma\_{r \in R\_u} \tilde{P\_{r}}$$

Eligible points $$\tilde{P\_{r}}$$ are points generated through on-chain wallet activities and do not include referral points so to prevent second-order referral effects.

The share multiplier $$\alpha$$ and referral multiplier $$w\_{RP}$$ are optimized throughout the program.

#### Ecosystem Points

Ecosystem points incentivizes asset onboarding to Mode, along with user activity across various ecosystem protocols at launch. It is calculated by:

$$P\_{E} = \int\_{0}^{T} (m\_{AoM} \cdot AoM\_t + m\_{TVL} \cdot TVL\_t + m\_{Fees} \cdot Fees\_t) ; dt$$

where $$AoM\_t$$ is the amount of total Assets on Mode, $$TVL\_t$$ is Total Value Locked in ecosystem dapps, and $$Fees\_t$$ is sequencer fees spent, aggregated across time.

The multipliers $$m\_{AoM}$$, $$m\_{TVL}$$, and $$m\_{Fees}$$ will be optimized throughout the program to promote sustainable growth of the Mode ecosystem.

#### Veteran Points

Veteran Points $$P\_{V}$$ provides additional points to users who have demonstrated notable activity across Ethereum, Optimism, or Base in the past, inviting active blockchain participants to join the Mode network.


# General Security

In this section you will find all the security related documents, audits, bounties and more.


# Mode L2 Security Model

## Mode Security Model

Mode is an OP Stack L2 and a key part of Optimism Superchain. Mode runs the OP Stack mainnet configuration in partnership with Optimism.

In return for ongoing technical and product support from Optimism, Mode contributes sequencer fees, and research and innovation to the OP Collective.

### Mainnet Multisig <a href="#op-mainnet-multisig" id="op-mainnet-multisig"></a>

The security of Mode L2 is currently dependent on a multisig managed jointly by the Mode Security Council, the [Optimism Security Council(opens in a new tab)](https://gov.optimism.io/t/intro-to-optimisms-security-council/6885) and the Optimism Foundation.

This multisig can be used to upgrade core Mode L2 smart contracts **without upgrade delays** to allow for quick responses to potential security concerns. All upgrades to the system must be approved by both component multisigs and either can veto an upgrade.

### Bugs and Unknowns <a href="#bugs-and-unknowns" id="bugs-and-unknowns"></a>

The OP Stack has been audited [on many occasions(opens in a new tab)](https://github.com/ethereum-optimism/optimism/tree/v1.1.4/technical-documents/security-reviews), but **audits are not a stamp of approval** and **a completed audit does not mean that the audited codebase is free of bugs.**

It's important to understand that using Mode inherently exposes you to the risk of bugs within the codebase, and that you use Mode Mainnet at your own risk.\
\
For more information on the OP Stack please visit


# Optimism Bug Bounty

### Optimism Bug Bounty Program <a href="#optimism-bug-bounty-program" id="optimism-bug-bounty-program"></a>

The Optimism Bug Bounty Program offers up to [$2,000,042(opens in a new tab)](https://immunefi.com/bounty/optimism/) for critical vulnerabilities found in the OP Mainnet codebase. Below you can find information about the various available bug bounty programs and how to report bugs that are not covered by an existing bounty.

#### Main Bounty Page <a href="#main-bounty-page" id="main-bounty-page"></a>

Optimism has a very detailed [Bug Bounty Page on Immunefi(opens in a new tab)](https://immunefi.com/bounty/optimism/). In the listing you can find all the information relating to components in scope, reporting, and the payout process.

#### Unscoped Bugs <a href="#unscoped-bugs" id="unscoped-bugs"></a>

If you think you have found a significant bug or vulnerabilities in OP Stack smart contracts, infrastructure, etc., even if that component is not covered by an existing bug bounty, please report it to via the [OP Mainnet Immunefi program(opens in a new tab)](https://immunefi.com/bounty/optimism/). The impact of any and all reported issues will be considered and the program has previously rewarded security researchers for bugs not within its stated scope.


# Security Upgrades

## [01/08/2024 Bridge Upgrade Fund Rescue](https://docs.mode.network/security/security-upgrades/01-08-2024-bridge-upgrade-fund-rescue)

## [06/08/2024 Mode Mainnet Key Handover](https://docs.mode.network/security/security-upgrades/06-08-2024-mode-mainnet-key-handover)


# 01/08/2024 Bridge Upgrade Fund Rescue

**Bridge Upgrade to Rescue Stuck Funds**

On 1st August 2024 Mode ran a planned upgrade to rescue 4880 ETH in funds.\
\
[**Full post-mortem on the EtherFi github here.**](https://github.com/etherfi-protocol/postmortems/?tab=readme-ov-file)\
[**Bridge upgrade transaction to rescue funds.**](https://etherscan.io/tx/0x9154d2b581e84b15615b4a857476af9fa6b682622d6e30e7c28bae6331a5fe39)\
\
**Why was this rescue not disclosed in advance?**

There were concerns of making this rescue public due to the risk of the message not being finalized or a malicious actor sending a proof. After multiple security reviews we found a safer solution which bypassed these risks and executed this.

**For further details see the** [**full post-mortem on the EtherFi github here.**](https://github.com/etherfi-protocol/postmortems/?tab=readme-ov-file)

{% embed url="<https://github.com/etherfi-protocol/postmortems/?tab=readme-ov-file>" %}


# 06/08/2024 Mode Mainnet Key Handover

Mode has successfully completed the Mainnet key handover to the Optimism Security Council.

Key handover transaction: <https://etherscan.io/tx/0xf4e7778523991cf6c4b305970c2c9e71ef27f652e475bb42302d582fa613f5a3>

The key handover is a crucial step forward for Mode as a leading Superchain team and will enable Mode to benefit from interoperability upgrades.


# Audits

Mode contract audits

You can find audits for Mode contracts here: <https://github.com/mode-network/public-audits/>


# Community dApps

Testnet apps that devs from the community decided to build

{% hint style="warning" %}
Remember this are community built apps deployed on Mode testnet. Even though we do our research to try and add "safe" applications, we cannot guarantee these website safetyness.\\

We advice you use a new wallet to interact with these apps and proceed with caution.
{% endhint %}

<table data-view="cards"><thead><tr><th align="center"></th><th align="center"></th><th align="center"></th><th data-type="rating" data-max="5"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td align="center"><strong>Mode Spray</strong></td><td align="center">Mode Spray simplifies the process of sending ETH on Mode. The user-friendly interface allows users to send ETH to multiple wallets in a bundle transaction.<br></td><td align="center"><a href="https://noisy-fish-billions.on-fleek.app/">Mode Spray</a><br><br><a href="https://github.com/wolfcito/mode-spray?tab=readme-ov-file">Github</a><br><br>Created By: <a href="https://github.com/wolfcito">Wolfcito</a></td><td>5</td><td><a href="/files/claMROVNz8JBEjAJFtjN">/files/claMROVNz8JBEjAJFtjN</a></td></tr><tr><td align="center"><strong>Gumbledapp</strong></td><td align="center">A decentralized prediction-based game built on the Mode network, made to leverage the Sequencer Fee Sharing (SFS) mechanism.</td><td align="center"><a href="https://gumbledapp.xyz/">https://gumbledapp.xyz/</a><br><br><a href="https://github.com/N44TS/Gumbledapp">Github repo</a><br><br>Built by: <a href="https://github.com/N44TS">N44TS</a></td><td>null</td><td><a href="/files/Q3pbnSTu5xbGA3vyVk1p">/files/Q3pbnSTu5xbGA3vyVk1p</a></td></tr><tr><td align="center"></td><td align="center">MORE<br>COMING<br>SOON</td><td align="center"></td><td>1</td><td></td></tr></tbody></table>

If you would like to showcase your Mode dApp on this page, please reach out to us on our developer channel on [Discord](https://dub.sh/mode-discord).


# Official Links

**Website:** <https://www.mode.network/>

**Twitter / X:** <https://twitter.com/modenetwork>

**Discord:** <https://discord.gg/modenetworkofficial>

**Mirror:** <https://mode.mirror.xyz/>

**Community Blog:** <https://mode.hashnode.dev/>

**Telegram:** <https://t.me/ModeNetworkOfficial>

**GitHub:** <https://github.com/mode-network>

**Mode-developers repo:** <https://github.com/mode-network/mode-developers>

**Warpcast:** <https://warpcast.com/~/channel/mode>\\

\
[\
\
\
\ <br>](https://www.mode.network/https://mode.mirror.xyz/https://docs.mode.network/https://mode.hashnode.dev/https://twitter.com/modenetworkhttps://discord.gg/modenetworkofficial)


# Branding Guidelines

Here you can find the Mode brand kit to use:\
\
<https://github.com/mode-network/brandkit>


# Node Operators

### Running the node

If you want to run a node for Mode you can follow these instructions:\
<https://github.com/mode-network/rollup-node>

{% hint style="warning" %}
**UPCOMING HOLOCENE UPDATE**

Optimism Fork (Holocene) will be activated on ​Mainnet​ on ​`Thu 09 Jan 2025 18:00:01 UTC`Prior to the update, for nodes/integrators:\\

* run op-geth >= [v1.101411.2](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Fop-geth%2Freleases%2Ftag%2Fv1.101411.2\&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23\&utm_slack_channel=C05T5A68H9T)
* run op-node >= [v1.10.0](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Foptimism%2Freleases%2Ftag%2Fop-node%252Fv1.10.0\&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23\&utm_slack_channel=C05T5A68H9T) (for alt-da, consider respective forks like celestia/eigen)
* set on both the flag `--override.holocene=1736445601`
  {% endhint %}

### Snapshots

Snapshots will help you save time while synching your node to Mode.

* Mainnet

Tuesday 3rd September **(latest)** -

{% embed url="<https://storage.googleapis.com/conduit-networks-snapshots/mode/mainnet/2024-09-03.tar>" %}

* Testnet

{% embed url="<https://storage.cloud.google.com/conduit-networks-snapshots/mode/sepolia/latest.tar.gz>" %}

## Past updates

<details>

<summary>HOLOCENE</summary>

* run op-geth >= [v1.101411.2](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Fop-geth%2Freleases%2Ftag%2Fv1.101411.2\&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23\&utm_slack_channel=C05T5A68H9T)
* run op-node >= [v1.10.0](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Foptimism%2Freleases%2Ftag%2Fop-node%252Fv1.10.0\&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23\&utm_slack_channel=C05T5A68H9T) (for alt-da, consider respective forks like celestia/eigen)
* set on both the flag `--override.holocene=1736445601`

Optimism Fork (Holocene) will be activated on your ​Mainnet​ on ​`Thu 09 Jan 2025 18:00:01 UTC`Prior to the update, please confirm the following on external nodes/integrators:

* run op-geth >= [v1.101411.2](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Fop-geth%2Freleases%2Ftag%2Fv1.101411.2\&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23\&utm_slack_channel=C05T5A68H9T)
* run op-node >= [v1.10.0](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Foptimism%2Freleases%2Ftag%2Fop-node%252Fv1.10.0\&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23\&utm_slack_channel=C05T5A68H9T) (for alt-da, consider respective forks like celestia/eigen)
* set on both the flag `--override.holocene=1736445601`\
  \
  If you are not using the previous fork, Granite, on your external nodes (check the following flags is set ​`--override.granite`​), please reach out. In the case, you might need to enable the Granite hard fork flags two days before ​`Tue 07 Jan 2025 18:00:01 UTC`​. You can use the same software version and configure it with ​`--override.granite=1736272801`

</details>

<details>

<summary><strong>GRANITE UPDATE</strong></summary>

the Optimism Granite Hard Fork happened on `Wed 11 Sep 2024 16:00:01 UTC` . More info [here](https://docs.optimism.io/builders/notices/granite-changes).For external nodes/integrators:

* run op-geth >= [v1.101408.0](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101408.0)
* run op-node >= [v1.9.1](https://github.com/ethereum-optimism/optimism/releases/tag/v1.9.1) (for alt-da, consider respective forks like celestia/eigen)
* set on op-geth and op-node the flag `--override.granite=1726070401`

</details>

<details>

<summary><a href="https://github.com/ethereum-optimism/specs/blob/main/specs/fjord/overview.md">Optimism Fjord Hard Fork</a></summary>

**FJORD UPDATE -** `Wed Jul 10 16:00:01 UTC 2024`\
\
Node operators will need to upgrade to Fjord before the activation date. For Sepolia, the op-node release [v1.7.7(opens in a new tab)](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.7) and op-geth release [v1.101315.2(opens in a new tab)](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) contain these changes.\
\
Please update to the latest releases of [op-geth](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) and [op-node](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.7).

\
**VERIFY**

Make the following checks to verify that your node is properly configured.

* `op-node` and `op-geth` will log their configurations at startup
* Check that the Fjord time is set to `activation-timestamp` in the op-node startup logs
* Check that the Fjord time is set to `activation-timestamp` in the op-geth startup logs

\
**For more information please visit** [**Optimism's documentation**](https://docs.optimism.io/builders/notices/fjord-changes#verify-your-configuration)**.**

</details>

<details>

<summary>Ecotone Upgrade (Dencun + EIP-4844)</summary>

*The Ecotone upgrade for OP Sepolia activated at **1708534800 Wed Feb 21 17:00:00 UTC 2024**.*

### Getting ready for Ecotone Upgrade (Dencun + EIP-4844)

The Ecotone upgrade contains the Dencun upgrade from L1, and adopts EIP-4844 blobs for data-availability.\
\
Please refer to:\
\
<https://docs.optimism.io/builders/notices/ecotone-changes>

* You need l1 beacon api access for op-node and pass via --l1.beacon param (or OP\_NODE\_L1\_BEACON env).
* Consider having full-archive blobs access. if you are on the superchain you don't have to pass any new parameter.

</details>


