Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Document sBTC Mini #13

Closed
netrome opened this issue Jul 20, 2023 · 14 comments · Fixed by #36
Closed

Document sBTC Mini #13

netrome opened this issue Jul 20, 2023 · 14 comments · Fixed by #36
Assignees

Comments

@netrome
Copy link
Contributor

netrome commented Jul 20, 2023

Definition of Done

We have an explanation of what sBTC Mini is, why it is being created, and the technical/economic differences between it and full sBTC.

@netrome netrome moved this to 🆕 New in Stacks Core Eng Jul 27, 2023
@netrome netrome moved this from 🆕 New to 📋 Backlog in Stacks Core Eng Jul 27, 2023
@friedger
Copy link
Collaborator

friedger commented Jul 29, 2023

Sbtc mini is a decentralized stacking pool on stacks 2.4 that distributes rewards in sBTC.

In Stacks 2.4, only this stacking pool contract can mint and burn sBTC. That means sBTC is secured by the locked stx in the stacking pool.

The stacking pool can have at most 100 members. It is active only if the stacked amount is 1m STX or more. The minimum required locking amount for pool members is 10k stx.

Pool members are responsible managing a bitcoin wallet that backs sBTC. They are responsible for handling deposits and withdrawals of bitcoin to and from the wallet as described on the sBTC page with the following exceptions:

  • btc withdrawal requests can only be submitted as a stacks tx.
  • if the pool is not active, sbtc is frozen sbtc deposit/withdrawl is frozen until the pool is reactivated.

@netrome
Copy link
Contributor Author

netrome commented Jul 31, 2023

if the pool is not active, sbtc is frozen until the pool is reactivated.

I assume holders of sBTC will still be able to transfer sBTC and use the token - and just the ability to withdraw/deposit is frozen right?

@friedger
Copy link
Collaborator

@netrome Yes, correct. I'll update my comment.

Do you have a different/better proposal what happens if the pool is not active? The punishment is stopped as well.

@netrome
Copy link
Contributor Author

netrome commented Jul 31, 2023

Do you have a different/better proposal what happens if the pool is not active? The punishment is stopped as well.

I don't follow what "the punishment is stopped" means. Does mini have a means of penalizing signers if they don't fulfill their duties - beyond keeping their STX locked? I mean, they would still receive their BTC rewards right?

@friedger
Copy link
Collaborator

@netrome Stackers can drop out by revoking (the permission for the pool admin to extend locking), therefore, their STX can't be kept locked. Once they STX is not locked anymore, they won't receive any BTC rewards any more.

I don't understand the reward distribution algorithm yet, maybe we can make it so that the BTC rewards are frozen when the pool is not active.

@netrome
Copy link
Contributor Author

netrome commented Jul 31, 2023

I don't understand the reward distribution algorithm yet, maybe we can make it so that the BTC rewards are frozen when the pool is not active.

The BTC rewards are controlled by PoX consensus, and I'd assume that any changes there would be consensus breaking and therefore not in scope for Mini.

Then it sounds like we don't have any means to economically incentivize stackers to behave in Mini, which is along the lines of what I've heard before. We're relying on them to be benevolent.

@netrome netrome moved this from 📋 Backlog to 💻 In Progress in Stacks Core Eng Aug 1, 2023
@friedger
Copy link
Collaborator

friedger commented Aug 8, 2023

BTC rewards are collected in the peg wallet (what is the new name for it?) and distributed like in any stacking pool proportionally to the stacked stx of each stacker.

We could deactivate the distribution if the pool is inactive the next cycle.

@netrome
Copy link
Contributor Author

netrome commented Aug 8, 2023

BTC rewards are collected in the peg wallet (what is the new name for it?) and distributed like in any stacking pool proportionally to the stacked stx of each stacker.

We could deactivate the distribution if the pool is inactive the next cycle.

sBTC wallet is the term used in the docs nowadays.

Who would deactivate the BTC reward distribution? Is that governed by the smart contract? Since anyone can just drop out of the pool I don't see a big benefit of this addition.

@friedger
Copy link
Collaborator

friedger commented Aug 8, 2023

Isn't the flow

  1. Join
  2. Vote
  3. Transfer
  4. Audit
  5. Get rewards

If you leave early, you don't get rewards for the current cycle.

If you misbehave, you don't get rewards for the upcoming cycle and your locking is extended.

Therfore, the punishment comes before the rewards.

The rewards for the punished cycle could be used to pay interest for the failed withdrawals.

@friedger
Copy link
Collaborator

friedger commented Aug 8, 2023

Oh, I see the rewards can be distributed earlier because it is on bitcoin.

@netrome
Copy link
Contributor Author

netrome commented Aug 8, 2023

Yeah, 2. 3. and 4. is happening independent of 5. Also, how does the reward deactivation work? Would the entire pool be cut out from getting BTC rewards and how does that work?

The biggest sBTC risk would be the signers all colluding together to steal the sBTC wallet BTC, and as I understand it we can't penalize them proportionally if they do so in 0.1. Therefore 0.1 relies on the assumption that signers are benevolent and play nice.

@friedger
Copy link
Collaborator

friedger commented Aug 8, 2023

Yes, you are correct

@netrome
Copy link
Contributor Author

netrome commented Aug 8, 2023

Thank you for confirming 🙏

@jio-gl jio-gl linked a pull request Aug 16, 2023 that will close this issue
@netrome netrome moved this from 💻 In Progress to ⏸️Paused in Stacks Core Eng Aug 22, 2023
@friedger
Copy link
Collaborator

outdated

@github-project-automation github-project-automation bot moved this from ⏸️Paused to ✅ Done in Stacks Core Eng Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.