Thanks @rafa for starting this thread.
Demo: recorded zoom call
Code: GitHub - Hats-Protocol/zksync-proposer-mvp
My name is Spencer, and I’m one of the cofounders of Haberdasher Labs, a core contributor to Hats Protocol. For those not familiar, Hats is a protocol for onchain roles, aka “hats” aka modular bundles of commitments, permissions/authorities/resources, eligibility criteria, accountability mechanisms, and compensation. Any account can have (“wear”) a hat, including EOAs, multisigs, DAOs, and other contracts.
For this MVP, we used Hats Protocol and several modular components to construct an onchain mechanism with the following properties:
- A grant recipient is identified by passing a DAO proposal to issue (“mint”) a hat to their account
- In order to fully receive the hat, the recipient must a) meet the necessary compliance requirements (denoted in this MVP as having been marked onchain as compliant by an authorized KYC provider), and b) commit to a set of policies to which they must adhere by signing an agreement onchain
- The hat is scoped with the permission allowing its wearer to mint tokens and initiate a Sablier stream
- At any time, an authorized accountability committee can determine that the recipient has not held to their commitment and revoke their hat
- Since the stream destination is the hat itself (and not the recipient), this revocation also removes the recipients ability to withdraw any subsequently streamed tokens
One important thing to note is that Hats Protocol can integrate with any other mechanism, protocol, or app. In our mvp, we used Sablier to handle the token streaming, but we could also have used other token distribution mechanisms such as Hedgey, Drips, or FactoryDAO’s depending on the specific needs of the grants program. Hedgey incorporating Hats into their own mvp is a great example of the kind of permissionless composability we love.
This is a key part of our overall strategy and ethos: we embrace composability and have designed all of our technology to be maximally interoperable with other projects. We endeavor to make Hats easy to integrate into other systems.
This mvp was just that, an mvp, and only demonstrated a small slice of what is possible when using Hats Protocol to construct robust onchain mechanisms.
If you are designing a new TPP, we would love to talk with you about how you can use Hats to help bring your vision to fruition.