Comment on page
Eligibility modules have authority to rule on the a) eligibility b) good standing of wearer(s) of a given hat.
Wearer Eligibility (A) determines whether a given address is eligible to wear the hat. This applies both before and while the address wears the hat. Consider the following scenarios for a given address:
When a hat is revoked, its token is burned.
Wearer Standing (B) determines whether a given address is in good or bad standing. Standing is stored on-chain in
Hats.solto facilitate accountability.
For example, a hatter contract implementing staking logic could slash a wearer's stake if they are placed in bad standing by the eligibility module.
An address placed in bad standing by a hat's eligibility module automatically loses eligibility for that hat. Note, though, that ineligibility does necessarily imply bad standing; it is possible for an address may be ineligible but in good standing.
Any address can serve as an eligibility module for a given hat. Hats Protocol supports two categories of eligibility modules:
- 1.Mechanistic eligibility are logic contracts that implement the
IHatsEligibilityinterface, which enables the Hats.sol contract to pull wearer standing by calling
checkWearerStandingfrom within the
Hats.balanceOffunction. Mechanistic eligibility enables instantaneous revocation based on pre-defined triggers.
- 2.Humanistic eligibility are either EOAs or governance contracts. To revoke a Hat, humanistic eligibility must push updates to the Hats contract by calling
Unlike admins, eligibility modules are explicitly set as addresses, not hats. This is to avoid long, potentially illegible, chains of revocation authority that can affect wearer penalties (such as slashed stake).