Coincidence of Meow (CoM), a cross-chain token swap protocol in a Peer-to-Peer (P2P) matching flow and with 1:1 price ratio. Basically like CoW-Swap, but for cross-chain bridging and with Cat sounds!
Prize Pool
Prize Pool
With the omnipresence of Layer 2s and other chains, their low gas prices are a significant advantage. However, bridging assets between Layer 2s remains a costly affair. Simultaneously, funds are consistently moving in both directions. Our project aims to streamline this process by pairing users intending to bridge in opposite directions, settling transactions efficiently. Instead of bridging tokens, we match and execute orders when an opposing order is found. This innovative approach reduces costs enhances the efficiency of cross-chain transactions and allows to bridge tokens almost with a 1:1 price ratio.
How it works?
Alice has 1000 Meow tokens on Chain A, and wants to swap them for 1000 Meow tokens on Chain B. Bob has 1000 Meow tokens on Chain B, and wants to swap them for 1000 Meow tokens on Chain A.
They both use the CoM protocol to swap their tokens, Alice deposits the tokens and creates the order (Maker), Bob matches the order (Taker) and initiates the swap. So Bob deposits the tokens and starts the settlement, the tokens are locked and a cross-chain message is sent to the other chain. Which unlocks the token and a message is sent back to the original chain to unlock the tokens there.
Simple, right? No pool or liquidity provider, just a simple P2P swap.
Our project integrates Solidity-based EVM contracts, compiled and tested with Hardhat, with the Chainlink Cross-Chain Interoperability Protocol (CCIP) for cross-chain messaging. The primary contract is the CrossChainSwapper, which can be deployed to any EVM chain. This contract is responsible for creating orders (Make) and settling orders (Take). Simultaneously, this contract acts as a sender and receiver of cross-chain messages via CCIP. A typical settlement requires two messages to be sent between the settling chains. However, further improvements and a better proving scheme could enhance this functionality and make it more efficient.
CCIP is a standard for cross-chain communication. We use it to send messages between the chains to settle the swap and unlock the tokens. It is fundamental to our protocol and relies on the security of the Chainlink network.
The front end is built with Next.js and fetches data directly from the RPC.