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

[stacks 2.1] expose BTC/STX exchange rate in Clarity #3043

Closed
jcnelson opened this issue Feb 10, 2022 · 8 comments
Closed

[stacks 2.1] expose BTC/STX exchange rate in Clarity #3043

jcnelson opened this issue Feb 10, 2022 · 8 comments

Comments

@jcnelson
Copy link
Member

We know how much BTC was spent to mint a Stacks block, and we know how much STX was produced / acquired in it. This information could be exposed in get-block-info?.

@gregorycoppola
Copy link
Contributor

I like this feature. I like that we can get the exchange rate without looking off chain.

Using this exchange rate, a miner could stake STX to collateralize a BTC withdrawal.

And if they try to steal the BTC, they can be penalized in STX by the Stacks chain.

@MarvinJanssen
Copy link
Member

Could be very useful. 😁

@igorsyl
Copy link
Contributor

igorsyl commented Aug 4, 2022

I would not call this ratio an exchange rate given miners expect a premium. This ratio could differ from market-based exchange rate by more 10%.

@jcnelson
Copy link
Member Author

jcnelson commented Aug 4, 2022

Miners spend X BTC, and get Y STX, and this information is now reported to Clarity. get-block-info? now reports X and Y on request, so I closed this issue.

Also, this is factually the exchange rate. Just because an exchange says something different doesn't make it true; the only thing that matters here is what happens on-chain.

@gregorycoppola
Copy link
Contributor

@jcnelson What if there is an on-chain market for BTC/STX.. can we get the rate from there?

@jcnelson
Copy link
Member Author

jcnelson commented Aug 4, 2022

Sure -- this would be the way to get that exchange rate.

@gregorycoppola
Copy link
Contributor

I mean where people are literally (trustlessly) trading STX for BTC.. without anyone being a miner.

Just a market.

@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants