project screenshot 1
project screenshot 2
project screenshot 3

KingSwap

Pay for transactions fees with USDC and a single permit approval

KingSwap

Created At

ETHGlobal London

Winner of

Arbitrum - Qualifying Arbitrum Submissions

Prize Pool

Project Description

KingsSwap allows users to swap their ERC 20 tokens without having the chain native token. We do this through EIP-2612 permits which allow the user to approve token spending without paying any gas fees upfront.

We facilitate the swaps using Pancakeswap contracts and v4 hooks for gas calculation. In v1, the user can permit the contract to transfer their tokens, and then we do the swapping on their behalf. In v2, we take the transaction fee cut from the user and refund the surcharge using the hooks at the end of the transaction.

This idea also expands to transactions; users can send tokens to another wallet without the chain's native token. For future builds we are aiming to include more ERC-20 tokens to be compatible in our platform to enable

How it's Made

The idea originated when as past hackathon winners we had received USDC from one the sponsors on a layer 2 that we had never used before on main-net. As we had no native tokens on the layer 2 we opted to use already existing "gasless" solutions such as "1inch fusion" and UniswapX only to realise that we had to approve our token spending prior which of course cost gas.

This is honestly horrible user experience.

Since the tech is already here to fix this we decided to change this and develop a solution that newly onboarded user would not have to run into this. This is also why we chose to use Dynamic as our wallet provider. It enables the users not only to sign in with their wallet but also their email which can be extended to a bunch of cool use cases.

The smart contract is powered by Pancakeswap v4 extended smart contracts which are deployed on sepolia, base-sapolia and arbitrum-sapolia chains.

background image mobile

Join the mailing list

Get the latest news and updates