I think this deserves a discussion because everyone in the ecosystem is using ICPSWAP//SONIC.
Basically, what happens is that the bots know that you pressed the “swap” button and which tokens you are going to exchange. So, before you can do anything, the bot buys before you, leaving you with a worse price, and sells exactly when you finish the operation, lowering the price after you buy it. This is done without paying swap fees because they do not use the blockchain to perform the swap, and that’s why their movements are not recorded.
Is it really ethical for a bot to do that with all the transactions that users make?
Another discussion outside of ethics… If we want a DEX on ICP, are we allowing a DEX to behave internally like a CEX (validating centralized transactions) and showing and making public only some transactions?
I believe the basic requirements for any DEX would be:
Fighting against bots
Not allowing bots to have the ability to know which tokens you are going to swap to buy before you
All swap information must be public on each corresponding blockchain: Example: If they exchange ICP → GLDGOV, those transactions must be visible on the ICP chain and the GLDGOV chain.
How can it be that a DEX allows internal pool transactions without being transparent?
The cli is communicating with the swap pool canister. If a canister is just moving tokens around on an internal ledger without telling the token ledgers you will not see the movements.(this is similar to how Rex’s look on a Cex. All the tokens are held in one account and you are dependent on the contract to keep things accounted for. It saves fees. As long as the contract has its own ledger(which it looks like we are looking at) and you trust the contract code, this should be fine and is preferable to a Cex.
You won’t see a trx until the buyer moves their tokens back to their wallet.
However, according to transaction records, this ppcoj-ccnbc-jly4q-lfq7t-qeu3e-ud3kk-uav6f-f5dt3-jpxbx-radmt-pae account did’t have any steps to deposit tokens.
this is a cost-free arbitrage.
Someone is siphoning our hard earned money! The money that this bot is siphoning is taken out of the people’s trades! People are getting worse trades because of this. It is exploiting the fact that on an AMM (automated-market-maker) swap, the users cannot control the price at which the user sells his/her tokens. Once a user comes to make a trade in an AMM, the rate (price) of the trade is given into the hands of the algorithm of the swap, which is being exploited as is shown here! This happens due to the vague concept known as “slippage” where you hear people always saying “you need to learn how slippage works”. The fact is, no matter how you spin it, “slippage” means that the user loses control of the sale-price of the user’s tokens.
Let’s take a scenario of a person selling a car by trading the car for dollars. Imagine if the person selling the car could not choose how much dollars he/she is willing to sell the car for! That would be ridiculous.
We can get rid of this problem by creating a trading platform where the user chooses the price per token of the tokens that he/she wants to trade, and the platform will only perform the trade of those tokens with people willing to buy those tokens at that price specified. So both sides of a trade specify the price (rate) they are willing to trade at, and the platform matches compatible trades. This mechanism makes sure that a bot cannot sway the price of other peoples’ trades. This mechanism is at the heart of the CYCLES-TRANSFER-STATION trading market. The CTS is built with this mechanism, where each user chooses the sale-price of his/her tokens, and the CTS market matches compatible trades where both sides of the trade choose to trade with the same price (rate).