unlock-protocol / unlock

Ʉnlock is a protocol for memberships built on a blockchain.
https://unlock-protocol.com
MIT License
821 stars 238 forks source link

Integrate PoH into Unlock #12150

Open gmkung opened 1 year ago

gmkung commented 1 year ago

Is your feature request related to a problem? Please describe. Proof of Humanity is a project by Kleros, and it's the OG Soulbound token protocol that allows any user to verify and assert their self-sovereign identity and humanness on-chain in a fully trustless and permissionless manner. The request here is to add Proof of Humanity as a way to unlock a smart contract on the Unlock protocol.

Describe the solution you'd like As discussed with Julien on Discord, using Hooks is probably the easiest way to achieve this. The Proof of Humanity contract on ETH Mainnet has a isRegistered function that can be called to return the PoH registration status of an address - simple as that.

Describe alternatives you've considered If reading the PoH status is needed on other chains, we can discuss bridging/oracles solutions for that too.

Additional context The Proof of Humanity protocol's website can be found here.

julien51 commented 1 year ago

Tjanks @gmkung ! Do you also have a testnet version which would make developing/testing this easier?

gmkung commented 1 year ago

@julien51 hey! We currently don't have a testnet version deployed, but in my experience the mainnet deployment should be sufficient for all testing purposes. Integrating the PoH contract involves just gasless reading of the isRegistered() view function, and if you would like to create a profile yourself for testing purposes, we routinely crowdfund the deposit for the submission of our new community members, and we'd be happy to do the same for you!

julien51 commented 1 year ago

Integrating the PoH contract involves just gasless reading of the isRegistered() view function,

Yes but the problem is that based on what you described here we would want to only allow registered users to mint a membership (which would incur a gas cost!)...

IMO having just a "dummy" contract on a test net would make it easier to do all kinds of "onchain" interactions without incurring costs...

gmkung commented 1 year ago

I suppose the actual minting of real memberships is going to take place on Mainnet anyway? Or are you referring to testing by members on testnet prior to deploying the real implementation on Mainnet?

gmkung commented 1 year ago

Do let me know how I can help make testing and integrating easier!

julien51 commented 1 year ago

I suppose the actual minting of real memberships is going to take place on Mainnet anyway?

I would honestly avoid that! It gets expensive very quickly and does not make sense for most "real life" membership (like your netflix membership costs $15... spending more than 50cts of gas is a waste IMO)

Or are you referring to testing by members on testnet prior to deploying the real implementation on Mainnet?

I would love to work on the dev site without spending too much in gas as well!

gmkung commented 1 year ago

Ok may I know which chains your members are mostly minting memberships on? I'll check to see how we can bridge that over easily.

gmkung commented 1 year ago

Looking at the app, it seems to be Polygon and Avalanche?

image
gmkung commented 1 year ago

@julien51 On Polygon, PoH is integrated with Polygon ID. Do you all have integrations with PolygonID already?