-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
ERC 1261:Membership Verification Token #1261
Comments
Question in terms of logic and terminology ;
|
How is it different from whitelist: Whitelist is not necessarily transparent, and changes on whitelists are not logged on to immutable ledger. So this is a lot more reliable that a whitelist in the sense that censorship is a lot more difficult to hide. Also this 'whitelist' is on the blockchain, meaning that you can program smart contracts to act upon certain logic based on membership, voting systems can automatically filter out member votes from spam votes, and so on. Second question: Third parties can request membership and participate in governance systems that require such membership. Standardization will help different memberships be browsable from a standard client(we will be developing a react based UI to interact with the interface. Please visit https://electus.network for more details) |
They can be, and that's the case for 95% of ICOs I've seen. See the Whitelist.sol contract by Zeppelin for example (there are many more).
This is the case for almost all the whitelists that have been used in the last 2 years or so. See previous comment for example. For example, comparing Zeppelin code with the interface you propose here, it seems to me like
|
I'd say it's easier for an organization to track the list of members, based on the way we have implemented it. This is necessary when you want to track censorship and conduct analytics. If a malicious owner is removing certain number of people periodically, it is not simple on whitelist.sol to track the removed members, reconstruct the original plausible uncensored group, and audit the uncensored result of the governance in question. |
Could you explain to me how so? It's not obvious to me |
Here is a sample implementation which has the "indexers" property which allows organization to query the list of all members using web3. it also stores the list of previous members. (wasMemberOf can be implemented in JS easily and methods can be implemented to identify when members were removed) |
Its a great start. Id like to see an interface without the meta data, and as you mentioned a "name" property. |
@bitcoinbrisbane there is an updated version available in the EIP section |
Where about? FYI BlockchainAustralia.org will be rolling this out for our members. Im looking at writing an EIP that includes this one. The EIP will be Organisation contract, with levels of MVT. Members can be promoted or demoted etc. |
@bitcoinbrisbane I've updated this issue to reflect the latest version of the interface. Please review it now. |
@bitcoinbrisbane About multi level organizations: Its amazing that you are planning that. It was somewhere down our roadmap as well. Would love if we could discuss with you - if you feel it would help. Also, your organizations would be compatible with the infrastructure(client and scanner) that we are currently building, so it would help us build it better if we stayed in communication. Feel free to send an introduction at: |
Ok. I was just trying to keep the interface smaller. Ill send you an email about the org contract. FYI Ill be making a PR for Trust Wallet to be MVT compatible too. |
Ignoring terminology, this entire concept can be implemented using the existing ERC-721. Additionally, the benefit will be that it will be compatible with 99% percent of existing applications. How do it:
In general, I recommend AGAINST creating application-specific EIPS. This is because they have limited utility and nobody will implement them (so they are not actually "standards"). This is not a thorough review of this EIP and I will have more feedback if making a thorough review. If you have a strong use case definition and are interested in getting it out the door, I can help get it done using existing, battle-tested technology. Just hit me up. |
I disagree. Creating clean intefaces that are domain specific is a better approach than using a sledge hammer to hit every nail. |
You are correct, everything should have a clean interface if it will interface with other things. If an interface will be a standard (in scope for publishing an EIP) then it should have widespread use. I don't see that here yet. Also, when designing things, additional complexity over existing solutions should be justified. If you want a way to type all the letters A-Y and numbers 0-9, just buy a (US-version) keyboard which has letters A-Z, don't design your own input method just because domain specific is better. |
Thats a bit of a strawman argument. But to use your annalogy, we are discussing the interface, not the implementation. If I need a Euro sign on my keyboard, ill use a Europen interface. |
These analogies are not necessary nor are they providing enough fidelity versus the issue at hand. A specific review of the identified requirements of ERC-1261 and how they can be met with existing interfaces and conventions has been provided above. A concrete discussion of those points, and a rebuttal there, would be the best justification for promulgating a new standard to address the identified use cases. |
There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
eip: 1261
title: Membership Verification Token (MVT)
author: Chaitanya Potti (@chaitanyapotti), Partha Bhattacharya (@pb25193)
type: Standards Track
category: ERC
status: Draft
created: 2018-07-14
requires: 165, 173
discussions-to: #1261
Simple Summary
A standard interface for Membership Verification Token(MVT).
Abstract
The following standard allows for the implementation of a standard API for Membership Verification Token within smart contracts(called entities). This standard provides basic functionality to track membership of individuals in certain on-chain ‘organizations’. This allows for several use cases like automated compliance, and several forms of governance and membership structures.
We considered use cases of MVTs being assigned to individuals which are non-transferable and revocable by the owner. MVTs can represent proof of recognition, proof of membership, proof of right-to-vote and several such otherwise abstract concepts on the blockchain. The following are some examples of those use cases, and it is possible to come up with several others:
In general, an individual can have different memberships in his day to day life. The protocol allows for the creation of software that puts everything all at one place. His identity can be verified instantly. Imagine a world where you don't need to carry a wallet full of identity cards (Passport, gym membership, SSN, Company ID etc) and organizations can easily keep track of all its members. Organizations can easily identify and disallow fake identities.
Attributes are a huge part of ERC-1261 which help to store identifiable information regarding its members. Polls can make use of attributes to calculate the voterbase.
E.g: Users should belong to USA entity and not belong to Washington state attribute to be a part of a poll.
There will exist a mapping table that maps attribute headers to an array of all possible attributes. This is done in order to subdivide entities into subgroups which are exclusive and exhaustive. For example,
header: blood group alphabet
Array: [ o, a, b, ab ]
header: blood group sign
Array: [ +, - ]
NOT an example of exclusive exhaustive:
Header: video subscription
Array: [ Netflix, HBO, Amazon ]
Because a person is not necessitated to have EXACTLY one of the elements. He or she may have none or more than one.
Motivation
A standard interface allows any user,applications to work with any MVT on Ethereum. We provide for simple ERC-1261 smart contracts. Additional applications are discussed below.
This standard is inspired from the fact that voting on the blockchain is done with token balance weights. This has been greatly detrimental to the formation of flexible governance systems on the blockchain, despite the tremendous governance potential that blockchains offer. The idea was to create a permissioning system that allows organizations to vet people once into the organization on the blockchain, and then gain immense flexibility in the kind of governance that can be carried out.
We have also reviewed other Membership EIPs including EIP-725/735 Claim Registry. A significant difference between #735 claims and #1261 MVTs is information ownership. In #735 the Claim Holder owns any claims made about themselves. The problem with this is that there is no way for a Claim Issuer to revoke or alter a claim once it has been issued. While #735 does specify a removeClaim method, a malicious implementation could simply ignore that method call, because they own the claim.
Imagine that SafeEmploy™, a background checking company, issues a claim about Timmy. The claim states that Timmy has never been convicted of any felonies. Timmy makes some bad decisions, and now that claim is no longer true. SafeEmploy™ executes removeClaim, but Timmy's #735 contract just ignores it, because Timmy wants to stay employed (and is crypto-clever). #1261 MVTs do not have this problem. Ownership of a badge/claim is entirely determined by the contract issuing the badges, not the one receiving them. The issuer is free to remove or change those badges as they see fit.
Trade-off between trustlessness and usability:
To truly understand the value of the protocol, it is important to understand the trade-off we are treading on. The MVT contract allows the creator to revoke the token, and essentially confiscate the membership of the member in question. To some, this might seem like an unacceptable flaw, however this is a design choice, and not a flaw.
The choice may seem to place a great amount of trust in the individuals who are managing the entity contract(entity owners). If the interests of the entity owner conflict with the interests of the members, the owner may resort to addition of fake addresses(to dominate consensus) or evicting members(to censor unfavourable decisions). At first glance this appears to be a major shortcomings, because the blockchain space is used to absolute removal of authority in most cases. Even the official definition of a dapp requires the absence of any party that manages the services provided by the application. However, the trust in entity owners is not misplaced, if it can be ensured that the interests of entity owners are aligned with the interests of members.
Another criticism of such a system would be that the standard edge of blockchain intermediation - “you cannot bribe the system if you don’t know who to bribe” - no longer holds. It is possible to bribe an entity owner into submission, and get them to censor or fake votes. There are several ways to respond to this argument. First of all, all activities, such as addition of members, and removal of members can be tracked on the blockchain and traces of such activity cannot be removed. It is not difficult to build analytics tools to detect malicious activity(adding 100 fake members suddenly who vote in the direction/sudden removal of a number of members voting in a certain direction). Secondly, the entity owners’ power is limited to the addition and removal of members. This means that they cannot tamper any votes. They can only alter the counting system to include fake voters or remove real voters. Any sensible auditor can identify the malicious/victim addresses and create an open source audit tool to find out the correct results. The biggest loser in this attack will be the entity owner, who has a reputation to lose.
Finally, one must understand why we are taking a step away from trustlessness in this trade-off. The answer is usability. Introducing a permissioning system expands the scope of products and services that can be delivered through the blockchain, while leveraging other aspects of the blockchain(cheap, immutable, no red-tape, secure). Consider the example of the driver licence issuing agency using the ERC-1300 standard. This is a service that simply cannot be deployed in a completely trustless environment. The introduction of permissioned systems expanded the scope of services on the blockchain to cover this particular service. Sure, they have the power to revoke a person’s licence for no reason. But will they? Who stands to lose the most, if the agency acts erratically? The agency itself. Now consider the alternative, the way licences(not necessarily only drivers licence, but say shareholder certificates and so on) are issued, the amount of time consumed, the complete lack of transparency. One could argue that if the legacy systems providing these services really wanted to carry out corruption and nepotism in the execution of these services, the present systems make it much easier to do so. Also, they are not transparent, meaning that there is no way to even detect if they act maliciously.
All that being said, we are very excited to share our proposal with the community and open up to suggestions in this space.
Specification
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Every ERC-1261 compliant contract must implement the
ERC1261
,ERC173
andERC165
interfaces (subject to "caveats" below):The metadata extension is OPTIONAL for ERC-1261 smart contracts (see "caveats", below). This allows your smart contract to be interrogated for its name and for details about the organization which your MV tokens represent.
This is the "ERC1261 Metadata JSON Schema" referenced above.
Caveats
The 0.4.24 Solidity interface grammar is not expressive enough to document the ERC-1261 standard. A contract which complies with ERC-1261 MUST also abide by the following:
=
instead of==
#3412: The above interfaces include explicit mutability guarantees for each function. Mutability guarantees are, in order weak to strong:payable
, implicit nonpayable,view
, andpure
. Your implementation MUST meet the mutability guarantee in this interface and you MAY meet a stronger guarantee. For example, apayable
function in this interface may be implemented as nonpayble (no state mutability specified) in your contract. We expect a later Solidity release will allow your stricter contract to inherit from this interface, but a workaround for version 0.4.24 is that you can edit this interface to add stricter mutability before inheriting from your contract.ERC1261Metadata
SHALL also implementERC1261
.external
then a contract will be compliant if it usespublic
visibility. As a workaround for version 0.4.24, you can edit this interface to switch topublic
before inheriting from your contract.this.*.selector
is marked as a warning by Solidity, a future version of Solidity will not mark this as an error.If a newer version of Solidity allows the caveats to be expressed in code, then this EIP MAY be updated and the caveats removed, such will be equivalent to the original specification.
Rationale
There are many potential uses of Ethereum smart contracts that depend on tracking membership. Examples of existing or planned MVT systems are Vault, a DAICO platform, and Stream, a security token framework. Future uses include the implementation of direct democracy, in-game memberships and badges, licence and travel document issuance, electronic voting machine trails, software licencing and many more.
MVT Word Choice:
Since the tokens are non transferable and revocable, they function like membership cards. Hence the word membership verification token.
Transfer Mechanism
MVTs can't be transferred. This is a design choice, and one of the features that distinguishes this protocol.
Any member can always ask the issuer to revoke the token from an existing address and assign to a new address.
One can think of the set of MVTs as identifying a user, and you cannot split the user into parts and have it be the same user, but you can transfer a user to a new private key.
Assign and Revoke mechanism
The assign and revoke functions' documentation only specify conditions when the transaction MUST throw. Your implementation MAY also throw in other situations. This allows implementations to achieve interesting results:
assign
andrevoke
so that condition checks from external sources can be madeERC-173 Interface
We chose Standard Interface for Ownership (ERC-173) to manage the ownership of a ERC-1261 contract.
A future EIP/ Zeppelin may create a multi-ownable implementation for ownership. We strongly support such an EIP and it would allow your ERC-1261 implementation to implement
ERC1261Metadata
, or other interfaces by delegating to a separate contract.ERC-165 Interface
We chose Standard Interface Detection (ERC-165) to expose the interfaces that a ERC-1261 smart contract supports.
A future EIP may create a global registry of interfaces for contracts. We strongly support such an EIP and it would allow your ERC-1261 implementation to implement
ERC1261Metadata
, or other interfaces by delegating to a separate contract.Gas and Complexity (regarding the enumeration extension)
This specification contemplates implementations that manage a few and arbitrarily large numbers of MVTs. If your application is able to grow then avoid using for/while loops in your code. These indicate your contract may be unable to scale and gas costs will rise over time without bound
Privacy
Personal information: The protocol does not put any personal information on to the blockchain, so there is no compromise of privacy in that respect.
Membership privacy: The protocol by design, makes it public which addresses are/aren’t members. Without making that information public, it would not be possible to independently audit governance activity or track admin(entity owner) activity.
Metadata Choices (metadata extension)
We have required
name
andsymbol
functions in the metadata extension. Every token EIP and draft we reviewed (ERC-20, ERC-223, ERC-677, ERC-777, ERC-827) included these functions.We remind implementation authors that the empty string is a valid response to
name
andsymbol
if you protest to the usage of this mechanism. We also remind everyone that any smart contract can use the same name and symbol as your contract. How a client may determine which ERC-1261 smart contracts are well-known (canonical) is outside the scope of this standard.A mechanism is provided to associate MVTs with URIs. We expect that many implementations will take advantage of this to provide metadata for each MVT system. The URI MAY be mutable (i.e. it changes from time to time). We considered an MVT representing membership of a place, in this case metadata about the organization can naturally change.
Metadata is returned as a string value. Currently this is only usable as calling from
web3
, not from other contracts. This is acceptable because we have not considered a use case where an on-blockchain application would query such information.Alternatives considered: put all metadata for each asset on the blockchain (too expensive), use URL templates to query metadata parts (URL templates do not work with all URL schemes, especially P2P URLs), multiaddr network address (not mature enough)
Community Consensus
We have been very inclusive in this process and invite anyone with questions or contributions into our discussion. However, this standard is written only to support the identified use cases which are listed herein.
Backwards Compatibility
We have adopted
name
andsymbol
semantics from the ERC-20 specification.Example MVT implementations as of July 2018:
Test Cases
Membership Verification Token ERC-1261 Token includes test cases written using Truffle.
Implementations
Membership Verification Token ERC1261 -- a reference implementation
References
Standards
Issues
=
instead of==
#3412 -- Implement Interface: Allow Stricter Mutability. Inheritance: allow stricter mutability solidity#3412Discussions
MVT Implementations and Other Projects
Copyright
Copyright and related rights waived via CC0.
The text was updated successfully, but these errors were encountered: