Summary
100% of all REPORTED Findings have been addressed
- 23Acknowledged
- 6Risk Accepted
- 4Solved
- 33All Findings
- Critical0
- High0
- Medium2
- 2Solved
- Low9
- 1Ack.
- 6Risk A.
- 2Solved
- Informational22
- 22Ack.
INTRODUCTION#
Obsidian engaged Halborn to conduct a security assessment on their smart contracts beginning on October 27th, 2026 and ending on October 30th, 2026. The assessment scope was limited to the smart contracts provided to Halborn. Commit hashes and additional details are available in the Scope section of this report.
The reviewed contracts are the V7 pool of the Tradecraft AMM, a concentrated-liquidity venue on Canton for tokenized stocks, written in Daml. Actors submit swap, deposit, withdrawal and collection orders through the public order API. The vault executes them in batches against the V6 swap and tick math, which ports the Uniswap v3 concentrated-liquidity formulas to Daml Numeric 20 arithmetic. The vault funds the orders from allocations, holdings or transfer offers, and settles both legs immediately or through deferred delivery-versus-payment requests.
A Transfer Agent issues at least one pool token and can freeze its movements for an individual, for the vault, or for the whole token, as its legal obligations require. The pool adds compliance controls on top of trading: holder and LP admission based on registry credentials, security-control holds and market status, volume limits, owner recovery with segregated claims, and venue rejection of orders.
ASSESSMENT SUMMARY#
Halborn was provided with 4 days for this engagement and assigned 3 full-time security engineers to assess the security of the smart contracts in scope. The assigned engineers possess deep expertise in blockchain and smart contract security, including hands-on experience with multiple blockchain protocols.
The objectives of this assessment are to:
Identify potential security vulnerabilities within the smart contracts.
Verify that the smart contract functionality operates as intended.
In summary, Halborn identified several areas for improvement to reduce the likelihood and impact of security risks, which should be addressed by the Obsidian team. The main recommendations are:
Keep the failure of one order inside that order. Reject a swap price limit outside the open price range, bound the
instrument1amount of each deposit, and cap the liquidity at each tick, so that no order can make a Numeric 20 operation or theAMMprecondition abort the whole batch.Round every pool amount in favor of the pool. Compute each
instrument1andinstrument2amount as one exact quotient and round it once: up when the pool receives tokens, and down when the pool pays them.
TEST APPROACH AND METHODOLOGY#
Halborn performed a combination of manual review of the code and automated security testing to balance efficiency, timeliness, practicality, and accuracy in regard to the scope of the smart contract assessment. While manual testing is recommended to uncover flaws in logic, process, and implementation; automated testing techniques help enhance coverage of smart contracts and can quickly identify items that do not follow security best practices.
The following phases and associated tools were used throughout the term of the assessment:
Research into the architecture and purpose of the in-scope contracts.
Manual code review and walkthrough of the in-scope contracts.
Manual assessment of critical Daml variables and functions to identify potential vulnerability classes.
Manual testing using custom scripts.
Invariant testing of Uniswap v3 properties with seeded, generated order sequences on the ledger.
Static Analysis of security for scoped contracts, and imported functions (Daml compiler).
Local deployment and testing with (Daml Script on the Daml IDE ledger).
Risk Methodology#
4.1 EXPLOITABILITY
Attack Origin (AO):
Attack Cost (AC):
Attack Complexity (AX):
Metrics:
| EXPLOITABILITY METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Attack Origin (AO) | Arbitrary (AO:A) | 1 |
| Specific (AO:S) | 0.2 | |
| Attack Cost (AC) | Low (AC:L) | 1 |
| Medium (AC:M) | 0.67 | |
| High (AC:H) | 0.33 | |
| Attack Complexity (AX) | Low (AX:L) | 1 |
| Medium (AX:M) | 0.67 | |
| High (AX:H) | 0.33 |
4.2 IMPACT
Confidentiality (C):
Integrity (I):
Availability (A):
Deposit (D):
Yield (Y):
Metrics:
| IMPACT METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Confidentiality (C) | None (C:N) | 0 |
| Low (C:L) | 0.25 | |
| Medium (C:M) | 0.5 | |
| High (C:H) | 0.75 | |
| Critical (C:C) | 1 | |
| Integrity (I) | None (I:N) | 0 |
| Low (I:L) | 0.25 | |
| Medium (I:M) | 0.5 | |
| High (I:H) | 0.75 | |
| Critical (I:C) | 1 | |
| Availability (A) | None (A:N) | 0 |
| Low (A:L) | 0.25 | |
| Medium (A:M) | 0.5 | |
| High (A:H) | 0.75 | |
| Critical (A:C) | 1 | |
| Deposit (D) | None (D:N) | 0 |
| Low (D:L) | 0.25 | |
| Medium (D:M) | 0.5 | |
| High (D:H) | 0.75 | |
| Critical (D:C) | 1 | |
| Yield (Y) | None (Y:N) | 0 |
| Low (Y:L) | 0.25 | |
| Medium (Y:M) | 0.5 | |
| High (Y:H) | 0.75 | |
| Critical (Y:C) | 1 |
4.3 SEVERITY COEFFICIENT
Reversibility (R):
Scope (S):
Metrics:
| SEVERITY COEFFICIENT () | COEFFICIENT VALUE | NUMERICAL VALUE |
|---|---|---|
| Reversibility () | None (R:N) | 1 |
| Partial (R:P) | 0.5 | |
| Full (R:F) | 0.25 | |
| Scope () | Changed (S:C) | 1.25 |
| Unchanged (S:U) | 1 |
| Critical | High | Medium | Low | Informational |
| 9 - 10 | 7 - 8.9 | 4.5 - 6.9 | 2 - 4.4 | 0 - 1.9 |
Scope#
Assessment Summary & Findings Overview#
# | Title | Severity | Score | Status |
|---|---|---|---|---|
| getAmountsForLiquidity Leaves The Division Quotient Unbounded | Medium | 6.3 | Solved10/30/2026 | |
| Accumulated Position Liquidity Blocks Owner Interest Segregation | Medium | 5.0 | Solved10/30/2026 | |
| Swap Fee Miscalculation Overcharges Traders At High Liquidity | Low | 3.4 | Acknowledged10/30/2026 | |
| CreditLpFee Diverts LP Fee To ProtocolFees | Low | 3.4 | Risk Accepted10/30/2026 | |
| Deferred Swaps Permanently Consume Shared Volume Allowance | Low | 2.9 | Risk Accepted10/30/2026 | |
| amount1Delta rounding lets instrument1 claims exceed the pool reserve at low prices | Low | 2.5 | Risk Accepted10/30/2026 | |
| Unreconciled Reserve Delta Can Lock LP Withdrawals | Low | 2.5 | Risk Accepted10/30/2026 | |
| Unbounded Liquidity Price Product Overflows Batch Execution | Low | 2.5 | Risk Accepted10/30/2026 | |
| BisectTick Recursion Loop Halts Entire Swap Batch | Low | 2.5 | Solved10/30/2026 | |
| Consuming AMM Choices Leak Recovery Data To Readers | Low | 2.5 | Solved10/30/2026 | |
| Spent Signed Funding Source Aborts The Whole V7 Batch | Low | 2.5 | Risk Accepted10/30/2026 | |
| Swap to the minimum price aborts the whole V7 batch | Informational | 1.7 | Acknowledged10/30/2026 | |
| RequireNoStockFee Allows Stock-Leg Dust To Reach The Venue | Informational | 1.7 | Acknowledged10/30/2026 | |
| Missing Authority Check Lets Venue Divert LP Funds | Informational | 1.5 | Acknowledged10/30/2026 | |
| Uncapped Protocol Fee Lets Venue Divert LP Yield | Informational | 1.5 | Acknowledged10/30/2026 | |
| Duplicate Pool Seed Lets Venue Collide Position Keys | Informational | 1.5 | Acknowledged10/30/2026 | |
| Recovery Instruction Can Omit Owner Position Ranges | Informational | 1.5 | Acknowledged10/30/2026 | |
| Position Replace Lets Venue And Vault Zero LP Positions | Informational | 1.5 | Acknowledged10/30/2026 | |
| Vault Alone Can Reassign Any LP Position | Informational | 1.5 | Acknowledged10/30/2026 | |
| AssertMappedHoldActive Accepts Any Unrelated Approved Hold | Informational | 1.5 | Acknowledged10/30/2026 | |
| Recovery Destinations Allow Venue Or Owner | Informational | 1.5 | Acknowledged10/30/2026 | |
| LoadVolume Trusts Counted Usage That Only The Vault Signs | Informational | 1.5 | Acknowledged10/30/2026 | |
| Unbounded aggregate liquidity makes swaps overflow Numeric 20 and abort the whole V7 batch | Informational | 1.1 | Acknowledged10/30/2026 | |
| Malformed Tick Shards Silently Desync Pool Liquidity | Informational | 1.0 | Acknowledged10/30/2026 | |
| ValidateVolumeReplacement Resets Counted Volume Before The Old Window Ends | Informational | 1.0 | Acknowledged10/30/2026 | |
| Recovery Authority Cannot Be Rotated After Creation | Informational | 0.8 | Acknowledged10/30/2026 | |
| Sub-ULP Remainder Spuriously Rejects Fillable Swap Orders | Informational | 0.8 | Acknowledged10/30/2026 | |
| Uncapped Liquidity Overflow In SqrtPriceMath Aborts Batch | Informational | 0.8 | Acknowledged10/30/2026 | |
| Single ULP Back-Off Wrongly Rejects Valid Swap Orders | Informational | 0.8 | Acknowledged10/30/2026 | |
| Swap Tick-Crossing Cap Rejects Instead Of Partial Fill | Informational | 0.8 | Acknowledged10/30/2026 | |
| Volume Policy Freezes Shares Per Token Ratio | Informational | 0.5 | Acknowledged10/30/2026 | |
| FeeOn Overflows At Near-Maximum Pool Fee Values | Informational | 0.4 | Acknowledged10/30/2026 | |
| Duplicate PositionKey Raw-Create Aborts Entire Batch | Informational | 0.3 | Acknowledged10/30/2026 |
Findings & Tech Details#
Description
Recommendation
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Disclaimer#
Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.
