# EVM & IBC Module

## EVM Module & Dynamic Fee Market

The EVM Module natively integrates the Ethereum Virtual Machine into the Uniocean blockchain, achieving full EVM equivalence while benefiting from Tendermint BFT consensus. This allows developers to deploy unmodified Solidity and Vyper smart contracts directly onto the Uniocean network.

### Dynamic Fee Market & EIP-1559 Integration

Uniocean implements a dynamic fee market modeled after Ethereum's EIP-1559, adapted to the deterministic Cosmos SDK. Unlike Ethereum's priority gas auction, Uniocean processes transactions on a strict FIFO basis. The transaction fee is strictly calculated as:

$$
Fee = GasFeeCap \times GasLimit
$$

### Base Fee and Network Elasticity

The `BaseFee` dynamically adjusts at the end of each block based on the total gas consumed in the previous block relative to the network's gas target:

* If the previous block's gas usage **exceeds** the gas target, the `BaseFee` increases.
* If the previous block's gas usage is **below** the gas target, the `BaseFee` decreases.

### JSON-RPC Translation Layer

Uniocean operates a dedicated JSON-RPC server alongside the standard Cosmos gRPC endpoints. This translation layer intercepts standard Ethereum RPC requests (e.g., `eth_sendRawTransaction` or `eth_feeHistory`) and wraps them into native Cosmos SDK messages.

### Native Bank & Multi-VM Interoperability

The Uniocean EVM module is deeply integrated with the core Cosmos `x/bank` module. The native protocol token and bridged IBC assets are recognized simultaneously as standard Cosmos Coins and as ERC-20 compatible tokens within the EVM. The EVM module implements stateful *Precompiled Contracts*, allowing Solidity smart contracts to execute cross-VM calls to CosmWasm contracts or interact directly with Uniocean's custom application modules.

## IBC Module

The Inter-Blockchain Communication (IBC) Module provides standardized infrastructure for secure, trust-minimized interoperability between Uniocean and the broader Cosmos ecosystem.

### Transport, Authentication, and Ordering (TAO)

* **Light Clients:** Uniocean maintains on-chain light clients for every connected counterparty blockchain, allowing mathematical verification of cross-chain state transitions.
* **Connections:** Connections bind two light clients together via a rigorous four-way handshake (`OpenInit`, `OpenTry`, `OpenAck`, `OpenConfirm`).
* **Channels & Relayers:** Channels are application-specific pipelines facilitating the actual routing of data packets between specific modules. Off-chain, permissionless Relayer nodes physically scan chains for pending packets and submit them across channels.

### ICS-20 Fungible Token Transfers & Escrow Mechanics

When a user transfers native tokens from Uniocean to another chain, the IBC module locks (escrows) the original assets and sends a cryptographic proof via a relayer to the destination chain, which then mints representative voucher tokens. Conversely, when external assets are routed into Uniocean, the protocol dynamically mints localized IBC denoms (e.g., `ibc/{hash}`).

### Cross-Chain Composability (IBC Hooks)

Uniocean's IBC module integrates advanced composability features utilizing the packet `memo` field and IBC Hooks. This allows users on remote chains to bundle cross-chain token transfers with subsequent smart contract executions — for example, initiating an IBC transfer that automatically deposits margin collateral into a Uniocean derivative market upon arrival.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://uniocean.gitbook.io/uniocean-docs/core-platform-modules/evm-and-ibc-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
