background
logo

Security Audit Report for Habittrade's Stove Protocol Contracts

DESCRIPTION

The target of this audit is the private code repository of Stove Protocol Contracts of Habittrade. The protocol establishes an on-chain stock trading market that enables the issuance and trading of tokenized stocks. Stock tokens are created via a factory contract, while certain stock-related operations, such as dividends, stock splits, and reverse splits are handled through trusted off-chain logic and executed on-chain by privileged operators. User trading activity, including buying and selling stock tokens, is facilitated through the RFQSettlement contract, which manages order execution and settlement. By combining on-chain enforcement with off-chain computation, the protocol aims to provide a flexible and efficient framework for tokenized equity management and trading.

Please refer to the report for the detailed audit scope.

Our audit methodology employs automated vulnerability scans, manual verification, and business logic analysis to uncover potential security issues coupled with gas and code quality optimization recommendations.

In summary, we have found that the codebase contains 1 high-risk issue that require prompt attention. In addition, we have identified other non-critical issues as well as recommendations and notes that should be considered. The Stove Protocol Contracts team has addressed these issues promptly. It is important to note that our audit covers only the final reported versions of the codebase. Any subsequent updates would require a re-evaluation.

KEY FINDINGS

In total, we find 10 potential issues in the smart contract. We also have 2 recommendations and 2 notes, as follows:

High Risk: 1
Medium Risk: 6
Low Risk: 3
Recommendation: 2
Note: 2
ID Severity Description Status
1 High Lack of check in functions permitTransferFrom() and permitTransferFromBatch() Fixed
2 Medium Incorrect lock caller context in batch order filling Fixed
3 Medium Lack of management routing in StockTokenManager Fixed
4 Medium Incomplete delisting coverage in stock token management Fixed
5 Medium Potential loss of funds on expired order relocking Fixed
6 Medium Incorrect stockToken update logic Confirmed
7 Medium Lack of principal address validation in function lockOrder() Fixed
8 Low Inconsistent incentive allocation in order filling Confirmed
9 Low Inconsistent exchange validation in function updateStockInfo() Fixed
10 Low Inconsistent lock window configuration Fixed
11 - Improper logic in function computeAddress() Fixed
12 - Inconsistent event emission in invalidateNonce() and invalidateNonces() Fixed
13 - Potential centralization risks -
14 - Trusted off-chain logic -

More details are provided in the audit report.

Take the first step towards a secure future

Reach out now for BlockSec's expert code audit services, elevate the security of your protocol before it goes live!