Concept EireSwap will be a Uniswap like Dex, but where users have their own built-in smart wallet. The wallet utilises account abstraction primitives as well as cryptographic protocols, for example Schnorr Proof Of Knowledge, to take advantage of zero-knowledge (ZK) proofs in smart contracts. This facilitates extension of modern Automated Market Maker (AMM) protocols as utilised by Uniswap or Pancakeswap, so that users can get the advantages resulting for AA, like batching transactions and custom fee tokens. In this way, the typical swap flow seen in today's AMMs can be optimised into a one-signature flow. This is in addition to enabling one-signature cross chain trades secured by our ZK protocol. One-signature flow The main idea is to create a wallet contract that a user can own which will have a deterministic address: a smart wallet. This smart wallet acts a vessel, the means to execute their swap transactions through a relayer. Since a user's wallet contract’s address is deterministic, they can use it on any chain to execute any transaction they want on these chains in one flow. We also extend this to allow a user to create a unique private/public key pair for their wallet contract. With this, the wallet can implement its own ECDSA signature (for on-chain SC signing) and ZK proof algorithms. The private key is derived in secret off-chain and the public key is used as the salt in the deterministic CREATE2 smart contract address. Thus the user’s Externally Owned Account (EOA), smart contract wallet, and smart contract public key are all intrinsically linked.
Currently AMM swap flows require an approval, the swap transaction (tx) itself, as well as the restriction of paying gas tokens in native currency. If we abstract this tx flow to a user’s smart wallet we can essentially batch all of these transactions together and execute them in one flow. This has another benefit of giving the user the option to pay the gas fees in a custom gas token such as USDT. In this case, this is all one transaction from the user’s perspective. In the contracts, the mechanism includes the payment as an additional transaction after the swap that sends USDT from the users EOA account to the relayer, and the relayer pays the native gas for the user within the transaction.
Cross Chain swaps A unique feature that this design makes possible is the ability for the user to also execute cross chain swaps in a one-signature flow. This works in a two step process under the hood. There is both an origin chain transaction and a destination chain transaction; both are executed for the user by the relayer as components of a one-signature transaction flow. As an example, let us imagine the user has USDT on Ethereum Mainnet and wants to swap it for WBNB on Binance’s BNB chain. Furthermore, let us assume that the relayer has access to USDT liquidity on both chains. In this cross chain flow, the user will build a batched transaction where they send USDT to the relayer’s smart wallet on Ethereum Mainnet. After this is done, the relayer will run a verification protocol. The verification will assert that the contract states are correct, meaning that the user’s USDT balance has gone down by the amount they want to swap (plus fee) and that the relayer's balance has gone up by the swap amount (plus fee). Upon successful completion of this verification, the relayer will execute the destination chain transaction themselves and send the end WBNB from the relayer’s smart wallet to the user’s smart wallet address on BNB.
In this flow the relayer can be considered the source of liquidity on all chains that cross chain swaps go through. USDT will be a gateway asset that will be the used for liquidity on all supported chains. The net relayer’s balance of USDT on all chains remains constant here, but in a particular swap across two chains, the funds that the relayer uses on the destination chain’s tx will be balanced out by the funds they gain from the user on the origin chain.
Eire Swap History
-
applied to the ETH Dublin Hackathon 2024 5 months ago of which the application is still in a pending state