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])
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.

6 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.

3 Likes

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

1 Like

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

2 Likes

Big Update: We finally deployed the CommunityContract

After years of work, we have released the v1.0 suite of Intercoin Applications. As part of that, we released the CommunityContract on Polygon / MATIC, Binance Smart Chain, and later will release it on Ethereum, too.

Since this is the third contract we designed, its address on all chains is 0x333333d4a207f2237d5c3fecbdddac2e6c01990b

2 Likes

Finally putting the Community Contract on the chain is sweet.

1 Like

WOW Great job Greg :clap::clap::clap: and the Intercoin Devs team
I’m so excited to hear this news and proud to be involved in the Intercoin movement.
So many great things can be achieved now and I’m looking forward to tomorrow’s AMA session!

2 Likes