Smart Contracts
Keyring Network's smart contracts are used to operate different parts of the protocol. Contracts are written in Solidity and released under a BUSL license. Standard contracts leverage the OpenZeppelin Library (version 4.6.0).
See the repository here.
Keyring is updating to a new contract infrastructure in the near future and recommends integrating via the KeyringCredentialViewer contract at this time. Using this contract will ensure a smooth transition to the new contracts in the near future without any additional changes required in an integrating partners code.
Contract Breakdown
Type | Contract | Description |
---|---|---|
access |
| Checks for roles |
consent |
| Manages user consent (grant and revoke) and the related deadlines |
degradable |
| Allows services to specify how to mitigate service interruptions, set policy degradation params and handle degraded services policy enforcement |
exemptions |
| Manages the exemptions (i.e. whitelists) for the policy engine. It allows an admin to manage global exemptions and policy admins to manage policy-specific exemptions, approve exemptions and retrieve existing ones |
forwarder |
| Placeholder for a paymaster/trusted forwarder left for a future implementation |
identityTree |
| Holds the history of identity tree merkle roots published by the aggregator and provides methods to retrieve and verify merkle roots |
integration |
| Methods to consult Keyring Cache and retrieve authorisation status for a wallet on a given policy (provided at constructor time) |
keyringCredentials |
| Holds the time-limited credential cache (dynamic whitelist), offering methods to update (generate a cache key for a wallet and policyId) and inspect it |
policyManager |
| Holds the policies managed by the protocol admin and exposes methods to create, update and disable a policy and its dependencies (wallet checker, backdoor, attestor) |
tokens |
| Example of KeyringGuard can be wrapped around a standard ERC20 token (e.g. DAI Token) to permission transfers |
userPolicies |
| Handles user policy and counterparty selection |
walletCheck |
| On-chain whitelist containing information gathered by off-chain processes. Policies specify if wallets must be checked on a just-in-time basis. This contract establishes the base interface that all wallet check contracts must implement |
keyringZkVerifier |
| Verifies members and authorization in proofs posted by users |
keyringCredentialUpdater |
| Receives new credentials from attested users and updates the keyringCredentials cache |
merkleAuthVerifier |
| Internal library contract used to verify Merkle proofs |
Deployments
The protocol is currently live on mainnet and deployment on additional chains will follow. Get in touch if you have any requests.
Current DeploymentsGovernance
Keyring implements admin-upgradable proxies to manage core protocol updates.
Last updated