Prohibit self-withdrawals from Vote accounts #594
grod220
started this conversation in
SIMD Discussions
Replies: 2 comments
|
+1 for me! |
0 replies
|
Another no-brainer, sounds great to me! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
The Vote Program allows a Vote account to be both the source and destination of
Withdraw. When the authorized withdrawer requests the full balance, the program zeroes the account's state, then subtracts and re-adds the lamports to the same underlying account. The transaction succeeds with the balance unchanged and the state erased. This leaves a funded, rent-exempt, and uninitialized Vote account. Another party can then initialize it with their own validator identity and authorities, taking control of the retained balance.Proposal
Reject all Vote account self-withdrawals with
InvalidArgumenterr.Because Vote remains a native builtin, this is a consensus-impacting change requiring a feature gate and matching behavior across validator clients.
Precedent
The Stake Program already rejects self-withdrawals with
InvalidArgument. See solana-program/stake#96.All reactions