Open dzmitry-lahoda opened 1 year ago
So when I want start on some blockchain, I can set limit and end up on other chain to settle to limit.
But really sometimes start is automatic on chain and it does not have data about limit.
It can do only slippage.
What is slippage?
It tells I trust market, and given time window of N blocks on target chain, I accept any market spot price which is not so far from what is was on some average last N blocks
.
So really small ORDER_SIZE/BIG_POOL it works awesome.
How to express this?
Currently assets are NFT | Fungibles.
Both of above, bread and butter, of DeFi and blockchins, easy to express for Fungibles.
How to than form/limit XCM Instuction which works only for Fungibles?
Is it considered split instuction to kind of which inputs only Fungibles, or inputs and outputs Fungibles.
So that DeFi intents expresable.
Price
Let look at exchange instruction
Then, there are so called batch auctions (actually order books, but without FIFO, popular in Ethereum, example is COW protocol). As per
Multi-token Batch Auctions with Uniform Clearing Prices Tom Walther 2021
paper. Sorry for images:So as you can see there is more to express in instruction and needs more parameters,
ExchangeAsset
expresses only part of these.So it may be possible to consider extending
ExchangeAsset
with more parameters, or adding newOrder
instuction. Order instruction may or may not consider "returning" register with position identifier (so it can be just non fungible asset too).