Skip to content

Infinity Protocol enables seamless crosschain swaps that guarantee the most optimal trade ratio to the consumer by enabling an intent based dutch-auction system to fullfill orders.

Notifications You must be signed in to change notification settings

SaratAngajalaoffl/ethindia23-infinity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infinity Protocol

Infinity Logo

Infinity enables seamless crosschain swaps that guarantee the most optimal trade ratio to the end user by enabling a dutch-auction system to fullfill orders.

Problem statement

Infinity enables users to find most optimal swaps across chains whilst providing a simple UX to the end user.

A user can define his intent to swap as follows, "I want 10 LINK tokens on Scroll, use a maximum of 10 USDT, 10 USDC and 0.05 WETH from BASE and fulfill it within 10 seconds"

This data get serialized and the input tokens are locked in a contract to initiate a dutch-aution on scroll where solvers lock tokens to provide the best valued trade. Once the user-specified time period ends, the input tokens get released to the auction winner and output tokens get released to the user.

Creating a competition among solvers to provide the best possible price ensures that the user is getting the most optimal trade.

Implmentation Details

Following are the protocols being used

  • Scroll, Celo, Mantle, Sepolia, Base and Arbitrum - Chains to deploy on
  • Chainlink CCIP - to pass messages across chains
  • Safe AA SDK - to enable seamless authentication and batching of transactions

User sends a transaction calling the below function on the InfinityEntrypoint contract on the source chain

initiate(
	address[] inputs,
	address[] inputAmounts,
	address output,
	address outputAmount,
	uint256 destChain,
	uint256 duration
)

The contract locks all the input tokens within itself and uses CCIP to register the trade on destChain

Solvers call the below function on the InfinityEntrypoint contract on the destination chain.

propose(
	uint256 tradeId,
	address inputValues[]
)

The contract gets the market price conversion (Mocked for now) to determine the new solution is better value than the previous provided / initial solution

Once the user-set duration elapses, the winner of the auction calls the below function to claim his reward and complete the trade, releasing funds to the user.

claim(
	uint256 tradeId
)

The contract checks the defined duration has elapsed and releases funds on the destination chain to the user. It also makes another crosschain request to initiate release of funds on the source chain to the solver

Deployment Addresses

Sepolia

Base

Mantle

Scroll

Arbitrum

Celo

Chainlink

Transaction Trace

  • User Initiates Trade - here
  • Trade propagates through CCIP - here
  • Corresponding transaction on base-goerli chain - here
  • Solvers propose solutions - here and here
  • Winner of the auction claims the rewards - here
  • A message again propagates through CCIP - here
  • And initiates release of user funds on the destination chain - here

Team

Sarat Angajala - SaratAngajalaoffl

About

Infinity Protocol enables seamless crosschain swaps that guarantee the most optimal trade ratio to the consumer by enabling an intent based dutch-auction system to fullfill orders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages