Summary of KIP-247
This proposal facilitates users without KAIA to swap their tokens into KAIA. Only swaps from whitelisted tokens are supported. The user lends some KAIA from proposer, which enables sending transactions. Then, user pays back from the swap output.
Technical Outlook
Gasless transaction is a specially treated transaction where .
GaslessTx comprises two components: an optional approval transaction (GaslessApproveTx) and a necessary swap transaction (GaslessSwapTx). To use gasless swap, the swap transaction must have to
address to GaslessSwapRouter contract.
When a proposer detects GaslessTx, it lends the user KAIA (LendTx) and bundles it with GaslessTx (via the bundling mechanism from KIP-245). The GaslessSwapRouter ensures the repayment of both the lent KAIA and the gas fee spent by the proposer.
LendTx: transfer from proposer to user XX KAIA.
GaslessApproveTx: user approves the token to GaslessSwapRouter. It can be ommitted if already approved.
GaslessSwapTx: user swaps token into KAIA, and repays the proposer (XX + gas fee) KAIA.
FAQ
- Q. Can a user swap any tokens into KAIA?
A. No, the token needs to be whitelisted. - Q. How is a token whitelisted?
A. For now, only Consensus Liquidity tokens are considered (KIP-226). - Q. Can it be only used by users without KAIA?
A. No, any users can send gasless transaction. - Q. Does this require a hardfork?
A. No. It does not introduce a new type of transactions nor EVM modification. - Q. How does a DApp enable this?
A. It must support wallets which provide this functionality.