Sec Web3 Soroban
ASecuritySecurity checklist for Stellar Soroban smart contracts (Rust + soroban-sdk). Triggers when Cargo.toml depends on soroban-sdk, or when writing/auditing Soroban contracts under contracts/: require_auth and the auth tree (signed entries, implicit invoker auth, sub-invocations), __check_auth custom accounts and smart wallets (rules, policies, passkeys, delegated signers), constructors, upgrades and executable references, factories and salts, Instance/Persistent/Temporary storage and TTL, i128/I25...
- 3 stars
- 0 votes
- 0 copies
- 0 views
- Added December 4, 2026
Works with
Security analysis
100/100Pro scans all 20 files and shows the line behind each finding
npx -y skills add 57blocks/security-plugin --skill sec-web3-soroban --agent claude-codeAre you the author of Sec Web3 Soroban?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/57blocks-sec-web3-soroban-security-plugin)---
name: "sec-web3-soroban"
description: "Security checklist for Stellar Soroban smart contracts (Rust + soroban-sdk). Triggers when Cargo.toml depends on soroban-sdk, or when writing/auditing Soroban contracts under contracts/: require_auth and the auth tree (signed entries, implicit invoker auth, sub-invocations), __check_auth custom accounts and smart wallets (rules, policies, passkeys, delegated signers), constructors, upgrades and executable references, factories and salts, Instance/Persistent/Temporary storage and TTL, i128/I256 and fixed-point math, ledger time, resource and footprint limits, cross-contract calls, SEP-41/SAC tokens and the classic asset layer (issuer flags, clawback, muxed addresses), Reflector/SEP-40 oracles, BN254/BLS12-381/Poseidon and ZK verifiers, plus Soroban protocol pages (lending, AMM, oracle, vault, bridge, smart wallet, governance, RWA)."
---
# sec-web3-soroban · Stellar Soroban contract security
## Scope
Writing and auditing Stellar smart contracts built on `soroban-sdk` (`#![no_std]` Rust -> `wasm32v1-none`). How to detect: `[dependencies]` in `Cargo.toml` contains `soroban-sdk`, or the source contains `#[contract]` / `#[contractimpl]`.
## Read first
- **Read `sec-web3-common` first** (chain-agnostic items W3-xx and protocol pages). This pack covers only Soroban-specific parts and does not repeat general items.
- Severity follows [severity.md](../sec-core/severity.md); P0/P1 must give `file:line` + exploit path + impact.
- Note the `soroban-sdk` version (`Cargo.lock`) and the network protocol version before reading items: several behaviours changed across SDK 22/23/25/28 and protocols 22–30, and items say which version they apply to.
- Pre-audit readiness (invariants, STRIDE, fuzzing, formal verification, Audit Bank): [refs/pre-audit-readiness.md](refs/pre-audit-readiness.md)
- Full PoC templates: [refs/poc-guide.md](refs/poc-guide.md)
## Attacker model and platform guarantees
**Assume the attacker controls**: all entry function arguments (including any `Address`, `Vec`, `Map`, `MuxedAddress`); transaction ordering and timing within what validators allow; every account except those that must sign; **any signed authorization entry it has seen** (an entry is not bound to the transaction and can be submitted inside the attacker's own contract call, SOR-49); deploying malicious contracts with the same interface, including custom accounts whose `__check_auth` runs attacker code (SOR-50); shaping on-chain state (creating many entries, **extending the TTL of any entry**, since `ExtendFootprintTTLOp` needs no contract authorization, and changing state so a victim's footprint or budget no longer fits, SOR-76).
**Already excluded by the platform — do not report**:
| Do not report | Reason | But still check |
|---|---|---|
| Classic reentrancy | The host rejects a call into a contract that is already on the call stack | The one allowed re-entry: a contract's `__check_auth` re-entered by its own `current_contract_address().require_auth()`, after the host saves the outer frame's instance storage (SOR-59). `require_auth` on a contract address runs that account's code mid-function (SOR-50). Callees can still panic, burn the budget, emit fake events, and call other contracts not on the stack |
| `delegatecall` / proxy hijacking / storage slot collisions | There is no `delegatecall`; a contract cannot execute external bytecode in its own context | The upgrade entry point (SOR-12) and executable references, where an owner contract controls other contracts' code (SOR-66) |
| Same-address signature replay (standard `require_auth` flow) | The host enforces a per-address nonce and an expiration ledger | Signed entries are bearer instruments matched at any frame (SOR-49); legacy credentials do not include the address, so accounts sharing a key can replay each other's entries (SOR-55); hand-written signature verification (SOR-09); intermediate-layer replay (SOR-03) |
| `tx.origin` / `msg.sender` misuse | Does not exist; caller identity must be passed explicitly as an `Address` and `require_auth`'d | Authenticating the wrong address (SOR-02); the direct invoker and the transaction source account are authorized implicitly (SOR-51, SOR-54) |
| Partial state writes | A transaction is atomic: panic / `Err` / budget exhaustion rolls back all writes, including nested calls | Swallowing callee errors with `try_*` and continuing (SOR-32); in-memory copies never written back (SOR-70) |
| Uninitialized `#[contract]` struct fields | Struct fields are never persisted; state lives only in `env.storage()` | Writing state into the struct and assuming it is saved (logic bug) |
| Gas griefing, gas-price or 63/64 tricks | Soroban has no gas: resources are declared at simulation and metered against network limits | Resource and footprint limits (SOR-34, SOR-75, SOR-76) |
**`require_auth()` is optional** - forgetting to call it, or calling it on the wrong address, is the main source of Soroban vulnerabilities.
### Noise reduction: do not report these as findings (unless there is a concrete exploit path)
- "Re-initialization or reset after archival" on **persistent or instance** entries: an archived entry is restored with its old value (automatically when it is on the restore list since protocol 23) and never reaches the contract as missing. Only temporary entries, and entries removed with `remove`, really disappear (SOR-23).
- A bare `panic!`/`unwrap` that rolls the whole transaction back: at most P3 (SOR-31), unless it blocks other users' critical flows (SOR-36) or is swallowed by `try_*` (SOR-32).
- EVM-style reentrancy, gas griefing, `delegatecall` or `tx.origin` findings (see the table above).
- Front-running stated as "the attacker watches the mempool": Stellar has no public mempool. A front-running finding must name its assumption (a validator orders transactions, the victim's signed entry is exposed off-chain, or the attacker lands several transactions in the same ledger) and is rated with that assumption.
- Network limits quoted as fixed numbers (entry size, instruction limit, event size) without checking `stellar network settings`.
Owner-only actions are not noise: return each one as a candidate, one per power; Step 4 rates it under the centralization rule in severity.md.
---
## Checklist
The 89 items live in `refs/items-*.md`, so a task reads only the part it needs. This index gives each item's ID, title and default level. Items are numbered in the order they were added, so related items can sit in different number ranges; use the file names below.
- Writing or changing code, or `sec-check`: read the files covering what the change touches.
- Full audit: sec-audit assigns item IDs to each perspective (see "Audit perspectives"); read only those items.
- Looking up one item: open the file named here and read from its `### SOR-NN` heading to the next `###` heading.
**[refs/items-auth.md](refs/items-auth.md)**
- SOR-01 Privileged or debiting function missing `require_auth` · default P0
- SOR-02 Authenticating the wrong address (admin passed in by the caller) · default P0
- SOR-03 Intermediate layer/router does not re-authenticate, so a pre-signed authorization is consumed by someone else (auth replay through middleware) · default P0
- SOR-04 Incomplete arguments bound by `require_auth_for_args` · default P1
- SOR-05 `from` in `transfer_from` can be chosen by any caller · default P0
- SOR-09 Hand-written signature verification without domain separation and replay protection · default P0
- SOR-10 Overly broad `authorize_as_current_contract` scope · default P1
- SOR-49 Signed auth entry used as a bearer instrument: nested in an attacker's call, sandwiched in one transaction, not revocable · default P1 (P0 when the signed call moves funds with no bound on price, amount or recipient)
- SOR-50 `require_auth` on a contract address runs that contract's `__check_auth` (an external call) between reading and using state · default P2 (P1 when state read before the auth is used after it for pricing or accounting)
- SOR-51 Implicit auth of the direct caller satisfies a delegated signer, policy or self/mutual delegation without any key · default P0
- SOR-52 Auth-tree overreach: user-chosen or upgradeable contracts under a user-signed root add their own `user.require_auth` calls · default P1 (routers, aggregators, wallets-as-contracts; P2 when every contract on the path is allow-listed and immutable)
- SOR-53 Nested authorization that cannot be satisfied in practice (live-state args, duplicate auth in one frame, child init under a factory) · default P2 (P1 when it blocks liquidation, repayment or withdrawal)
- SOR-54 Transaction-source credentials turn a fee sponsor, relayer or channel account into a confused deputy · default P1 (P0 when the sponsor account holds funds or protocol roles)
- SOR-55 Cross-account replay of a signed entry between accounts sharing a key · default P2 (P1 when a factory deploys many wallets with one signer and the protected args omit the account)
- SOR-56 Residual allowance or pre-authorization left live across a call to an arbitrary target · default P1
- SOR-57 Forced callback: flash loan or pay-and-call pushes funds to an unauthenticated receiver and triggers its hook · default P2 (P1 when the callback target can be a protocol component or another user's contract that holds funds)
**[refs/items-accounts.md](refs/items-accounts.md)**
- SOR-06 `__check_auth` does not verify `signature_payload` · default P0
- SOR-07 `__check_auth` ignores `auth_contexts` or its policy can be bypassed · default P1
- SOR-08 CAP-71 delegated signers not validated · default P0
- SOR-58 `__check_auth` trusts unsigned fields of its `signatures` argument (rule ids, signer lists, verifier addresses, deadlines) · default P1 (P0 when the downgrade moves funds without the required signatures)
- SOR-59 Smart-account self-reentry: `__check_auth` runs inside the account's own half-executed function · default P0 (wallets that mutate before self-auth; P2 for instance writes in `__check_auth` that rely on pre-protocol-25 behaviour)
- SOR-60 Signer identities not canonicalized or deduplicated; malleable verification · default P1 (P0 when aliasing meets a multisig threshold)
- SOR-61 Rule, signer and policy lifecycle breaks account invariants · default P1
- SOR-62 Policy semantics: allow-by-default function names, wrong `args` indices, missed deployment contexts, per-call caps, zero-amount paths · default P1
- SOR-63 WebAuthn / passkey verification gaps · default P1
**[refs/items-lifecycle.md](refs/items-lifecycle.md)**
- SOR-11 `initialize` can be front-run or called repeatedly · default P0
- SOR-12 Unprotected upgrade entry point (`update_current_contract` / `update_current_contract_wasm`) · default P0
- SOR-13 Incompatible storage schema after upgrade / migrate can run repeatedly · default P1
- SOR-14 Upgrade loses upgradeability or does not pin the WASM source · default P2
- SOR-15 Single-step admin transfer, new admin does not sign · default P2
- SOR-16 Over-concentrated admin privileges, no timelock / no emergency switch · default P2
- SOR-17 `pause` / `unpause` without authentication or not covering critical entry points · default P1
- SOR-64 Factory salt is predictable or can be squatted; pre-deployed SAC traps a critical flow · default P2 (P1 when the squatter fixes admin, fee or oracle of the instance others will use)
- SOR-65 Factory deploys from a caller-supplied WASM hash, or "deployed by our factory" is trusted without checking · default P1 (P0 when other contracts grant privileges to factory-deployed instances)
- SOR-66 Executable references (CAP-85): the owner contract holds the code of every contract using its tag; tag keys can collide with caller-supplied storage keys · default P1 (P0 when an attacker can write the owner's tag entry)
- SOR-67 Security macros do less than they appear to · default P1 (P2 when the guarded function moves no value)
- SOR-68 Inherent and trait functions with the same name in `#[contractimpl]`: the export calls the inherent one (GHSA-4chv) · default P0
- SOR-89 Role and membership lifecycle: no revoke path, revoked roles still pass, counters moved by no-op toggles · default P1 (P0 when a revoked or unrevokable role can move funds, mint or upgrade)
**[refs/items-storage.md](refs/items-storage.md)**
- SOR-18 Critical state in Temporary storage · default P0
- SOR-19 Unbounded or per-user-growing data in Instance storage · default P1
- SOR-20 A single persistent entry holding an unbounded collection · default P1
- SOR-21 Treating TTL expiry as a security mechanism · default P1
- SOR-22 Critical entries never extended or ineffective extension parameters · default P2
- SOR-23 Wrong default-value semantics when reading a missing entry · default P1
- SOR-24 Replay-protection / claimed markers in Temporary storage or deleted after use · default P1
- SOR-25 Storage key collisions or user-controlled keys · default P1
- SOR-26 Read-modify then re-read gets a stale value · default P2
- SOR-69 Logically coupled entries with different TTLs; overwrite keeps the old expiry · default P2 (P1 when the entry guards uniqueness, authorization or a nonce)
- SOR-70 Aliased copies and deferred write-back caches lose or overwrite updates · default P1 (P0 when a stale write-back resets debt, supply or a balance)
- SOR-71 `Map` semantics: sorted unique keys, no insertion order; `Symbol` limits · default P2 (P1 when it gates upgrades, auth or value)
- SOR-72 Decoding depends on the SDK version: since SDK 28 struct decoding is tolerant · default P2 (P1 when dropped fields hold balances or positions, or a missing field bypasses a check)
**[refs/items-math-time.md](refs/items-math-time.md)**
- SOR-27 Release profile missing `overflow-checks = true` · default P1
- SOR-28 Unchecked arithmetic and type truncation · default P1
- SOR-29 i128 amount not checked for non-negativity · default P0
- SOR-30 Precision loss, wrong rounding direction, `^` mistaken for exponentiation · default P1
- SOR-73 Ledger time semantics: shared timestamps, same-ledger caches, ledger-count vs wall clock · default P1 (P2 when only a display value or a non-financial window is affected)
- SOR-74 Fixed point and wide integers: wrapping bigints, signed division, misused floor/ceil · default P1
**[refs/items-calls-resources.md](refs/items-calls-resources.md)**
- SOR-31 `unwrap` / `expect` / `panic!` / `assert!` instead of typed errors · default P3
- SOR-32 `try_*` swallows the callee's error and execution continues · default P1
- SOR-33 Error codes renumbered on upgrade · default P3
- SOR-34 Unbounded iteration over user-growable collections · default P1
- SOR-35 `Vec` / `Map` inputs stored without per-element validation · default P2
- SOR-36 External dependency failure blocks critical flows (push payments) · default P1
- SOR-37 Calling an arbitrary user-supplied contract address · default P1
- SOR-38 Trusting cross-contract return values · default P1
- SOR-75 Resource limits beyond loops: entry, event and transaction size, memory, crypto cost, positions per user · default P1
- SOR-76 Resource and footprint griefing: attacker state changes invalidate the victim's footprint or budget · default P2 (P1 for liquidations, keepers and time-critical settlement)
- SOR-77 Cross-contract interface drift: hand-written client traits and typed `invoke_contract::<T>` · default P1 (P2 when only a view breaks)
**[refs/items-tokens.md](refs/items-tokens.md)**
- SOR-39 Not reconciling against the amount actually received (non-standard / fee-on-transfer tokens) · default P1
- SOR-40 Stellar Asset Contract (SAC) properties not handled · default P2
- SOR-41 Decimals not normalized: assuming 7, or comparing two tokens' amounts or prices without scaling (oracle valuation, slippage and price limits, invariants) · default P1
- SOR-42 Self-implemented SEP-41 token: allowance expiry, approve race, interface deviations · default P1
- SOR-43 Missing caller constraints such as slippage and deadline (check-then-act) · default P1
- SOR-78 SAC `balance()` is not the spendable amount; issuer balance is `i64::MAX`; XLM to a new G-address needs the minimum balance · default P2 (P1 when used in liquidation, payout sweeps or solvency checks)
- SOR-79 Issuer keeps residual powers: not fully locked, SAC admin handover order, validator freeze · default P2 (P1 when the protocol's trust model says supply is fixed or the admin is a contract)
- SOR-80 Muxed addresses and memos: mux id lost, memo not bound by auth, muxed contract addresses · default P2
- SOR-81 Address kind and asset identity confusion: G vs C, `exists()` vs `executable()`, 32-byte encodings, asset by code · default P2 (P1 when it gates funds, remote authorization or collateral listing)
**[refs/items-oracle-misc.md](refs/items-oracle-misc.md)**
- SOR-44 Value-relevant randomness from `env.prng()` or ledger data · default P1
- SOR-45 Oracle price freshness, precision, and source not validated · default P1 (P2 for inconsistent provider partial-update semantics)
- SOR-46 Critical state changes emit no events or wrongly formatted events · default P2
- SOR-47 Dependency and imported contract versions not pinned · default P2
- SOR-48 `unsafe` blocks and `core::mem::forget` · default P3
- SOR-82 Thin-liquidity collateral priced from SDEX or Reflector with no cap, deviation guard or circuit breaker · default P1 (P0 when the asset is listed and borrowable, or anyone can list it)
**[refs/items-crypto-zk.md](refs/items-crypto-zk.md)**
- SOR-83 BN254 / BLS12-381 field and point validation: unreduced `Fr`, unchecked points · default P1 (P0 when the comparison or point gates nullifiers, authorization or minting)
- SOR-84 ZK verifier contracts: statement not checked, replay, curve/system mismatch, non-ZK proofs, setup · default P0 (P1 when the proof gates no funds or identity)
- SOR-85 Poseidon / Poseidon2: parameters, padding, domain separation, V1 collision · default P1 (P0 when the hash defines nullifiers or Merkle leaves that release funds)
- SOR-86 Non-injective message or hash encoding · default P1 (P0 when the collision mints or releases funds)
- SOR-87 Hand-written signature checks: algorithm choice and host API semantics · default P2 (P1 when it decides who can move funds)
- SOR-88 Inbound cross-chain or pre-approved messages rejected with no recovery path · default P2 (P1 when the message carries funds)
## Protocol pages
Soroban implementation details per protocol type. Chain-agnostic principles stay in the matching sec-web3-common page; read both when the project is of that type.
| Type | Page |
|---|---|
| Lending, CDP, backstop and auctions | [refs/proto-lending.md](refs/proto-lending.md) |
| AMM, router, aggregator, staking satellites | [refs/proto-amm.md](refs/proto-amm.md) |
| Oracle provider or consumer (SEP-40, Reflector) | [refs/proto-oracle.md](refs/proto-oracle.md) |
| Vault and yield strategies | [refs/proto-vault.md](refs/proto-vault.md) |
| Bridge, GMP and token service endpoints | [refs/proto-bridge.md](refs/proto-bridge.md) |
| Smart wallet, smart account, fee abstraction and relayers | [refs/proto-smart-wallet.md](refs/proto-smart-wallet.md) |
| Governance, timelock and DAO | [refs/proto-governance.md](refs/proto-governance.md) |
| Regulated assets and RWA (SEP-8, compliance tokens) | [refs/proto-rwa.md](refs/proto-rwa.md) |
## PoC guide (soroban-sdk testutils)
Full templates in [refs/poc-guide.md](refs/poc-guide.md). Key points:
1. In `src/test.rs` (`#![cfg(test)]`) use `Env::default()` + `env.register(Contract, (args,))` + the generated `ContractClient`. `Env::default()` applies the network's CPU/memory limits (SDK 25+), so CPU and memory DoS PoCs reproduce directly. **Footprints are not enforced in unit tests**: footprint and restore-list attacks (SOR-76) are argued from code and `env.cost_estimate().resources()`, or shown on a local network.
2. **`mock_all_auths()` hides authorization bugs**: it allows any `require_auth` on any address. Rules:
- To prove "authorization is missing": **do not mock any authorization**; call `try_xxx` as the attacker, and if it returns `Ok` the vulnerability is confirmed.
- To prove "the authorized party is correct": **immediately** after the call, assert that `env.auths()` (keeps only the most recent call) equals the expected `(Address, AuthorizedInvocation)` tree.
- Exact authorization: `env.mock_auths(&[MockAuth { .. }])` approves only the specified call (enforcing mode, so non-root matching is exercised: SOR-49 can be shown by calling the signed function from an `Evil` contract).
- Real signatures: `env.set_auths(&[SorobanAuthorizationEntry])` with entries signed in the test, for custom accounts (SOR-58..63) and cross-account replay (SOR-55).
- Needing `mock_all_auths_allowing_non_root_auth()` to make it pass -> check SOR-03.
3. Time/TTL: `env.ledger().set_sequence_number(..)` / `set_timestamp(..)` (they move independently, so same-timestamp ledgers can be tested, SOR-73); read TTL with `env.as_contract(&id, || env.storage().persistent().get_ttl(&key))`.
4. Tokens: `env.register_stellar_asset_contract_v2(issuer)` gives a real SAC, so clawback / `set_authorized` / issuer balance (`i64::MAX`) can be tested.
5. Malicious external contracts: define a same-interface `#[contract] struct Evil` in tests and `env.register(Evil, ())`; a custom account `Evil` whose `__check_auth` calls other contracts shows SOR-50.
6. Resources: read consumption with `env.cost_estimate().resources()`; assert that inputs exceeding the limits fail.
7. Assert **impact** (balance changes, admin replaced), not just "the call succeeded". P0/P1 reports attach the test function name and `cargo test <name>` output. After the fix the exploit test fails and a `test_fixed_*` test (same steps, asserting the failure or an unprofitable outcome) passes.
8. Build with the toolchain the project pins (`rust-toolchain.toml`); from SDK 28 build contracts with `stellar contract build` (stellar-cli 25.2+), because plain `cargo build --target wasm32v1-none` stops with an error.
## Audit perspectives
A full Soroban audit runs the perspectives of sec-web3-common with the Soroban items below added, and two method lenses. Perspective 5 (sibling-function diff) of sec-web3-common runs inside lens 6, so the audit uses six sub-agents: 1, 2, 3, 4, lens 6, lens 7. Scout runs once in Step 2 (`security-audit/raw/scout.json`, per sec-core tools.yaml); hand each perspective the detector results for its items instead of running it again.
| Perspective | Soroban items added |
|---|---|
| 1. Permissions (sec-web3-common) | SOR-11, SOR-15, SOR-16, SOR-17, SOR-64, SOR-65, SOR-66, SOR-67, SOR-68, SOR-89 |
| 2. Funds flow (sec-web3-common) | SOR-29, SOR-36, SOR-39, SOR-40, SOR-41, SOR-42, SOR-43, SOR-56, SOR-57, SOR-78, SOR-79, SOR-80, SOR-81, SOR-88 |
| 3. Oracle and price (sec-web3-common) | SOR-44, SOR-45, SOR-73, SOR-82 |
| 4. State and upgrade (sec-web3-common) | SOR-12, SOR-13, SOR-14, SOR-31, SOR-32, SOR-33, SOR-34, SOR-35, SOR-37, SOR-38, SOR-46, SOR-47, SOR-48, SOR-75, SOR-76, SOR-77, SOR-83, SOR-84, SOR-85, SOR-86, SOR-87 |
| 6. Authorization tree (lens; includes sec-web3-common perspective 5) | SOR-01..10, SOR-49..55, SOR-58..63, plus W3-02, W3-24, W3-66, W3-86 |
| 7. Storage lifecycle and precision (lens) | SOR-18..28, SOR-30, SOR-69..72, SOR-74, plus W3-17~21, W3-69, W3-92, W3-95 |
The W3 items named for a lens are reviewed by that lens only: leave them out of the sec-web3-common perspective lists for this audit, so no item is assigned twice.
**Lens 6, authorization tree** ([method-auth-tree.md](refs/method-auth-tree.md)). For every entry function build the table: `Address` arguments × whose authority is consumed × which address is authenticated (argument or storage) × `require_auth` / `require_auth_for_args` and the bound arguments × downstream calls that need someone's auth (token transfers, sub-invocations, `authorize_as_current_contract` entries) × implicit authorization (direct invoker, transaction source account). Compare guards across functions of the same privilege level and across sibling functions (deposit/withdraw, set/remove, submit/flash). For custom accounts add: what `signature_payload` covers, every field of the signature argument that is not covered, every context type, the signer and policy lifecycle. Output the auth table and the sibling-function diff.
**Lens 7, storage lifecycle and precision** ([method-storage-lifecycle.md](refs/method-storage-lifecycle.md)). For every storage key: type (instance/persistent/temporary), who writes it, growth (fixed, per user, unbounded), TTL policy, what happens when it is archived or expires, which keys must live and die together, and every place a copy is loaded, changed and written back. Then the arithmetic: units and decimals of each amount, rounding direction of each division, i128 sign handling, wide-int and fixed-point helpers, ledger time and sequence use. Output the storage table, the rounding table and boundary counterexamples.
Both outputs go into the funds/accounting write table appendix. Seams between lenses (an auth gap with an economic payoff, a TTL desync that breaks an invariant, a cross-contract call that fails a shared loop) are given to the Step 3b wildcard hunt.
After the perspectives return and before Step 4, run [method-invariant-fuzz.md](refs/method-invariant-fuzz.md) on the value-moving contracts (at most 30 minutes). In live mode, contracts are checked against a ledger snapshot per [method-snapshot-fork.md](refs/method-snapshot-fork.md), including the deployed WASM hash.
## Self-check process
1. Build with the pinned toolchain, run `cargo test`, then Scout (`cargo scout-audit --output-format json --output-path security-audit/raw/scout.json`) if Step 2 has not; confirm each detector result manually.
2. Record `soroban-sdk` version and protocol version; check SOR-47's advisory table against `Cargo.lock`.
3. Walk through the perspectives above, then cross-check the item files that match what the code uses (custom accounts, factories, SAC/classic assets, oracles, ZK/crypto host functions) and the matching protocol page.
4. For every cross-contract call: where the address comes from, what interface and return type it assumes (SOR-77), whether a failure can be caught (SOR-32), and whether the callee or a custom account can run attacker code (SOR-37, SOR-50).
5. Write PoCs for P0/P1 as above; add property tests for value-moving contracts ([method-invariant-fuzz.md](refs/method-invariant-fuzz.md)).
6. Report the source commit and the SHA-256 of each built WASM; when contract IDs are given, compare them with the deployed WASM ([method-snapshot-fork.md](refs/method-snapshot-fork.md)).
## Further reading
- Stellar contract security: https://developers.stellar.org/docs/build/security-docs
- Stellar authorization model: https://developers.stellar.org/docs/learn/fundamentals/contract-development/authorization
- Scout Soroban detectors: https://coinfabrik.github.io/scout-audit/docs/intro
- OpenZeppelin Stellar Contracts: https://docs.openzeppelin.com/stellar-contracts
- Certora, "Your Roadmap to a Soroban Security Audit": https://www.certora.com/blog/roadmap-to-a-soroban-security-audit
- Veridise, "Soroban Security Checklist: Prepare for Your Audit": https://veridise.com/blog/audit-insights/building-on-stellar-soroban-grab-this-security-checklist-to-avoid-vulnerabilities/
- Stellar Security Portal (formerly sorobansecurity.com, audit reports and vulnerability database): https://stellarsecurityportal.com/
- SEP-41 Token Interface: https://stellar.org/protocol/sep-41
Files in this skill
- README.md
- SKILL.md
- refs/items-accounts.md
- refs/items-auth.md
- refs/items-calls-resources.md
- refs/items-crypto-zk.md
- refs/items-lifecycle.md
- refs/items-math-time.md
- refs/items-oracle-misc.md
- refs/items-storage.md
- refs/items-tokens.md
- refs/method-auth-tree.md
- refs/method-invariant-fuzz.md
- refs/method-snapshot-fork.md
- refs/method-storage-lifecycle.md
- refs/poc-guide.md
- refs/pre-audit-readiness.md
- refs/proto-amm.md
- refs/proto-bridge.md
- refs/proto-governance.md
Attribution
Related skills
View all in security →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.