All posts

What the Audits Found and What Changed

·Shazad Khanauditsecuritycode4rena

Not investment advice. Capital is at risk.

An audit report = a dated review of one version of the code. It tells you what was found and how it was handled. It does not tell you the deployed contracts are safe.

"The contracts are audited" is a sentence that gets repeated until it means nothing. This post does what we think a depositor should do with any audit: read the findings, read how they were handled, and check how far the audited code is from the code running now.

The record is public. It sits in github.com/sukukfi/security-audits, with the audit report, a later remediation report, and a known-issues file. For how we think about the invariants the auditors tested, see how we approach smart contract security.

What was audited

The audit was a Code4rena competitive contest, run from 26 November to 5 December 2025. In a contest, many independent security researchers review the same code for a fixed period and are paid for valid findings, so the report reflects many reviewers rather than one firm.

The scope was 6 smart contracts and 1,670 lines of Solidity, pinned to a single commit. That commit matters more than it looks, and we come back to it below.

The report summarises the result as four unique vulnerabilities: one High and three Medium. Alongside those, 54 QA reports covered Low and informational issues.

The four findings

H-01, High: missing authorisation check on withdrawals. In the settlement vault, the withdraw and redeem functions did not check that the caller was the owner of the shares or held an allowance from them. The report's reasoning was that if an owner had approved the vault, which is needed for a legitimate withdrawal, anyone could call the function on that owner's behalf, burn the shares and send the assets to themselves. This was the one finding that could lose depositor funds directly, and it was found by a very large number of the participating researchers, which is typical of an obvious bug. In the source in our repository, both functions now require the caller to be the owner or to consume an allowance the owner granted.

M-01, Medium: unregistering a vault could be blocked. A malicious user could send one unit of a token to a vault, or leave a dust balance, and make the owner's checks for decommissioning a vault fail. The remediation report describes a fix for this mechanism: the owner's removal path now drains the vault, including donated dust, and compensates at par so that nobody takes a loss.

M-02, Medium: stale redemption liabilities. When a redemption is fulfilled, the payout is fixed at that moment's share price. If the vault later records a loss, the person who is already fulfilled is shielded and the remaining holders absorb all of it. The reviewer recommended repricing at claim time. We disputed the finding. Our position was that fixing the amount at fulfilment is what ERC-7540 requires, because repricing would erase the difference between pending and claimable. It was recorded as Acknowledged, not fixed. You can disagree with that design, and a depositor should know about it, which is why what happens if a carrier does not pay covers the effect on exit order.

M-03, Medium: share price could be corrupted by fulfillRedeem. When the vault's own balance was lower than the amount reserved for others, because capital was out on investment, the share price calculation could be inflated, and a later redeemer could receive more than their share. The suggested fix was to require that a fulfilment never exceeds the vault's available assets. The current source has that check.

The Low and informational reports covered things like a lingering token approval after a vault is removed and an incorrect interface identifier that made two contracts non-compliant with a standard.

What changed afterwards

The remediation report, dated 27 May 2026, covers every change made after a baseline commit of 17 March 2026, through to 27 May: 28 commits. It records the problem, the fix and the tests for each. Its stated test position at the end is 804 passing tests across 100 suites.

The changes fall into themes that read like a list of where the work was. Safer vault decommissioning. Validation of investment targets, so the vault can only invest into a matching settlement vault. Checks on upgrades, so the owner cannot point a proxy at an address that is not a valid implementation. Stricter handling of zero addresses. Operators scoped to a single vault. Compliance fixes against the ERC-7540 and ERC-7887 standards.

Two cautions on how to read that report.

First, it uses severity labels such as Critical and High for items that do not appear in the Code4rena summary, and it notes that identifiers were reassigned per round, so the same label recurs with different meanings. Those items came from review rounds other than the contest, and the report does not name the reviewers. Read the labels as the team's own classification, not as a second independent audit.

Second, the remediation report is our document. It is a record of what we changed and why. It is not an auditor's opinion that the changes are correct.

The gap between the audited code and the deployed code

The audit pinned one commit from November 2025. The contracts deployed on Berachain were built from a later one, after the 28 commits above. So the Code4rena contest did not review the code that is live. The post-audit changes were reviewed by our own team and tests. They have not been reviewed by an independent auditor.

That is the sentence an investor most needs, and it is the one most often missing from "audited" claims. We would rather you read it here. There is also a practical limit on checking it yourself. The implementation source is not verified on the Berascan explorer, so an explorer cannot confirm that the deployed bytecode matches the public repository. See the contracts page for what can and cannot be checked on-chain.

What the audits do not cover

The remediation report ends with a list of accepted residual risks. They are choices the team made and documented, not defects found:

The known-issues file adds that the owner can upgrade the investment-layer contracts without a timelock, a governance vote or a user exit window. Our post on what an admin can and cannot do sets those out in full.

An audit also does not address operational risk, key management, or whether the buyer pays. The audit says nothing about credit.

How to read any audit, including ours

Four questions get you most of the way.

  1. Which commit was audited, and is it the one deployed? If not, how many changes sit between them, and who reviewed them?
  2. How was each finding resolved? Fixed, acknowledged or disputed are different outcomes. A disputed finding is a design argument you can judge.
  3. Who did the reviewing? A contest, a single firm and the team's own review are different kinds of assurance, and the report should say which.
  4. What is out of scope? Roles, upgrades and off-chain components are usually where the remaining risk sits.

An audit lowers the chance of certain bugs. It does not remove smart contract risk, and ours does not claim to. Read the repository, read the reports against the deployed contracts, and decide on that basis.