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

Limiting swapping-to-staked-SRI for the Serai network #622

Open
kayabaNerve opened this issue Oct 7, 2024 · 0 comments
Open

Limiting swapping-to-staked-SRI for the Serai network #622

kayabaNerve opened this issue Oct 7, 2024 · 0 comments
Labels
discussion This requires discussion runtime

Comments

@kayabaNerve
Copy link
Member

#619 (comment)

How do we feel about the fact people can swap to staked SRI for the Serai network even if the Serai network has the amount of stake it should? By the economics, we target 20% of the network's stake to be behind the Serai network itself. Maybe worth an additional clause in that regard?

#619 (comment)

Hm. I'm fine kicking this to a separate PR if we can't immediately resolve it, yet I do want to discuss this algorithm more. This limits to 20% of the current stake to external networks. That works if and only if Serai is the last network to be staked for. It does not allow Serai to be the first algorithm to be staked for.

From the initial distribution, we can calculate how much the Serai network should have and simply use that value as the limit.

That has the following quirks in behavior:

  1. It allows the Serai set to be staked for at an arbitrary point in time, with a much simpler check here
  2. If various LPs leave (burning the SRI, reducing the amount needed for economic security), then we may have more SRI stake than targeted

In the case of 2, we simply revert to relying on the emissions distribution to maintain the optimal distribution. I do have a concern where a large amount of people stake to the SRI network just to swap to SRI at the spot price. While we're discussing non-trivial slashes re: external networks for offline validators, running a Serai node may only have trivial slashes and is far less annoying to setup a node for. Then since the Serai network is perceived as having infinite capacity, validators can immediately unstake after economic security with their spot-price SRI. The first option (currently implemented) does better in that regard by ensuring the amount staked to SRI is only the amount needed.

Also, further edge case, the final stake which causes economic security is unbounded. This is not too likely to be an issue? But likely yet another reason to open an issue for this and kick it to another PR (and if we do that, I'm fine leaving this here as the initial implementation).

cc @akildemir

@kayabaNerve kayabaNerve added discussion This requires discussion runtime labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This requires discussion runtime
Projects
None yet
Development

No branches or pull requests

1 participant