You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current implementation of autoswap assumes two kinds of tokens and one liquidity pool. We would like to allow users to create new liquidity pools for a new pair of tokens if the particular liquidity pool does not already exist.
The end goal is that a user would be able to trade x for z by using two liquidity pools: (x, y) and (y, z).
Assumptions:
Smart contracts will be instantiated with terms, which include an array of assays to start with.
Contracts can reject these user defined terms and can reject offers.
Contracts can asynchronously add a new assay to the end of the canonical array of assays. This is not synchronous because the new assay may be remote so we must wait for the remote response.
Contracts can have methods that allow external users to add assays to the contract. (Compare to the Uniswap factory.)
The following changes are necessary to make this possible:
Zoe currently has the concept of keywords which are used as indexes in place of the array indexes that we had previously. The keywords are used to match proposal elements, payments, amounts in the offerRecord within Zoe, and payouts to the user. Keywords are per contract, and are currently objective: they are the same for all users of a contract.
We expect that future contracts (specifically multipool Autoswap #391 ) will have many keywords, potentially hundreds. Therefore, we want to ensure that the keywordRecords (records using keywords as keys) throughout Zoe are sparse, much sparser than all the keywords for a contract.
Our current implementation of autoswap assumes two kinds of tokens and one liquidity pool. We would like to allow users to create new liquidity pools for a new pair of tokens if the particular liquidity pool does not already exist.
The end goal is that a user would be able to trade x for z by using two liquidity pools: (x, y) and (y, z).
Assumptions:
The following changes are necessary to make this possible:
The text was updated successfully, but these errors were encountered: