Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Zoe] Autoswap: Allow users to create new liquidity pools in the same contract #391

Closed
3 of 4 tasks
katelynsills opened this issue Jan 9, 2020 · 1 comment
Closed
3 of 4 tasks
Assignees
Labels
Zoe package: Zoe
Milestone

Comments

@katelynsills
Copy link
Contributor

katelynsills commented Jan 9, 2020

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:

@katelynsills katelynsills added the Zoe package: Zoe label Jan 9, 2020
@katelynsills katelynsills added this to the Zoe 0.2.1 milestone Jan 9, 2020
@katelynsills katelynsills modified the milestones: Zoe 0.2.1, Zoe 0.2.2 Jan 24, 2020
@katelynsills katelynsills self-assigned this Feb 12, 2020
katelynsills added a commit that referenced this issue Apr 4, 2020
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.
@katelynsills katelynsills modified the milestones: Zoe 0.3.1, Zoe 0.5.0 Apr 7, 2020
@katelynsills
Copy link
Contributor Author

Closed by #861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Zoe package: Zoe
Projects
None yet
Development

No branches or pull requests

1 participant