Introduction
We express our gratitude to the RYT team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
RYT is the layer 1 blockchain platform built for institutional adoption and mass inclusion, powered by Proof of Majority.
Document | |
|---|---|
| Name | Smart Contract Code Review and Security Analysis Report for RYT |
| Audited By | Kornel Światłowski, Khrystyna Tkachuk |
| Approved By | Ataberk Yavuzer |
| Website | https://ryt.io/→ |
| Changelog | 12/12/2025 - Preliminary Report |
| 23/12/2025 - FInal Report | |
| Platform | Ethereum |
| Language | Solidity |
| Tags | ERC721, Signature, Decentralized Identity |
| Methodology | https://docs.hacken.io/methodologies/smart-contracts→ |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for RYT
- Audited By
- Kornel Światłowski, Khrystyna Tkachuk
- Approved By
- Ataberk Yavuzer
- Website
- https://ryt.io/→
- Changelog
- 12/12/2025 - Preliminary Report
- 23/12/2025 - FInal Report
- Platform
- Ethereum
- Language
- Solidity
- Tags
- ERC721, Signature, Decentralized Identity
Review Scope | |
|---|---|
| Repository | https://github.com/ryt-io/DID-Contract-→ |
| Initial Commit | 6ad61d0 |
| Final Commit | a695108 |
Review Scope
- Repository
- https://github.com/ryt-io/DID-Contract-→
- Initial Commit
- 6ad61d0
- Final Commit
- a695108
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
Documentation quality
Functional requirements are detailed.
Project overview is detailed
All roles in the system are described.
For each contract all futures are described
Technical description is robust.
Run instructions are provided.
Technical specification is provided.
NatSpec is sufficient.
Code quality
The development environment is configured.
Code uses a modern Solidity version.
Code does not follow best practices.
Test coverage
Code coverage of the project is 77.99% (branch coverage).
Deployment and basic user interactions are covered with tests.
Negative cases coverage is missed.
Interactions by several users are not tested thoroughly.
System Overview
The SoulboundCredential contract is a non-transferable ERC721 token system for credentials, where only authorized issuers or the owner can mint, update, or burn credentials. Credentials are permanently bound to users, cannot be transferred, and include metadata like type, data, issuer, and expiry. The contract tracks user stats, manages issuers, and allows pausing and emergency withdrawals.
The DIDContract is a decentralized identity registry that lets users create, update, and revoke DIDs, manage controllers, and issue or revoke credentials. It integrates with SoulboundCredential to issue non-transferable SBT credentials, supports authentication, tracks user stats, and allows the owner to set expiry limits, pause the contract, and withdraw funds.
Privileged roles
SoulboundCredential
Owner
addAuthorizedIssuer()/removeAuthorizedIssuer(): Manage authorized issuers.setCredentialExpiryLimit(): Set global expiry limit for credentials.updateUserReputation(): Set user reputation score.pause()/unpause(): Pause or unpause contract.emergencyWithdraw(): Withdraw stuck ETH.Can also mint, burn, and update any credential (full admin rights).
Authorized Issuer
mintCredential(): Mint new credentials for users.
Credential Issuer (who issued a specific credential)
burnCredential(): Burn credentials they issued.updateCredentialData(): Update data for credentials they issued.
Credential Owner (user who owns a credential)
burnCredential(): Burn their own credentials.
DIDContract
Owner
setSBTContract(): Set the SBT contract address.setSBTEnabled(): Enable/disable SBT integration.setCredentialExpiryLimit(): Set global expiry limit for credentials.updateUserReputation(): Set user reputation score.pause()/unpause(): Pause or unpause contract.emergencyWithdraw(): Withdraw stuck ETH.
DID Owner
addController()/removeController(): Manage controllers for their DID.
DID Controller
updateDID(): Update DID document.revokeDID(): Revoke the DID
Potential Risks
Owner's Unrestricted State Modification: The absence of restrictions on state variable modifications by the owner leads to arbitrary changes, affecting contract integrity and user trust, especially during critical operations like minting phases.
Absence of Time-lock Mechanisms for Critical Operations: Without time-locks on critical operations, there is no buffer to review or revert potentially harmful actions, increasing the risk of rapid exploitation and irreversible changes.
Insufficient Multi-signature Controls for Critical Functions: The lack of multi-signature requirements for key operations centralizes decision-making power, increasing vulnerability to single points of failure or malicious insider actions, potentially leading to unauthorized transactions or configuration changes.
Unrestricted DID Creation Leading to Counter Exhaustion: The createDID() function relies on the _didCounter variable to assign identifiers to newly created DIDs but lacks access control, allowing any user to invoke it. A malicious actor could create an excessive number of DIDs, causing the counter to approach or reach the uint256 limit. This would render the counter unusable and disrupt the system’s ability to generate new DIDs.
Irrecoverable DID State After Revocation: Once a DID is revoked, it cannot be reactivated, and the associated address is permanently blocked from creating a new DID. This creates an irreversible loss of identity for the user and may lead to unintended account lockouts or disruption of external systems relying on DID continuity.
Potential Credential ID Collision Due to Hash-Based Identifier Generation: Credential identifiers are derived from the output of keccak256(), which includes a string parameter as part of the input. Because the system relies solely on this hash value as the unique credential ID, there is a risk of collisions. In the event of a hash collision, a newly created credential may overwrite an existing one or become incorrectly associated with the same credentialId, leading to loss of data integrity and incorrect credential ownership.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2025-1423 | Lack of Access Control Enabling Unauthorized Credential Issuance and Revocation | fixed | Critical | |
| F-2025-1426 | Possibility of Burning Incorrect Token Because of Mutable Credential Contract Address | fixed | Medium | |
| F-2025-1426 | Reusable Authentication Signatures Due to Missing Nonce | fixed | Medium | |
| F-2025-1425 | Owner Authorization Allows Arbitrary Burning of Soulbound Tokens | fixed | Medium | |
| F-2025-1427 | Missing Active-State Check Allows Updates on Revoked DIDs | fixed | Low | |
| F-2025-1425 | Inaccurate Credential Count Returned by View Functions | fixed | Low | |
| F-2025-1421 | Use of transfer() Instead of call() to Send Native Assets | fixed | Low | |
| F-2025-1426 | Approval Logic Conflicts With Soulbound Token Restrictions | fixed | Observation | |
| F-2025-1425 | Lack of Event Emitting for Key State Changes | fixed | Observation | |
| F-2025-1425 | Custom Errors Can Be Used for Gas Efficiency | fixed | Observation |
Appendix 1. Definitions
Severities
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 |
|---|---|
Critical | Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation. |
High | High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation. |
Medium | Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category. |
Low | Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution. |
Severity
- Critical
Description
- Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.
Severity
- High
Description
- High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.
Severity
- Medium
Description
- Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.
Severity
- Low
Description
- Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution.
Potential Risks
The "Potential Risks" section identifies issues that are not direct security vulnerabilities but could still affect the project’s performance, reliability, or user trust. These risks arise from design choices, architectural decisions, or operational practices that, while not immediately exploitable, may lead to problems under certain conditions. Additionally, potential risks can impact the quality of the audit itself, as they may involve external factors or components beyond the scope of the audit, leading to incomplete assessments or oversight of key areas. This section aims to provide a broader perspective on factors that could affect the project's long-term security, functionality, and the comprehensiveness of the audit findings.
Appendix 2. Scope
The scope of the project includes the following smart contracts from the provided repository:
Scope Details | |
|---|---|
| Repository | https://github.com/ryt-io/DID-Contract-→ |
| Initial Commit | 6ad61d06ccaea148335a4160039e95560e90f895 |
| Final Commit | a69510881dbb22b16ebb10a31cd977bc2e5bcbcd |
| Whitepaper | N/A |
| Requirements | README.md |
| Technical Requirements | README.md |
Scope Details
- Repository
- https://github.com/ryt-io/DID-Contract-→
- Initial Commit
- 6ad61d06ccaea148335a4160039e95560e90f895
- Final Commit
- a69510881dbb22b16ebb10a31cd977bc2e5bcbcd
- Whitepaper
- N/A
- Requirements
- README.md
- Technical Requirements
- README.md
Assets in Scope
Appendix 3. Additional Valuables
Additional Recommendations
The smart contracts in the scope of this audit could benefit from the introduction of automatic emergency actions for critical activities, such as unauthorized operations like ownership changes or proxy upgrades, as well as unexpected fund manipulations, including large withdrawals or minting events. Adding such mechanisms would enable the protocol to react automatically to unusual activity, ensuring that the contract remains secure and functions as intended.
To improve functionality, these emergency actions could be designed to trigger under specific conditions, such as:
Detecting changes to ownership or critical permissions.
Monitoring large or unexpected transactions and minting events.
Pausing operations when irregularities are identified.
These enhancements would provide an added layer of security, making the contract more robust and better equipped to handle unexpected situations while maintaining smooth operations.
Frameworks and Methodologies
This security assessment was conducted in alignment with recognised penetration testing standards, methodologies and guidelines, including the NIST SP 800-115 – Technical Guide to Information Security Testing and Assessment →, and the Penetration Testing Execution Standard (PTES) →, These assets provide a structured foundation for planning, executing, and documenting technical evaluations such as vulnerability assessments, exploitation activities, and security code reviews. Hacken’s internal penetration testing methodology extends these principles to Web2 and Web3 environments to ensure consistency, repeatability, and verifiable outcomes.