Implementation Overview
Intuition's smart contracts are central to its blockchain architecture, handling critical on-chain activities such as the creation of Atoms (also known as Identities) and Triples (also known as Claims), as well as the staking processes on these elements. These contracts are integral to the economic interactions involved in creating and staking, ensuring a seamless and secure execution of these operations. Future development will expand how these smart contracts are used to govern various other integral components within the Intuition system, including Atom Claiming/Recovery, management of off-chain Atom Data, and various registries such as Bonding Curve, Primitive, Schema, Algorithm, and Interpretation Registries.
Acting as the Verifiable Data Registry, these smart contracts store crucial information like URIs of Atoms/Triples, the intricate relationships between them, and current stakeholder positions. They essentially form the nodes and edges of the knowledge graph. In contrast, the off-chain Verifiable Data Registry maintains the properties of these nodes and edges, creating a comprehensive and interconnected data structure.
Key components of the on-chain state of the knowledge graph include:
- Atom wallets and vaults, along with their respective shares and balances.
- AtomData, typically represented as bytes, usually pointing to a URI for off-chain data.
- Triples and their constituent Atoms.
- User positions on Atoms and Triples, reflecting current stakes and indicating who is attesting to what.
Smart Contracts
Intuition's architecture provides a flexible and secure framework for managing and upgrading smart contracts, with a particular focus on the ability to scale and govern changes in a controlled manner. The use of multi-signature authentication is core to Intuition’s smart contract architecture to avoid single points of failure or abuse of power in the decentralized system.
There are two main contracts which contain the logic that is executed when the proxy contracts delegate calls to them. These contracts can be upgraded, but changes must pass through a time lock controller.
EthMultiVault
The primary contract in this framework, referred to as the EthMultiVault contract, blends and advances the ERC-4626 and ERC-1155 standards. This contract is a pivotal element of the Intuition protocol, facilitating a wide range of functionalities and providing a robust foundation for the decentralized knowledge graph.
Attributes of the EthMultiVault include:
- Contract uses a
TransparentUpgradeableProxy
. - This setup allows the
EthMultiVault
to be upgraded by interacting with aProxyAdmin
, which serves as an intermediary to facilitate upgrades. This separation of concerns allows for a more secure upgrade process, as the upgrade action is isolated from the proxy that interacts with the end users. - Has the capability to deploy new
BeaconProxy
contracts. When deployed, theseBeaconProxy
contracts follow the beacon proxy pattern by referencing theAtomWallet
implementation through theUpgradeableBeacon
. This allows for a scalable deployment of new proxy instances without the need to redeploy theAtomWallet
logic. - The multisig admin also controls key contract parameters (such as the admin's address and various fees that are present in the protocol, etc.) of the
EthMultiVault
. These parameters can be adjusted, but changes must pass through the timelock process present in theEthMultiVault
implementation contract, which introduces a delay between when an action is proposed and when it can be executed, giving stakeholders time to react to proposed changes if they wish to do so.
AtomWallet
Aside from EthMultiVault, the AtomWallet contract is a foundational element of the Intuition protocol, acting as an abstract account (wallet) linked to a specific atom. It leverages account abstraction standard (ERC-4337) to enable advanced transaction execution and management capabilities for atom-associated operations within the blockchain environment.
Attributes of the AtomWallet include:
- Linked to an
UpgradeableBeacon
. This beacon contract holds the address of the currentAtomWallet
implementation and can be upgraded by the multisig admin. - Proxy contracts, known as
BeaconProxy
, use the beacon to reference the implementation, allowing multiple instances to be automatically updated when the beacon's implementation address changes.