Profiles

An universal profile is a digital identity that is stored on the blockchain. It is a collection of data that is associated with an account. The data can be used to identify a person, a company, or an organization. The data can be used to verify the identity of the account holder. It can be used to access services, sign transactions, and interact with other accounts.

The oracle is deployed on the LUKSO mainnet at the address 0x482a6fd801fe3290a49e465c168ad9f8772b8d7e.

Score

At Universal Page, we calculate a score for each active profile. The score is determined by various factors. It is used to determine the trustworthiness of the profile. The higher the score, the more trustworthy the profile is. The score is used to determine the visibility of the profile and their NFTs.

To provide some insight into how the score is calculated, we prioritize diversity of collections a profile is owner of. While number of unique NFTs is important, the number of collections is also important. Additional factors are also considered, but play a smaller role in the score calculation.

Retreiving a score

To retrieve the score of a profile, you need to encode the address of the profile and query the score endpoint using ERC725Y interface. The key is encoded as bytes10(keccak256("UniversalProfileScore")):0000:<profile address>. The score value is stored as a uint32 value. If the score is zero, the profile is considered inactive.

Example of retreiving a score on chain

import {IERC725Y} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol";
import {LSP2Utils} from "@lukso/lsp-smart-contracts/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol";

IERC725Y profiles = IERC725Y(0x482a6fd801fe3290a49e465c168ad9f8772b8d7e);

address profile = 0x1234567890123456789012345678901234567890;
bytes32 scoreKey = LSP2Utils.generateMappingKey("UniversalProfileScore", profile);
uint32 score = uint32(bytes4(profiles.getData(scoreKey)));

Reverse lookup

The reverse lookup is a feature that allows you to lookup profiles managed by a controller address. It is useful when you want to find all profiles managed by a specific address. It can enable crypto wallets to be used to sign with a profile into apps.

The reverse lookup contract is deployed on LUKSO mainnet at the address 0xa0eb05c666fcf6cbeca77e14ec43cb5d5a852601. The testnet is available at 0x953eef8151770c4cc60ec27468acee85eb8d81f8.

Registeration

A registration is a process of associating a profile with a controller address. It is a one-time process that is required to enable the reverse lookup feature. Both a controller or a profile can initiate registration process. The same is applicable for revoking a registration.

function register(address controller, address profile, bytes calldata data) external;
function unregister(address controller, address profile, bytes calldata data) external;

Lookup

The lookup is a process of finding all profiles managed by a controller address. It is a read-only process that can be initiated by anyone.

function profilesOf(address controller) external view returns (address[] memory);
function registered(address controller, address profile) external view returns (bool);

Was this page helpful?