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 tranche-space dashboard #44

Closed
wants to merge 3 commits into from

Conversation

Siddharth2207
Copy link
Contributor

@Siddharth2207 Siddharth2207 commented May 18, 2024

Motivation

Binding and charting buys and sells when twap identity is used for TKN tranche ratio denominations.

Solution

Add bindings for tranche-space when tranche ratio/base are denominated in token like WETH. Update the plottables binding, so the effective price denominated in USD can be plotted in the chart for when the twap identity is used for buys and sells.

Checks

  • Update bindings to have twap identity for buy and sell
  • Update plottables binding to have effective price denominated in USD on the stack.

amount
io-ratio:,
input-amount: decimal18-mul(amount io-ratio),
effective-price: decimal18-inv(io-ratio);
effective-price: decimal18-inv(io-ratio),
effective-price-twap: decimal18-inv(tranche-io-ratio);
Copy link
Contributor

Choose a reason for hiding this comment

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

this isn't always a twap

Copy link
Contributor Author

@Siddharth2207 Siddharth2207 May 19, 2024

Choose a reason for hiding this comment

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

should i just rename effective-price-twap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pushed a fix .

@@ -481,7 +514,7 @@ deployments:
amount-available: decimal18-mul(tranche-total-size tranche-space-available),
amount: if(amount-is-output amount-available decimal18-div(amount-available final-io-ratio)),
io-ratio: final-io-ratio,
:call<'plottables>(amount io-ratio);
:call<'plottables>(tranche-io-ratio amount io-ratio);
Copy link
Contributor

Choose a reason for hiding this comment

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

we should show the multiplier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry more context please, tranche-io-ratio is the multiplier what is it that needs to be shown ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the multiplier metric.

# the tranche size/ratio was denominated in USD, then the reference and
# reserve bindings need to be given along with the twap bindings
reference-stable: 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9
reference-stable-decimals: 6
Copy link
Contributor

Choose a reason for hiding this comment

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

are the decimals needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, they are passed as an argument for the uniswap twap call.

@Siddharth2207
Copy link
Contributor Author

Closing this PR and putting a new one.

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.

2 participants