Skip to main content

Adding Mantle to a CEX

Connecting to Mantle

Mantle network shares the Ethereum JSON-RPC API with almost no differences. You can choose to connect to Mantle through any of the following means:

  1. Official rate-limited public endpoint.
  2. Third-party endpoints from infrastructure providers.
  3. Running your own node.

Fetching Token Balances

Calculating ETH/ERC-20 Balance

On Mantle network, the ETH balance of an account is not stored as part of the account's state, but as an ERC-20 balance at address 0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111. The ERC-20 balance is stored in the ERC-20 contract, you can check it using the token list. Then you can still access it using the standard APIs.

Calculating $MNT Balance

You can use the same methods as querying the ERC-20 balance, but note that since MNT is the native token in L2, it will disable ERC-20 methods other than querying the balance.

Transaction Fees

Mantle network aims to be EVM-compatible, you can see a summary of the few differences between Mantle and Ethereum here.

Deposits and Withdrawals

Deposits and Withdrawals on Mantle

The ERC-20 contracts on Mantle function the same way they do on Ethereum, so you can use your existing code for withdrawals and deposits. Just connect to a Mantle endpoint.

Deposits and Withdrawals Across Chains

As a centralized exchange, there will be times that withdrawals of $ETH/$MNT token or an ERC-20 token on either Mantle network or Ethereum exceed deposits and you need to transfer assets. To do that you use a bridge or a gateway. We have a standard bridge that receives assets on Ethereum mainnet, and mints the equivalent asset on Mantle network.

When a user wants to withdraw the assets back to L1, the bridge burns the asset on L2 and releases it to the user on L1. If you want to use this gateway automatically, follow this tutorial for bridging ETH, or this tutorial for bridging ERC-20 tokens.

Note that while L1 to L2 transactions typically take minutes, L2 to L1 transactions on the gateway require a 7 day challenge period.

When an ERC-20 token does not have a Mantle equivalent you can create one. If there is no need for custom business logic, you can follow the steps in this tutorial for bridging standard ERC-20s. If you need to implement some kind of custom logic, see this tutorial for bridging custom ERC-20s.