-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
src/tranche-space.rain
Outdated
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed a fix .
src/tranche-space.rain
Outdated
@@ -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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the multiplier metric.
src/tranche-space.rain
Outdated
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the decimals needed?
There was a problem hiding this comment.
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.
Closing this PR and putting a new one. |
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 theplottables
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
plottables
binding to have effective price denominated in USD on the stack.