Skip to content

Commit

Permalink
Not allow duplicated vote-key entries (CIP-0036)
Browse files Browse the repository at this point in the history
Added lines to make it clear that duplicated voting key entries (delegating weighted voting power) are not allowed in the registration metadata format and should be handled as invalid if such entries are included. This keeps away confusion about how the weight for each voting key should be calculated and its also mandatory for hw-wallets showing the right amount of weight for each voting key entry.
  • Loading branch information
gitmachtl committed Sep 24, 2022
1 parent 50295c1 commit 2a2fafb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CIP-0036/README.md
Expand Up @@ -71,6 +71,8 @@ Recall: Cardano uses the UTXO model so to completely associate a wallet's balanc

Given the above, we choose to associate staking credentials with voting keys. At the moment, the only supported staking credential is a staking key. Since most Cardano wallets only use base addresses for Shelley wallet types, in most cases this should perfectly match the user's wallet.

No duplicated voting key entries are allowed in the voting key delegegation array, to remove weighting confusion and to support hw-wallet handling. HW-Wallets with there limited mem space, have to display the proper weight values for a voting key entry. Registration metadata containing duplicated voting key entries should be handled as invalid.

The voting power that is associated with each delegated voting key is derived from the user's total voting power
as follows.

Expand All @@ -80,6 +82,7 @@ as follows.
total voting power (rounded down);
4. Any remaining voting power is assigned to the last voting key in the delegation array.


This ensures that the voter's total voting power is never accidentally reduced through poor choices of weights,
and that all voting powers are exact ADA.

Expand Down Expand Up @@ -113,6 +116,7 @@ considered valid if the following conditions hold:
- The reward address is a Shelley address discriminated for the same network
this transaction is submitted to.
- The delegation array is not empty
- The delegation array does not contain multiples of the same public voting key
- The weights in the delegation array are not all zero


Expand Down

0 comments on commit 2a2fafb

Please sign in to comment.