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

feat: staking data product pricing per pool #139

Open
wants to merge 9 commits into
base: feat/staking-data-pool-detailed-capacity
Choose a base branch
from

Conversation

rackstar
Copy link
Contributor

@rackstar rackstar commented Oct 11, 2024

Description

Closes #131

/capacity/:pooId:

  • new capacityPerPool field object - min/maxAnnualPrice for a product per pool

NOTE: this PR is behind #130

Testing

unit tests

Checklist

  • Performed a self-review of my own code
  • Made corresponding changes to the documentation

@rackstar rackstar self-assigned this Oct 11, 2024
@rackstar rackstar force-pushed the feat/staking-data-product-pricing-per-pool branch 2 times, most recently from 9337fb9 to d8e7aa8 Compare October 11, 2024 14:00
@rackstar rackstar changed the title Feat/staking data product pricing per pool feat: staking data product pricing per pool Oct 11, 2024
@rackstar rackstar changed the base branch from dev to feat/staking-data-pool-detailed-capacity October 11, 2024 14:01
@rackstar rackstar force-pushed the feat/staking-data-pool-detailed-capacity branch from 999a544 to b73a66b Compare October 11, 2024 14:02
@rackstar rackstar force-pushed the feat/staking-data-product-pricing-per-pool branch from d8e7aa8 to c5fda65 Compare October 11, 2024 14:03
Comment on lines +66 to +74
function calculateProductDataForTranche(productPools, firstUsableTrancheIndex, useFixedPrice, now, assets, assetRates) {
const aggregatedData = {
capacityUsedNXM: Zero,
capacityAvailableNXM: Zero,
minPrice: Zero,
totalPremium: Zero,
};

const capacityPerPool = productPools.map(pool => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main change here is adding capacityPerPool to the result along with the previous aggregatedData return value

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.

Staking Data (Part 2)
2 participants