We present you the LKSWAP exchange, which allows you to test the decentralized swap platform created by ARC Stake, that executes trustless swaps without the need for manual interaction and with an automatic price detection, depending on demand and supply!
What is the LKSWAP exchange?
The LKSWAP exchange allows a bidirectional swap between $LKMEX and $EGLD, based on a liquidity pool that operates on the basis of a smart contract. The platform does not require the addition of liquidity, being a variation of the usual liquidity pool. All it needs to function is users who initiate swaps. In order to achieve this goal, users can perform the swaps after the epoch change for the liquidity deposited during the previous epoch.
The mechanism of the LKSWAP exchange
- Users deposit liquidity during an epoch in the desired form, namely $EGLD or $LKMEX. This liquidity will be added in the smart contract in the account of the given epoch.
Upon depositing, the user receives a receipt containing an equivalent value and the deposit epoch encoded in the attributes.
During the epoch, the price will fluctuate based on the following changes:
- The ratio of added liquidity (calculated as amount of $LKMEX deposited divided by the amount of $EGLD deposited)
- The price of $EGLD on other exchanges, such as Binance.
- Users swap after epoch change the $EGLD deposited in $LKMEX or vice versa.
The swap is performed by depositing the receipt in the swap smart contract and getting the other token in return, based on the ratio from the given epoch.
Once the epoch changes, all new deposits will be added in the “account” of the new epoch, while the previous epoch now contains an immutable ratio and withdrawals will be enabled.
- Based on the laws of supply and demand, prices will fluctuate, thus it is recommended in case of low liquidity to not add more than 1/100th of the already existing liquidity. For example, if the total liquidity is 100k of $EGLD/ $LKMEX, deposit up 1k of $EGLD/ $LKMEX.
- If during the epoch 100,000,000 $LKMEX and 100 $EGLD were deposited, the ratio will be 1,000,000 (one million $LKMEX per $EGLD). Some examples: who deposited 2 $EGLD will receive 2,000,000 $LKMEX; who deposited 100,000 $LKMEX will receive 0.1 $EGLD.
Withdrawing and reclaiming liquidity
- In order to prevent price manipulation by malicious actors holding large quantities of $EGLD or $LKMEX, during an epoch it will be possible exclusively to make deposits, without the option to revert them.
e.g. An example of price manipulation would be withdrawing a large amount of $EGLD a few seconds before epoch change, to prop up the price of $LKMEX.
Let’s say that someone wants to buy $LKMEX for 1,000 $EGLD but also has 20,000 extra $EGLD laying around. He would then attempt to manipulate price by having a deposit of 1,000 $EGLD and one of 20,000 $EGLD. If the total $EGLD added by the community before end of epoch would be 100,000 $EGLD, this would mean that if he were to withdraw 20,000 $EGLD immediately before epoch change, the $LKMEX price would increase by ~20% before anyone would have the opportunity to arbitrage the price.
- If only $EGLD or $LKMEX were deposited during an epoch, users can fully reclaim their funds after the change of that epoch.
$EGLD deposits will be favored, so those who choose to swap from $LKMEX to $EGLD will pay 0.5% fees, and those who swap from $EGLD to $LKMEX will be exempt from paying any fee.