1

On Sushi.com it is possible to set limit orders.

From their documentation:

When the user creates a limit order for a purchase or a sale on SushiSwap, the order is sent to an AWS server[...]

And in the following paragraph:

[...]These filler bots have wallet addresses with private keys and public keys, as does the user, and SushiSwap. In order to execute the swap itself, the filler bots call the smart contract for the pair requested by the user, if/when the price reaches the value set in the limit order. The smart contract in turn will fill the order by sending funds to the users wallet, and in the process, it sends the limit order fee to the filler bot as profit. This exchange of funds is essentially an exchange of balances, that is communicated via an encryption.[...]

Basically, from what I understand, the steps are:

  1. A user decides the prices the transaction will be executed at
  2. Something (?) is sent to a centralized server
  3. Another user/wallet (let's simplify) can execute it (how?)

Based on how Ethereum is built, this is quite puzzling to me (some of the questions that pop in my mind are: are they sending a signed transaction or what else is the user signing? How is this "exchange of balances" happen? Is it done via allowances? Can this mechanism be extended to something else or it is possible only for swaps?).

Can someone explain how this works/might work?

Note: I understand how the gasless part works, what I am trouble with is how the exchange of funds does and what the user is signing.

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.