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

update liquidity/price info #286

Merged
merged 13 commits into from
Oct 12, 2020
Merged

Conversation

ssallam
Copy link
Contributor

@ssallam ssallam commented Oct 7, 2020

No description provided.

@ssallam ssallam requested a review from a team as a code owner October 7, 2020 07:05
Copy link
Member

@alexcos20 alexcos20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kremalicious
Copy link
Contributor

As written on Slack maybe it's better to use price as categorization for all that, including pool liquidity. We have to also consider the exchange assets. So within the DDO we could have ddo.price similar to react hook's BestPrice with:

price: {
  type: 'pool',
  address: '0xxxx' // the pool/exchange address
  value: 10 // the price which is either pool price of fixed price
}

And we could extend that with also adding reserve or something with array of objects for the tokens in pool.

But for now current implementation would be enough to query Aquarius and order results based on dtPrice

@kremalicious
Copy link
Contributor

using this query then for assets list on market front-page, think that's how to sort by that in ElasticSearch:

const query = {
   page: 1,
   offset: 20,
   query: {},
   sort: { dtPrice: 1 }
 }

@ssallam ssallam merged commit 182f848 into feature/datatokens Oct 12, 2020
@ssallam ssallam deleted the feature/update-dt-liquidity branch October 12, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants