Proof of Humanity Group Token

Hello everyone,

I’m Andrei, dev @ Kleros, working on Proof of Humanity. Proof of Humanity is coming to Gnosis Chain very soon. A Proof of Humanity <> Circles synergy would be great for both projects.

To register on Proof of Humanity, you have to make a request using your wallet, take a photo and a video of yourself following the instructions, put some deposit, get a vouched from someone else and then wait for challenging period to pass. If you are challenged in that period, a Kleros dispute is created. If you win any challenge or are not challenged at all, you are registered to PoH.

To check whether a wallet address belongs to someone registered on PoH, one can simply call isHuman(address) on the contract. In PoH v2 there will also be a soulbound id for each human (when re/registering the requester always have to point to the soulbound id corresponding to him, otherwise would be challenged). 1 human <-> 1 wallet address <-> 1 soulbound id. This could be used as social recovery :thinking:

As a simple first PoC, using Alex’s GroupCurrencyToken I thought there could be a contract PoHTokenManager owning the PoH group token PoHGCT.

The idea would be that owner of a personal circles token should be registered on PoH in order to use that token as collateral.

PoHTokenManager could be both owner of the PoHGCT and the treasury. It would add/remove members depending and allow redeeming personal tokens from PoHGCT:

addHuman(walletOfHuman)
	require(poh.isHuman(walletOfHuman))
	address humanToken = hub.userToToken(walletOfHuman)
	require(humanToken != address(0x0))
	IGCT(gct).addMemberToken(humanToken)

removeHuman(walletOfHuman)
	require(poh.isHuman(walletOfHuman) == false)
	IGCT(gct).removeMemberToken(IHub(hub).userToToken(walletOfHuman))

redeem(redeemer, token, amount)
	require(poh.isHuman(IHub(hub).tokenToUser(token)))
	IGCT(gct).transfer_from(redeemer, address(0x0), amount)
	token.transfer(redeemer, amount)

Someone could exchange any tokens corresponding to people registered on PoH (mint using TokenAlice as collateral -> redeem TokenBob).

I’m not fully sure on how to best leverage circles mechanisms so looking forward to suggestions :slight_smile:

3 Likes

Thanks for this input, sounds like a great solution for combining PoH with Circles!

Would be nice to try it, the implementation should work like this, redeem is really clever, but I currently can’t evaluate potential risks with this swap possibility.
But the idea to enable this swap for PoH GCT is nice. Just I am not sure if the transfer_from will always work wrt. the allowances set. Would the PoHTokenManager have “unlimited” allowance or how would this work?

As for the other possibility you mentioned in the Telegram Chat, using addDelegateMembers this would translate to “the GCT trustee is a human”, but not all of her trustees. You addMember solution looks better to me, the “delegate” solution could be a scalability “boost” if necessary.

Added from the Telegram Chat:

There is a problem with minting if a user lists several times as there is no check on minting if the user “is still human”.

Possible Solutions (Martin)

  • configure the group currency in such a way that only the owner is allowed to mint (onlyOwner flag in GCT)
  • the user needs to call mint in the token manager contract which again checkes wether the user is still a member and call mint on the GCT

Just another small note: @andrei - in Circles we use Safes (Gnosis Safe) as a wallet for users. I assume this is not a problem for PoH or do you expect the wallet to be an EOA? E.g. do you need the ability to directly sign with this address (obviously a smart contract can not do that directly)