Meridian Foundation

Compliant DeFi access for banks through a secure, yield-earning flatcoin system.”

Meridian Foundation

Created At

ETHGlobal Buenos Aires

Project Description

A tokenized institutional wrapper that allows banks to safely deploy capital into DeFi, using a yield-earning, inflation-protected flatcoin that can also serve as the foundation for creating other products—such as competitive crypto yield accounts for customers—all while maintaining regulatory compliance and avoiding unnecessary complexity and mitigating risk.

Through the Meridian Foundation, banks and financial institutions can openly offer DeFi products, enabling their integration and use within the traditional financial system. Regulators, in turn, can publish documentation and provide recommendations for the proper use of these products.

Likewise, DeFi product creators can promote their solutions and provide the necessary information for the community or for protocols that require liquidity.

The ultimate goal is for the platform to become a robust marketplace where different buyers can easily acquire these products.

How it's Made

How We Built Meridian Foundation Smart Contracts (Solidity 0.8.20 + Foundry)

We built cross-chain bridge infrastructure using LayerZero v2 and Stargate v2. The core component is UsdcBridgeSender.sol, which implements LayerZero’s Composer pattern to enable atomic cross-chain USDC transfers with custom message passing.

One of the more hacky and notable components is our custom OptionsBuilder library, which manually encodes LayerZero execution options using low-level abi.encodePacked. This gives us precise control over gas limits for both lzReceive (200k gas) and lzCompose (500k gas) callbacks. With this setup, we can perform complex cross-chain operations—such as “bridge USDC + mint flatcoin + deposit to Aave”—in a single atomic transaction.

The Config.sol library centralizes all chain-specific constants (endpoint IDs, token addresses) as pure functions. This makes multi-chain deployment extremely simple, eliminating the need for environment variables or complicated configuration files.

Frontend Architecture (Next.js 16 App Router + TypeScript)

We used Next.js Server Components as the default rendering mode, limiting Client Components to wallet interactions and interactive visualizations. This approach keeps the application fast and reduces client-side JavaScript overhead.

For Octav integration, all API calls are routed through Server Actions (app/actions.ts) marked with "use server". This keeps the API key securely on the server and leverages Next.js’s built-in caching (next: { revalidate: 60 }) to avoid overloading Octav’s API. The collateral composition dashboard fetches portfolio data, transactions, and token overviews in parallel on the server, then streams the resulting data to the client.

Data Visualization

We used Recharts to create custom treemap visualizations (CollateralTreemap.tsx) that display asset distribution by protocol and chain. The visualizations use Argentine flag colors (#74ACDF blue, #F6B40E yellow), and currency values are formatted inline with locale-aware formatting. The custom content renderer assigns color indices based on array position to ensure a consistent visual hierarchy.

Web3 Stack

Our Web3 stack uses wagmi v3, viem, and RainbowKit 2.2 for wallet connectivity. We take advantage of the latest wagmi hooks with React Query integration, which automatically caches blockchain reads and provides optimistic updates for transactions.

UI Layer

We use Tailwind CSS 4 for the UI providing layout and spacing utilities.

Development Setup

For development, we used Foundry for smart contracts (fast Solidity testing with forge), TypeScript in strict mode, and ESLint for code quality. A monorepo architecture allows simultaneous iteration on contracts and the frontend without context switching.

Why This Stack Won

LayerZero Composer enables institutional-grade use cases such as multi-chain treasury rebalancing—capabilities that competing architectures cannot match.

Octav provides real-time visibility into collateral composition, which is critical for bank compliance teams that require transparent audit trails.

Server-side rendering plus caching delivers sub-100ms page loads, even when displaying complex DeFi portfolio data.

Type-safe contracts lead directly to a type-safe frontend, with TypeScript types auto-generated from Solidity ABIs.

The Most Technically Interesting Piece

Our LayerZero integration manually encodes compose messages that trigger cross-chain callbacks. This enables “bridge-and-execute” patterns where USDC arrives on the destination chain and is immediately deployed into Aave or Curve through the Composer contract—fully trustless and completely atomic.

background image mobile

Join the mailing list

Get the latest news and updates