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

TIP-100 preparation #171

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

TIP-100 preparation #171

wants to merge 6 commits into from

Conversation

vzotova
Copy link
Contributor

@vzotova vzotova commented Feb 13, 2025

  • Block new stakes, top-ups, authorization increases, slashing, and everything that won’t be needed during transition
  • Forced deauthorization of Beta stakers
  • Forced deauthorization of all stakes above 15m T -> so only 15m T is authorized and earns rewards
  • Opt-out deauthorization of 50% of each remaining stake

@vzotova vzotova self-assigned this Feb 13, 2025
@vzotova vzotova force-pushed the tip-100-preparation branch from ce10810 to 50df19c Compare February 13, 2025 15:52
@vzotova vzotova changed the title [WIP] TIP-100 preparation TIP-100 preparation Feb 14, 2025
@vzotova vzotova marked this pull request as ready for review February 14, 2025 21:25
@pdyraga
Copy link
Member

pdyraga commented Feb 17, 2025

I am confused about the proposed changes and how they relate to TIP-92. The TIP-92 says:

Along with the cessation of staking rewards, this proposal would allow for immediate unstaking by non-Beta Stakers without the mandatory 45-day and 6-month cooldown periods for tBTC and TACo, respectively.

What I believe this Pull Request currently proposes is to allow anyone to decrease their stake up to 15M T but it does not allow them to unstake everything.

Also, I am not sure if using the involuntaryAuthorizationDecrease is the right path as this function was designed for applying slashing side-effects. For tBTC, the governance is able to update authorization parameters and updating the same parameters in the WalletRegistry and RandomBeacon contract should allow to achieve the result from TIP-92. I do not know if something similar can be done for TACo, though.

I am also unsure about removing the functions for staking and increasing authorization. Why to prevent new T stakers from staking if they want to run TACo nodes or why to prevent the DAO from adding new beta stakers to tBTC? Until a change is made to how the wallet registry and sortition pool work - and note the sortition pool is not an upgradeable contract - this is the only way to add new beta stakers. Same question for increasing authorization. One that currently has 1M T stake in TACo, may want to increase it to 15M T stake, I think we should not be disallowing it.

Last but not least, I fundamentally disagree with TIP-92 idea of locking the stake of an arbitrary group of stakers by majority vote. The beta stakers did not opt-in for the new rules and the majority shouldn't change them in the middle of the game, especially with such short notice.

Copy link
Member

@manumonti manumonti left a comment

Choose a reason for hiding this comment

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

Also, the event AuthorizationInvoluntaryDecreased is no longer necessary, right? can we get rid it of it?

Great work! I have some minor suggestions in case you think it's worthwhile

/// Can be called by anyone.
// TODO consider rename
function forceCapDecreaseAuthorization(address stakingProvider) public {
//override {
Copy link
Member

@manumonti manumonti Feb 17, 2025

Choose a reason for hiding this comment

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

is this comment useful? or just a leftover of some code you wanted to delete? I mean the //override {

}
}

require(deauthorized > 0, "Nothing was deauthorized");
Copy link
Member

Choose a reason for hiding this comment

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

just in case you prefer this wording

Suggested change
require(deauthorized > 0, "Nothing was deauthorized");
require(deauthorized > 0, "Nothing to deauthorize");

);
cleanAuthorizedApplications(stakingProviderStruct, 1);
}

// TODO consider rename
Copy link
Member

Choose a reason for hiding this comment

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

I think this name is ok. Or at least I can't think of a better one.

maxAuthorization = MAX_STAKE;
availableToOptOut = HALF_MAX_STAKE;
}
require(availableToOptOut >= amount, "Opt-out is not available"); // TODO rephrase
Copy link
Member

Choose a reason for hiding this comment

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

What about...

Suggested change
require(availableToOptOut >= amount, "Opt-out is not available"); // TODO rephrase
require(availableToOptOut >= amount, "Opt-out amount too high);

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.

3 participants