We express our gratitude to the Rejuve team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Document
Review Scope
The system users should acknowledge all the risks summed up in the risks section of the report
Functional requirements are provided.
Technical description is provided.
NatSpec is sufficient.
No code quality issues were identified.
Code coverage of the project is 100% (branch coverage):
Deployment and basic user interactions are covered with tests.
Rejuve is an ERC721 token (a standard for non-fungible tokens on the Ethereum blockchain) with additional features for identity management.
IdentityToken.sol — Is an ERC721 token, the contract uses several mappings to keep track of identities and their owners, registration statuses, and used nonces. It also emits events when identities are created and destroyed.
DataManagement.sol – This contract is designed to manage data submission and data access permissions.
For the DataManagement.sol contract:
Owner: The owner is set to the account that deploys the contract (in the constructor of Ownable). The owner has the highest level of privilege. In this contract, the owner has the ability to pause and unpause the contract execution using the pause() and unpause() functions. These functions use the onlyOwner modifier from the Ownable contract, which restricts their use to the owner only.
Registered Users: The contract also has a concept of registered users. The isRegistered modifier checks if a user is registered before allowing them to submit data or get permission. The registration check is done by calling the ifRegistered function of the _identityToken contract (which is of type IIdentityToken). The details of how a user is registered or not is abstracted away in this contract and depends on the implementation of the IIdentityToken contract.
Data Owners: Users who have submitted data are considered data owners. They are identified by their Ethereum address and their identity token ID. They can submit data and grant permissions for their data.
Requesters: Users who request access to the data. They need to be registered and need to provide a valid signature from the data owner to get permission to access the data.
For the IdentityToken.sol contract:
Identity Owner: An identity owner is a user for whom an identity token has been created. They are identified by their Ethereum address. An identity owner can burn their identity token using the burnIdentity function. The function uses the require statement to ensure that only the owner of an identity token can burn it.
Contract Owner: The contract owner is the account that deploys the contract. This role is inherited from the Ownable contract from OpenZeppelin. The contract owner has the ability to pause and unpause the contract execution using the pause() and unpause() functions. These functions use the onlyOwner modifier from the Ownable contract, which restricts their use to the owner only.
The audit covered two contracts, DataManagement.sol, and IdentityToken.sol. While it was noted that these audited contracts do not interact with others in the codebase, there remains a potential risk from off-chain interactions, which were out of the audit's scope. These interactions were not validated in this audit.
Code ― | Title | Status | Severity | |
---|---|---|---|---|
F-2024-3805 | Unauthorized identity creation | Fixed | Critical | |
F-2024-3900 | Using abi.encodePacked() with dynamic types for keccak256 hashing | Fixed | Low | |
F-2024-3824 | Unregistered signer vulnerability | Fixed | Low | |
F-2024-3820 | Zero address identity creation | Fixed | Observation | |
F-2024-3802 | Unindexed event parameters | Fixed | Observation | |
F-2024-3801 | Floating pragma | Fixed | Observation |
When auditing smart contracts, Hacken is using a risk-based approach that considers Likelihood, Impact, Exploitability and Complexity metrics to evaluate findings and score severities.
Reference on how risk scoring is done is available through the repository in our Github organization:
Severity
Description
Severity
Description
Severity
Description
Severity
Description
The scope of the project includes the following smart contracts from the provided repository:
Scope Details
contracts/DataManagement.sol
contracts/IdentityToken.sol