project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

CCIP Limit Order

A Multichain Limit Order powered by chainlink's CCIP

CCIP Limit Order

Created At

ETHGlobal Paris

Winner of

trophy

šŸ— Chainlink ā€” Best use of CCIP

Project Description

This project allows makers to create orders and takers from any chain to fill this order using CCIP. The maker can also restrict the taker to a specific address, this can be used to create a multichain escrow contract. The taker will pay the ccip fee and the maker token will be redeemable for the taker on the maker chain. If for any reason the order can't be filled (if it's locked to an user, canceled or already filled) the taker tokens will be kept in the contract and the taker can claim them directly in the contract and send them to any chain. This contract even works with non-CCIP tokens, but will be restricted to only taker on the same chain.

How it's Made

The first idea I had was to create an escrow contract, but I realized that limit order is a generalization of escrow if you allow limit order to specify a taker. The contracts are made to make sure the tokens can't be lost even if sent to an id that doesn't exist or is already filled.

The contracts of this project are made in Solidity, using Foundry. The tests are made local-only as I created a mock router that allows to forward messages as if they were crosschain. The test contracts were deployed to Avalanche Fuji and Ethereum Sepolia. The multichain capability is made thanks to chainlink's CCIP. The very basic front-end was made using Wagmi, this is the first time I ever use Wagmi and barely ever used React.

background image mobile

Join the mailing list

Get the latest news and updates