Download audit report
This document presents the security review performed by Nethermind Security for Origami protocol smart contracts. Origami is a decentralized finance protocol designed to offer users leveraged exposure to the Olympus ecosystem through a tokenized vault system.
The system uses a tokenized balance sheet to manage assets and liabilities, enabling accurate share pricing and redemptions. It includes automated LTV optimization, surplus management for liquidity, and vote delegation for governance.
Users can deposit gOHM tokens that will be used as collateral in MonoCooler to borrow USDS that may be used to do buybacks and increase the gOHM entitled to users. The Vault automates a strategy allowing users to leverage their gOHM to earn more gOHM.
The Vault shares (HOhm) can also be bridged through layer zero to be traded and used on other chains.
The audited code comprises 1,582 lines of Solidity code. The audit was performed using (a) manual analysis of the codebase, (b) automated analysis tools, and (c) creation of test cases.
| Audit assessment | |
| Audit Type | Security Review |
| Initial Report | April 04, 2025 |
| Response from Client | Regular responses during audit engagement |
| Final Report | April 04, 2025 |
| Repository | origami |
| Start Commit | 6b0e28eb43 |
| Final Commit | 3fb41ec299 |
| Documentation | Origami Spec and Origami Doc Repo |
| Documentation Assessment | High |
| Test Suite Assessment | High |
Findings by severity
| # | Contract | LoC | Comments | Ratio | Blank | Total |
| 1 | libraries/OlympusCoolerDelegation.sol | 142 | 55 | 38.7% | 22 | 219 |
| 2 | common/OrigamiTokenizedBalanceSheetVault.sol | 591 | 192 | 32.5% | 108 | 891 |
| 3 | common/swappers/OrigamiSwapperWithCallback.sol | 39 | 23 | 59.0% | 13 | 75 |
| 4 | common/access/OrigamiElevatedAccess.sol | 7 | 5 | 71.4% | 2 | 14 |
| 5 | common/access/Whitelisted.sol | 23 | 27 | 117.4% | 9 | 59 |
| 6 | common/access/OrigamiOftElevatedAccess.sol | 13 | 6 | 46.2% | 3 | 22 |
| 7 | common/access/OrigamiElevatedAccessUpgradeable.sol | 12 | 10 | 83.3% | 4 | 26 |
| 8 | common/access/OrigamiElevatedAccessBase.sol | 49 | 37 | 75.5% | 14 | 100 |
| 9 | common/omnichain/OrigamiTokenTeleporter.sol | 17 | 7 | 41.2% | 2 | 26 |
| 10 | common/omnichain/OrigamiTeleportableToken.sol | 65 | 19 | 29.2% | 11 | 95 |
| 11 | common/omnichain/OrigamiOFT.sol | 32 | 7 | 21.9% | 5 | 44 |
| 12 | investments/olympus/OrigamiHOhmManager.sol | 410 | 146 | 35.6% | 96 | 652 |
| 13 | investments/olympus/OrigamiHOhmVault.sol | 182 | 48 | 26.4% | 35 | 265 |
| Total | 1582 | 582 | 36.8% | 324 | 2488 |
| # | Finding | Severity | Update |
| 1 | The Vault allows joins with zero shares | Best Practices | Fixed |
This review covers 13 contracts organized into four main components: access control, an OFT (Omnichain Fungible Token) standard token, a tokenized vault based on the ERC-4626 standard, and a manager contract responsible for collateral management and enforcing maximum borrowing limits in the Olympus MonoCooler system. Fig. 2 presents a package diagram that highlights the main packages and contracts included in the scope of this review.

Origami system relies on LayerZero to use OFT (Omnichain Fungible Token) standard to allow hOHM to be transferred cross-chain. As presented in Fig. 3, the OrigamiTeleportableToken contract is an ERC20 token with the support of the ERC20Permit that does not require token approval to be spent by the trusted teleporter. The OrigamiOFT contract extends the LayerZero OFT contract, allowing cross-chain token transfers while preserving compatibility with ERC-20 and its extensions. All these contracts also inherit from OrigamiElevatedAccess to manage administrative permissions.
Fig. 3 shows that OrigamiTokenTeleporter contract extends the OFTAdapter to enable interoperability of hOHM across multiple chains. Since this contract is deployed on the mainnet, the inner token is locked, rather than burned, when transferred through it.


The contracts OrigamiHOhmVault and OrigamiHOhmManager work together to implement a tokenized financial mechanism based on collateral and debt. The Vault serves as a tokenized balance sheet vault, allowing users to mint and burn shares in exchange for assets (collateral) and liabilities (debt). The Manager contract handles interactions with the Olympus MonoCooler system to add/remove collateral and to borrow or repay debt, always aiming to maintain the Loan-to-Value (LTV) ratio at the maximum allowed by Cooler. The Manager also manages the delegation of gOHM voting power and handles surplus debt token strategies, optimizing for yield and system stability. Fig. 4 illustrates this interaction between both contracts.
4.1.1 OrigamiTokenizedBalanceSheetVault
As presented in Fig 3, the OrigamiTokenizedBalanceSheetVault contract extends the OrigamiTeleportableToken. Basically, the shares in this vault represent a proportional part of both the assets and liabilities within this structure.
Minting Shares. When users mint new shares:
Redeeming Shares. Users can redeem their shares:
Dynamic Balance Sheet:
Core functions. Fig. 4 illustrates a sequence diagram for two of the core functions. The contract exposes several public and external functions. Inspired by ERC4626, it provides the following core operations:
seed(assetAmounts, liabilityAmounts, sharesToMint, receiver, newMaxTotalSupply): It is invoked by an elevated access role to initialize the vault. The caller must provide the amount of each asset and liability, along with the number of shares to mint. These values define the initial share price for each asset and liability.joinWithToken(tokenAddress, amount): Mints shares based on the input of a single asset or liability. The vault derives the share amount and any remaining required token transfers proportionally. Fig. 2 depicts how this function interacts with other contracts.joinWithShares(shares): Mints a specified number of shares. The vault pulls a proportional amount of assets from the user and sends the corresponding liabilities. The flow is similar to the joinWithToken function, the difference is based on the input parameter.exitWithToken(tokenAddress, amount): Burns shares to allow for redemption based on a single token (asset or liability). The vault determines the proportional share amount and additional transfers. Fig. 2 depicts how this function interacts with other contracts.exitWithShares(shares): Burns a specified number of shares. The vault sends a proportional amount of assets to the user and pulls the corresponding liabilities. The flow is similar to the joinWithToken function, the difference is based on the input parameter.4.1.2 OrigamiHOhmVault
The OrigamiHOhmVault contract is a specialized implementation of the OrigamiTokenizedBalanceSheetVault (shown in Fig. 4), designed to manage a leveraged gOHM position using the MonoCooler lending system. It allows users to deposit gOHM as collateral and receive a combination of vault shares (hOHM) and borrowed debt tokens (e.g., USDS).
This vault tracks a single asset (the gOHM collateral) and a single liability (the debt token). While the base vault handles share minting, burning, and conversions between tokens and shares, OrigamiHOhmVault adds logic specific to the Olympus ecosystem. It delegates all borrowing and collateral interactions to the OrigamiHOhmManager contract.
The key responsibilities of OrigamiHOhmVault include:
areJoinsPaused, areExitsPaused, and burn.4.1.3 OrigamiHOhmManager
The OrigamiHOhmManager contract serves as the core logic handler for interactions between the OrigamiHOhmVault and Olympus MonoCooler lending platform. Its primary role is to abstract and automate the process of managing collateral and debt within the vault.
Responsibilities: This manager contract is responsible for:
MonoCooler contract.DLGTEv1).debtToken (e.g., USDS) to ensure liquidity and support redemptions.Swapper contract to periodically perform buybacks and burn hOHM using excess debt tokens.Delegation Management: The manager tracks the delegation information per account and updates the delegation amounts automatically when the vault shares change. It computes a user's proportional collateral based on their share of the total supply and submits the corresponding delegation update to the MonoCooler contract.
Debt Optimization: Upon each vault join or exit, the OrigamiHOhmManager invokes the _coolerMaxBorrow function to determine the optimal change in debt necessary to maintain the maximum allowed origination LTV. The result is applied by calling borrow or repay on MonoCooler. This flow is presented in Fig. 4.
Surplus strategy: Any surplus debtToken held by the contract can be deposited in a yield-bearing savings vault (e.g., sUSDS) which has a higher interest rate than the cooler interest rate. The contract also provides the sweep function that can be called to use the surplus token to buy hOHM from the market and then burn it. The goal for this function is to decrease the total supply, consequently, increase the share price of both the collateral and the debt tokens per hOHM.
The risk rating methodology used by Nethermind Security follows the principles established by the OWASP Foundation. The severity of each finding is determined by two factors: Likelihood and Impact.
Likelihood measures how likely the finding is to be uncovered and exploited by an attacker. This factor will be one of the following values:
When defining the likelihood of a finding, other factors are also considered. These can include but are not limited to motive, opportunity, exploit accessibility, ease of discovery, and ease of exploit.
Impact is a measure of the damage that may be caused if an attacker exploits the finding. This factor will be one of the following values:
When defining the impact of a finding, other factors are also considered. These can include but are not limited to data and state integrity, loss of availability, financial loss, and reputation damage. After defining the likelihood and impact of an issue, the severity is determined according to the table below.
| Impact / Likelihood | Low | Medium | High |
| High | Medium | High | Critical |
| Medium | Low | Medium | High |
| Low | Info / Best Practices | Low | Medium |
| Undetermined | Undetermined | Undetermined | Undetermined |
To address issues that do not fit a High, Medium or Low severity, Nethermind Security also uses three more finding severities: Informational, Best Practices, and Undetermined.
| File | Fix commit | Type | Status |
apps/protocol/contracts/common/OrigamiTokenizedBalanceSheetVault.sol | PR #1459 | Best Practices | Fixed |
The Vault allows users to execute join operations that would result in zero shares due to rounding. Users could join but not receive any shares in exchange.
Recommendation
Consider reverting when minting zero shares.
Software documentation refers to the written or visual information that describes the functionality, architecture, design, and implementation of software. It provides a comprehensive overview of the software system and helps users, developers, and stakeholders understand how the software works, how to use it, and how to maintain it. Software documentation can take different forms, such as user manuals, system manuals, technical specifications, requirements documents, design documents, and code comments. Software documentation is critical in software development, enabling effective communication between developers, testers, users, and other stakeholders. It helps to ensure that everyone involved in the development process has a shared understanding of the software system and its functionality. Moreover, software documentation can improve software maintenance by providing a clear and complete understanding of the software system, making it easier for developers to maintain, modify, and update the software over time. Smart contracts can use various types of software documentation. Some of the most common types include:
These types of documentation are essential for smart contract development and maintenance. They help ensure that the contract is properly designed, implemented, and tested, and they provide a reference for developers who need to modify or maintain the contract in the future.
The Origami team has provided comprehensive documentation that describes expected flows and behaviors, including detailed examples of minting, redeeming, buybacks, and seeding operations. The codebase is also well-commented, addressing both business logic and low-level implementation details. Moreover, the team addressed all questions and concerns raised by the Nethermind Security team, offering valuable insights and demonstrating a strong understanding of the project's technical aspects.
All the relevant issues raised by the AuditAgent have been incorporated into this report. The AuditAgent is an AI-powered smart contract auditing tool that analyses code, detects vulnerabilities, and provides actionable fixes. It accelerates the security analysis process, complementing human expertise with advanced AI models to deliver efficient and comprehensive smart contract audits. Available at https://app.auditagent.nethermind.io.
| 512Tests passed | 0Failed |
The complete test output is in the full report.
As auditors, we recommend that any changes or updates made to the audited codebase undergo a re-audit or security review to address potential vulnerabilities or risks introduced by the modifications. By conducting a re-audit or security review of the modified codebase, you can significantly enhance the overall security of your system and reduce the likelihood of exploitation. However, we do not possess the authority or right to impose obligations or restrictions on our clients regarding codebase updates, modifications, or subsequent audits. Accordingly, the decision to seek a re-audit or security review lies solely with you.
This report is based on the scope of materials and documentation provided by you to Nethermind in order that Nethermind could conduct the security review outlined in 1. Executive Summary and 2. Audited Files. The results set out in this report may not be complete nor inclusive of all vulnerabilities. Nethermind has provided the review and this report on an as-is, where-is, and as-available basis. You agree that your access and/or use, including but not limited to any associated services, products, protocols, platforms, content, and materials, will be at your sole risk. Blockchain technology remains under development and is subject to unknown risks and flaws. The review does not extend to the compiler layer, or any other areas beyond the programming language, or other programming aspects that could present security risks. This report does not indicate the endorsement of any particular project or team, nor guarantee its security. No third party should rely on this report in any way, including for the purpose of making any decisions to buy or sell a product, service or any other asset. To the fullest extent permitted by law, Nethermind disclaims any liability in connection with this report, its content, and any related services and products and your use thereof, including, without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Nethermind does not warrant, endorse, guarantee, or assume responsibility for any product or service advertised or offered by a third party through the product, any open source or third-party software, code, libraries, materials, or information linked to, called by, referenced by or accessible through the report, its content, and the related services and products, any hyperlinked websites, any websites or mobile applications appearing on any advertising, and Nethermind will not be a party to or in any way be responsible for monitoring any transaction between you and any third-party providers of products or services. As with the purchase or use of a product or service through any medium or in any environment, you should use your best judgment and exercise caution where appropriate. FOR AVOIDANCE OF DOUBT, THE REPORT, ITS CONTENT, ACCESS, AND/OR USAGE THEREOF, INCLUDING ANY ASSOCIATED SERVICES OR MATERIALS, SHALL NOT BE CONSIDERED OR RELIED UPON AS ANY FORM OF FINANCIAL, INVESTMENT, TAX, LEGAL, REGULATORY, OR OTHER ADVICE.
The Leading Engineers of Blockchain Infrastructure