Skip to content

Conversation

ppolewicz
Copy link
Collaborator

Some smart contracts, such as collateral and treasury, need a way to count votes of validators in order to make a decision for the subnet.
The only metrics currently available are:

  • current stake
  • stakeweight (stake snapshot saved at the last epoch)

and both can be manipulated with loans and flashloans, where an attacker could hijack the treasury or burn collaterals of his competitors.

The proposed solution is for the chain to provide a reliable metric that the votes could be weighted by. This could then be used by smart contracts as well as on-chain logic.

Copy link
Collaborator

@sam0x17 sam0x17 left a comment

Choose a reason for hiding this comment

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

this looks very solid to me. I am personally in favor of min, though I want to better understand how it could be manipulated by whales moving stake between root validators, would min not be the meanest/safest one?

@ppolewicz
Copy link
Collaborator Author

this looks very solid to me. I am personally in favor of min, though I want to better understand how it could be manipulated by whales moving stake between root validators, would min not be the meanest/safest one?

If you were a whale capable of running btcli stake move to shift stake between validators paying tiny fees (a few cents), then I could pay you very little to do just that, weakening the voting power of a validator that you usually stake with. You can do this a many times and it costs almost nothing, which concerns me.

@sam0x17
Copy link
Collaborator

sam0x17 commented Oct 23, 2025

based on some additional discussions I think just avg is fine!

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.

2 participants