Security and audits

Precept's security rests on independent review, machine-checked proofs and reproducible builds. Monitoring is partly live. None of these removes the risk of a loss. See Risks.

The Guardian review

Guardian reviewed Precept's contract changes and published the Guardian security review, October 2026. The scope was 1,407 source lines across 46 files, with an initial review at commit 7a09b0e3d228 and a remediation review at b385dfb5cf18. Together these form the code released as v0.1.0. Guardian recorded no Critical, High or Medium findings, and 5 Low and 10 Informational findings. Guardian also reviewed the later changes in v0.1.1, including the event-topic changes listed on Code lineage.

Every finding except one was resolved. The single open item is L-05, on the price adapter's timestamp handling, which Guardian marked acknowledged. The reported defect was in the adapter: it rounded the parent's timestamp down to the start of the resolution bucket, which hid a future-dated parent price from the market's own check. Precept's adapter now refuses a parent price dated ahead of ledger time on its latest-price path (lastprice) (pool-oracle-adapter/src/lib.rs). The recommendation itself is aimed at the parent proxy oracle, a separate contract outside the Precept repository: let an observation inside the freshness window replace a history head that is ahead of ledger time, so the head cannot outlast the clock. Guardian notes that passing the parent's timestamp through unfloored would also restore the market's check, but on its own it blocks pricing for that asset until ledger time catches up. Read L-05 together with the price rules on Risks: the market independently rejects future-dated, stale, non-positive and wrongly-scaled prices.

The proxy oracle audit

Halborn audited the proxy oracle. Read the Halborn proxy oracle audit report.

Audits of the inherited code

Guardian's scope does not cover all the code in a Precept market. Code4rena and Certora audited the code that Precept's changes build on, before those changes existed. Their reports do not cover Precept's changes. The reports are linked from Code lineage.

Design choices that reduce risk

Proxy oracle

Markets do not read one price feed directly. A market reads a proxy oracle that collects prices from the sources configured for each asset, and publishes the low-middle median of the fresh ones. One bad source therefore has less effect when others are fresh. The proxy also has per-asset age limits and circuit breakers.

Redundancy depends on each market's setup. An asset can have one source, and a market can accept a price from one fresh source out of several. The proxy is also governed and upgradeable, unlike the market contracts. A compromised oracle admin key can put user funds at risk, so each market's oracle admin matters. The oracle governance section lists those powers.

Disabled backstop

The backstop cannot take interest, pay rewards or absorb a loss, and no reachable market path asks it for money. This removes the code paths, token exposure and auctions that a working backstop would need. The contract is still deployed because a market needs it to activate, and its balance can still affect market status. See The disabled backstop.

Disabled flash loans

flash_loan always fails, so a market's reserves cannot fund a same-transaction loan. This removes that entrypoint and its interactions from the contract's attack surface. It does not stop an attacker from borrowing elsewhere.

Monitoring

Precept uses three tools to watch its live markets. They detect and report problems. They do not prevent a loss, and an alert does not change a market by itself.

Hypernative coverage is live. The risk dashboard and the curator alert channel are pending. The dashboard link and other details are forthcoming, and this section will be updated.

Hypernative

Hypernative is a third-party threat detection platform. It watches each official market for:

  • exploit signals
  • oracle staleness and divergence between price sources
  • reserve health
  • admin actions

Alerts go to Templar's on-call team and to the market's curator.

Risk dashboard

The risk dashboard will show each market's utilization, positions and liquidations. Anyone will be able to read it without a wallet. The link is forthcoming.

Telegram channel for curators

Curators of official markets will receive alerts in a dedicated Telegram channel, and only they will be able to join it. To request access, a curator can contact support. Lenders and borrowers should use the risk dashboard. Templar will never ask for your seed phrase or private key in Telegram.

What monitoring does not do

  • It does not act on a market. After an alert, the market admin decides whether to change a market's status. The admin cannot upgrade a market or change a live reserve's parameters.
  • It does not watch your position. Check your own health factor. See Borrowing.
  • It does not replace the contract checks. The market's own price rules still apply.

Reproducing a release build

Releases are published on the releases page with the four WASM artifacts (pool.wasm, backstop.wasm, pool_factory.wasm, pool_oracle_adapter.wasm) and a SHA256SUMS file. Every published artifact can be rebuilt from the tagged source:

git clone https://github.com/Templar-Protocol/precept.git
cd precept
git checkout v0.1.1
make build
mkdir -p .bin
printf '#!/usr/bin/env bash\nexec "$@"\n' > .bin/pool-adapter-env
chmod +x .bin/pool-adapter-env
export PATH="$PWD/.bin:$PATH"
cd pool-oracle-adapter && just preflight && just optimize

make build uses the pinned toolchain in rust-toolchain.toml; the optimized pool, backstop and factory land in target/wasm32v1-none/optimized/. just preflight is the adapter's own toolchain gate: it requires exactly Stellar CLI 28.1.0 and Rust 1.98.0, and just optimize does not run it, so skipping it can produce adapter WASM from a different toolchain whose checksum will not match. The adapter's optimized file is written to pool-oracle-adapter/target/wasm32v1-none/release-soroban-checked/pool_oracle_adapter.optimized.wasm; rename it to pool_oracle_adapter.wasm before hashing, as the release workflow does, and compare all four files against the release's SHA256SUMS. The just recipes run through a pool-adapter-env wrapper that must be on PATH; the four lines above create it locally as the same exec "$@" shim CI uses, and in CI it is created by the release workflow (.github/workflows/release.yml). That workflow rebuilds the optimized WASMs from the tagged source and fails if any rebuilt file's checksum differs from the SHA256SUMS attached to the release.

To run the contract suite and the differential test harness yourself, see Getting started in the repository README.

Formal verification and fuzzing

The market carries machine-checked proof harnesses, and they run in CI:

  • Kani proofs: bounded model checking over the market's arithmetic and state transitions.
  • Certora runs: rule- and summary-based checks against the contract model.
  • Verus theorems: the pure kernel, proven in Rust.
  • Fuzzing: mutation fuzzing through the full market test fixture, with reviewed seeds replayed deterministically. The scheduled full campaign fuzzes for one hour. When totals fit i128, it checks that the floor-rounded value of supplier claims plus credit strictly exceeds the ceil-rounded value of debt. It is not a cash-aware solvency proof.
  • VERIFICATION.md: the proof surface, what each harness covers, and how to run them.

Reporting a vulnerability

Report security issues to security@templarprotocol.com. Please give enough detail to reproduce the behaviour (the contract address, the entrypoint, and the sequence of calls), and allow time for a fix before disclosing publicly.

Guardian announced a one-month bug bounty for Precept. The post gives the dates and terms.

results matching ""

    No results matching ""