Building an identity on top of keys is almost impossible because keys are likely to be leaked or lost forever. Holding assets and building a reputation on these keys makes it worse. A better representation of identity would be with blockchain-based accounts.
Blockchain-based accounts can change the way of interacting on-chain, allowing the usage of multiple components together. Used in combination with a Controller (see LSP6 - Key Manager), they could allow any entity to execute or set some data on your profile directly or via relay execution. Finally, developers could use contracts for social recovery if keys are lost. All these components together can enhance the blockchain experience.
Universal Profile Architecture
The diagram below shows the standard architecture used by LUKSO for Universal Profile.
The architecture is based on the combination of multiple standards and smart contracts to provide extensive and extensible functionality. This modularity allows for logic updates without altering the code of the main contract. This provides flexibility and facilitates the development and maintenance of this complex system, as changes or improvements can be made independently in each module without affecting others.
Universal Profiles Standards
|LSP0 - ERC725Account: This standard represents the core account contract. It consists of ERC725X, allowing a contract to interact with any address or smart contract on the blockchain, and ERC725Y, a generic key-value store that allows storing an unlimited amount of data in the smart contract. It also contains ERC1271 to verify if messages were signed by the ERC725Account's owner. If the owner is a Key Manager supporting ERC1271, it will delegate the call to the KeyManager. Lastly, it contains the LSP1 - UniversalReceiver, which allows this contract to be notified of any incoming asset. Using the LSP1 - UniversalReceiverDelegate logic, you can delegate the universal receiver call that an asset will do to an external contract, customizing the behaviour you want towards the asset. More on that below.|
|LSP6 - KeyManager: A standard representing a smart contract that can act as the owner of an LSP0 - ERC725Account. It reads permissions of addresses from the ERC725Account's key-value store, and restricts access based on these permissions. Transactions can be executed directly by permissioned users or by anyone with the help of a signed message by permissioned users.|
|LSP1 - UniversalReceiverDelegate: By setting the |
An LSP0-ERC725Account can work standalone and doesn't require a Key Manager or a Universal Receiver Delegate, but this will limit the user experience.
Adding profile information
The LSP0 - ERC725Account standard represents a blockchain-based account that does not contain any metadata describing the account. It's important to standardize specific data keys to give the account a unique character and look like a typical Web2 profile.
LSP3 - Profile Metadata is a standard used to add profile information by setting its defined data keys in the account storage. The combination of these two standards forms a Universal Profile.
The guide Connect Your Universal Profile to a dApp may interest you.
- LUKSO Standards Proposals: LSP0 - ERC725 Account (Standard Specification, GitHub)
- LUKSO Standards Proposals: LSP3 - Profile Metadata (Standard Specification, GitHub)
- LUKSO Standards Proposals: LSP6 - Key Manager (Standard Specification, GitHub)
- LSP1 Universal Receiver: Solidity implementations (GitHub)