Skip to content

Commit bf84c22

Browse files
authored
first draft remediation of CIP-0071 (cardano-foundation#717)
1 parent 3f0af2e commit bf84c22

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

CIP-0071/README.md

+23-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
---
22
CIP: 71
33
Title: Non-Fungible Token (NFT) Proxy Voting Standard
4-
Authors: Thaddeus Diamond <[email protected]>
5-
Comments-URI:
64
Status: Proposed
7-
Type: Process
5+
Category: Tools
6+
Authors:
7+
- Thaddeus Diamond <[email protected]>
8+
Implementors: []
9+
Discussions:
10+
- https://github.com/cardano-foundation/CIPs/pull/351
811
Created: 2022-10-11
9-
Post-History:
1012
License: CC-BY-4.0
1113
---
1214

1315
## Abstract
1416

1517
This proposal uses plutus minting policies to create valid "ballots" that are sent alongside datum "votes" to a centralized smart contract "ballot box" in order to perform verifiable on-chain voting in NFT projects that do not have a governance token.
1618

17-
## Motivation
19+
## Motivation: why is this CIP necessary?
1820

1921
This proposal is intended to provide a standard mechanism for non-fungible token (NFT) projects to perform on-chain verifiable votes using only their NFT assets. There are several proposed solutions for governance that involve using either a service provider (e.g., Summon) with native assets or the issuance of proprietary native assets. However, there are several issues with these approaches:
2022
- Airdrops of governance tokens require minUTxO ada attached, costing the NFT project ada out of pocket
@@ -198,7 +200,7 @@ func main(redeemer: Redeemer, ctx: ScriptContext) -> Bool {
198200

199201
The Helios code above simply checks that during a burn (as indicated by the Plutus minting policy's `redeemer`), the user is not attempting to mint a positive number of any assets. With this code, *any Cardano wallet* can burn *any ballot* minted as part of this protocol. Why so permissive? We want to ensure that each vote is bringing the minimal costs possible to the user. In providing this native burning mechanism we can free up the minUTxO that had been locked with the ballot, and enable the user to potentially participate in more votes they might not have otherwise. In addition, users who really do not like the specific commemorative NFTs or projects that choose to skip the "commemorative" aspect of ballot creation now have an easy way to dispose of "junk" assets.
200202

201-
## Rationale
203+
## Rationale: how does this CIP achieve its goals?
202204

203205
### Using Inline Datums (On-Chain) Instead of Metadata (Off-Chain)
204206

@@ -226,7 +228,7 @@ A user could attempt to create multiple ballots of the same name for a given ref
226228

227229
During the construction of the ballot NFTs we allow the user to specify their vote alongside a `voter` field indicating where their "ballot" NFT should be returned to once the vote is fully counted. Unfortunately, this is not strictly checked inside the Plutus minting policy's code (largely due to CPU/memory constraints). So, we rely on the user to provide an accurate return address, which means that there is the potential for someone who has not actually voted to receive a commemorative NFT. This does not impact the protocol though, as the "ballot" NFT was legally minted, just returned to the incorrect location. That user actually received a gift, as they can now burn the ballot and receive some small amount of dust.
228230

229-
## Potential Disadvantages
231+
### Potential Disadvantages
230232

231233
There are several potential disadvantages to this proposal that may be avoided by the use of a native token or other voting mechanism. We enumerate some here explicitly so projects can understand where this protocol may or may not be appropriate to use:
232234

@@ -235,7 +237,7 @@ There are several potential disadvantages to this proposal that may be avoided b
235237
- Performing an encrypted vote on-chain with verifiable post-vote results is an exercise left to the standard's implementer
236238
- Projects wishing for anonymity in their votes should not use this standard as each vote can be traced to a reference asset
237239

238-
## Optional Recommendations
240+
### Optional Recommendations
239241

240242
In no particular order, we recommend the following implementation details that do not impact the protocol, but may impact user experience:
241243

@@ -244,17 +246,11 @@ In no particular order, we recommend the following implementation details that d
244246
- The "vote" represented by a datum will be easier to debug and analyze in real-time if it uses the new "inline datum" feature from Vasil, but the protocol will still work on Alonzo era transactions.
245247
- The "ballot box" smart contract should likely enforce that the datum's "voter" field is respected when returning the ballots to users after voting has ended to provide greater transparency and trust for project participants.
246248

247-
## Backward Compatibility
249+
### Backward Compatibility
248250

249251
Due to the nature of Plutus minting policies and smart contracts, which derive policy identifiers and payment addresses from the actual source code, once a vote has been started it cannot change versions or code implementations. However, because the mechanism we propose here is just a reference architecture, between votes projects are free to change either the "ballot" Plutus minting policy or the "ballot box" smart contract as they see fit. There are no prior CIPs with which to conform with for backward interoperability.
250252

251-
## Path to Active
252-
253-
- Considerations for ranked-choice voting if projects wish to have it
254-
- Minimal reference implementation making use of [Lucid](https://github.com/spacebudz/lucid) (off-chain), [Plutus Core](https://github.com/input-output-hk/plutus) [using Helios](https://github.com/Hyperion-BT/Helios) (on-chain): [Implementation](./example/)
255-
- Open-source implementations from other NFT projects that make use of this CIP
256-
257-
## References
253+
### References
258254

259255
- [CIP-0025](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0025): NFT Metadata Standard
260256
- [CIP-0030](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030): Cardano dApp-Wallet Web Bridge
@@ -263,6 +259,17 @@ Due to the nature of Plutus minting policies and smart contracts, which derive p
263259
- [Lucid](https://github.com/spacebudz/lucid): Transaction construction library used in code samples and pseudocode
264260
- [VoteAire Specification](https://github.com/voteaire/voteaire-onchain-spec): Open-source voting specification using metadata off-chain
265261

262+
## Path to Active
263+
264+
### Acceptance Criteria
265+
266+
- [ ] Presentation to, and adoption by, projects that may benefit from ranked-choice voting
267+
- [ ] Open-source implementations from other NFT projects that make use of this CIP
268+
269+
### Implementation Plan
270+
271+
- [x] Minimal reference implementation making use of [Lucid](https://github.com/spacebudz/lucid) (off-chain), [Plutus Core](https://github.com/input-output-hk/plutus) [using Helios](https://github.com/Hyperion-BT/Helios) (on-chain): [Implementation](./example/)
272+
266273
## Copyright
267274

268275
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).

0 commit comments

Comments
 (0)