Introduction
We express our gratitude to the S3 Markets team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
S3 contracts are smart contracts for environmental attribute certificates (ERC-1155), custody, transfer gating, and paymaster flows.
Document | |
|---|---|
| Name | Smart Contract Code Review and Security Analysis Report for S3 Markets |
| Audited By | Turgay Arda Usman, Khrystyna Tkachuk |
| Approved By | Panagiotis Konstantinidis |
| Website | https://www.s3markets.com/→ |
| Changelog | 22/01/2026 - Preliminary Report |
| 04/02/2026 - Second Report | |
| 06/02/2026 - Final Report | |
| Platform | EVM |
| Language | Solidity |
| Tags | ERC1155, Vault, Upgradable |
| Methodology | https://docs.hacken.io/methodologies/smart-contracts→ |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for S3 Markets
- Audited By
- Turgay Arda Usman, Khrystyna Tkachuk
- Approved By
- Panagiotis Konstantinidis
- Website
- https://www.s3markets.com/→
- Changelog
- 22/01/2026 - Preliminary Report
- 04/02/2026 - Second Report
- 06/02/2026 - Final Report
- Platform
- EVM
- Language
- Solidity
- Tags
- ERC1155, Vault, Upgradable
Review Scope | |
|---|---|
| Repository | https://github.com/S3-Markets/s3block→ |
| Initial Commit | 1df2037 |
| Final Commit | 00fc907 |
Review Scope
- Repository
- https://github.com/S3-Markets/s3block→
- Initial Commit
- 1df2037
- Final Commit
- 00fc907
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
{Finding_Table?columns=title,severity,status&setting.filter.type=Vulnerability}
Documentation quality
Functional requirements are partially provided.
Technical description is provided.
Code quality
The code partially follows best practices and style guides:
See informational findings for more details.
The development environment is configured.
Test coverage
Code coverage of the project is 86.63% (branch coverage).
Deployment and basic user interactions are covered with tests.
Negative cases coverage is present.
Interactions by several users are not tested.
System Overview
S3 contracts are smart contracts for environmental attribute certificates (ERC-1155), custody, transfer gating, and paymaster flows. It contains the following contracts:
EAC1155 — ERC-1155 token with supply caps, roles, and transfer gating
CustodyVault — Custody, allocation, and retirement of tokens (the only upgradeable contract)
UUPSProxy — UUPS proxy contract
TransferGate — Allow-list for wallet-to-wallet transfers
Privileged roles
The
OPS_ROLEof theCustodyVault.solcontract canmanage vault operations.The
DEFAULT_ADMIN_ROLEof theCustodyVault.solcontract can set a token address.The
DEFAULT_ADMIN_ROLEof theCustodyVault.solcontract can grant / revoke all other roles.The
ISSUER_ROLEof theEAC1155.solcontract can create token Ids, mint tokens, and set transfer gates.The
BURNER_ROLEof theEAC1155.solcontract can burn or retire tokens.The
PASUER_ROLEof theEAC1155.solcontract can manager emergency pause mechanism.The
GATE_ADMINof theTransferGate.solcontract can set transfer permissions.The
DEFAULT_ADMIN_ROLEof theTransferGate.solcontract can grant / revoke all other roles.
Potential Risks
Concentrated minting authority: The EAC1155 token design gives a single administrative role broad discretion over minting, including the ability to mint not only to the CustodyVault but also to other addresses. While this may be intended for operational flexibility, it increases reliance on internal controls and governance processes to prevent unexpected issuance that could impact token supply expectations and stakeholder confidence. Dynamic Array Iteration Gas Limit Risks: The project iterates over large dynamic arrays, which leads to excessive gas costs, risking denial of service due to out-of-gas errors, directly impacting contract usability and reliability. Single Points of Failure and Control: Parts of the system rely on a limited set of privileged roles and operational processes. This concentration can simplify coordination, but it also means overall availability and decision execution may depend on a small number of entities, increasing sensitivity to operational issues or targeted compromise. Flexibility and Risk in Contract Upgrades: The CustodyVault contract is upgradeable, which can be beneficial for maintenance, improvements, and responding to issues. At the same time, upgrades introduce an additional governance and security requirement: users and integrators must rely on the upgrade process being appropriately restricted, reviewed, and transparently managed to reduce the risk of unexpected or unauthorized changes. Token Metadata and URI Modification Authority: The EAC1155 admin is able to update token URIs after issuance. The project design binds each tokenId at mint time to a cryptographic metadata hash, making any substantive modification to metadata content externally detectable through a hash mismatch. This provides an important integrity signal and limits the ability to alter the semantic meaning of an issued EAC without detection. At the same time, URI-level updates still influence how metadata is resolved, displayed, and interpreted by wallets, marketplaces, and other consumers. As a result, changes to hosting, structure, or presentation may affect user perception and integration behavior over time. Clearly defining the intended scope of URI updates and making the hash-binding mechanism easy to observe helps ensure consistent expectations and reduces ambiguity for token holders and integrators. Coarse-grained Authorization Model Risks: The authorization model grants broad permissions to certain addresses. If any privileged key is compromised, the potential impact could be significant, as an attacker may be able to perform high-impact actions. This makes privilege minimization and strong key management especially important. Owner’s Unrestricted State Modification: The owner has wide latitude to adjust state variables without explicit limitations. This can be useful for administration and responding to evolving needs, but it also increases the importance of transparency, well-defined governance, and change-management practices, particularly around sensitive phases such as minting or distribution, to maintain predictable behavior and user confidence.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2026-1480 | Expired Tokens Permanently Trapped | fixed | High | |
| F-2026-1479 | Funds Loss via Direct Transfer in CustodyVault | fixed | High | |
| F-2026-1481 | Expired Tokens Permanently Locked Due to Burn Restriction | fixed | Medium | |
| F-2026-1481 | Transfer Gate Bypassed by Non-Allowlisted Operators | fixed | Low | |
| F-2026-1479 | Missing Zero Address Validation | fixed | Observation | |
| F-2026-1479 | Floating Pragma | fixed | Observation | |
| F-2026-1481 | Inactive Buyers Remain in _buyers Indefinitely | fixed | Observation | |
| F-2026-1481 | Missing Validation Between Token Expiry and Market Entry Period | fixed | Observation | |
| F-2026-1481 | Redundant Zero-Address Checks in Transfer Logic | fixed | Observation | |
| F-2026-1481 | Missing supportsInterface Override | 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/S3-Markets/s3block→ |
| Initial Commit | 1df2037 |
| Final Commit | 00fc907 |
| Whitepaper | N/A |
| Requirements | Readme.md |
| Technical Requirements | Readme.md |
Scope Details
- Repository
- https://github.com/S3-Markets/s3block→
- Initial Commit
- 1df2037
- Final Commit
- 00fc907
- 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.