Qbix and Intercoin were founded to help build web-based online communities, and secure them with crypto, respectively. As our investor presentation explains, once you have a social network, you can roll out a payment network on top of it. But crypto can power a lot more than secure payments; it can also power secure elections, governance, and analytics.
Before blockchain technology, people on the tech team might be able to get into the back-end database and change the data in there, adding or revoking roles. If you have a community of any kind, we developed smart contracts to let your community’s administrators to securely manage its members, roles and permissions.
The CommunityContract
is a smart contract that provides a standard interface for managing who belongs to a community, and what roles they have. It enforces rules you set about which roles can assign other roles and permissions. Other contracts, such as VotingContract
(elections) and ControlContract
(management) rely on this contract for the above functionality.
Currently, the CommunityContract
supports a hierarchical model, where an owner
can add and remove admins
, who can add and remove members
. However, other roles and permissions can be defined by owners
. In general the interface is below:
addMembers([members])
removeMembers([members])
grantRoles([addresses], [roles]) // to existing addresses
revokeRoles([addresses], [roles]) // from existing addresses
getRoles([members]) // returns array of arrays containing roles
getMembers(role) // role optional, if empty gets all members
addressesCount(role) // role optional, if empty counts all members
// owners only:
createRole(role, displayName)
canManage(role1, role2) // add and remove role
transferOwnership(address)
// invites
invitePrepare(sSig, rSig) // posted by relayers
iniviteAccept(p, pSig, rp, rpSig) // posted by relayers
// optional NFT (ERC721) metadata
name()
symbol()
transfer(...) // reverts, roles can't be unilaterally transferred
balanceOf(address)
ownerOf(tokenId)
tokenURI()
setRoleURI()
setExtraURI()
Members of the community are represented in a pseudonymous way by their Ethereum wallet addresses, and can themselves be either real users or smart contracts. For example, the owner
of a CommunityContract
can actually be an instance of ControlContract
that is managed, say, by 5 admins together, and any action taken by the owner account would have to be endorsed by at least 3 admins before it takes effect.
Ownership can be transferred to a ControlContract
as described above, or to the 0x0
address, which indicates that there are no more super-users and the community is now being governed “democratically” by its members in whatever roles and rules have been defined!
This is a very general-purpose implementation, that nevertheless implements a basic community that can be used by other smart contracts, either built by us or someone else.
Besides the technology, there are also social, economic and legal aspects to think about when rolling out community currencies and universal basic income. That is what we all discuss in the Intercoin community.