Intercoin Defi: CommunityContract

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])
addRoles([role], [members]) // to existing members
removeRoles([roles], [members]) // from existing members
getRoles(member) // returns array of roles
getMembers(role) // role optional, if empty gets all members
memberCount(role) // role optional, if empty counts all members

// owners only:
createRole(role, displayName)
canManage(role1, role2) // add and remove role
transferOwnership(address)

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.

5 Likes

Crypto or blockchain can do so much more and it is important to spread awareness of all the possibilities and opportunities we have on hand to help solve existing issues on our society.

2 Likes

For folks who might be somewhat lost at the technical explanations here, we made a video to get you up to speed on one of the most important technological innovations in blockchain: smart contracts. If you’ve interacted with dapps such as uniswap, smartcontracts are a big part of what makes it all work.

1 Like

This is a 5 minute demo of the Intercoin’s Income Contract:

I think this contract is really underrated but important for building out smart economies and issuing UBI. Cities need a way to keep track of who is a citizen of that city, and having a smartcontract do it seems like a great solution