elys-network / elys

Elys Network is the first All-In-One DEFI platform to join the Atom Economic Zone, backed by Informal Systems and the Cosmos Hub. Built on Cosmos and CometBFT, leveraging the latest blockchain technologies to provide a premier user experience. Visit our official site at https://elys.network
https://elys.network
Apache License 2.0
66 stars 52 forks source link

feat: update leveragelp total query #719

Closed cryptokage1996 closed 2 months ago

cryptokage1996 commented 2 months ago

Description

Closes:

What has Changed?


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.

I have...

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.

I have...

Deployment Notes

Are there any specific considerations to take into account when deploying these changes? This may include new dependencies, scripts that need to be executed, or any aspects that can only be evaluated in a deployed environment.

Screenshots and Videos

Please provide any relevant before and after screenshots by uploading them here. Additionally, demo videos can be highly beneficial in demonstrating the process.

cryptokage1996 commented 2 months ago

I suggest to change existing query Elys.tier.leveragelp and not add new query

  • Add a additional field in this query as mentioned in slack discussion, so there will be two fields total_assets and total_borrows
  • Reuse RetrieveLeverageLpTotal, you can return three values from this function. assets, borrows, net.
  • Use net for portfolio calculation and other two for query purposes
  • This will simplify and reuse the existing logic

As mentioned in ticket i created 2 seprate queries