The program is deployed and its bytecode is hash-verifiable. Reproduce the hash with: fetch the ProgramData account, slice data[45 .. 45 + <local ELF size>] (offset 45 skips the BPF upgradeable metadata header), and compare to sha256sum program/target/deploy/clock_lend.so.
| Field | Value | How to verify |
|---|---|---|
| Program ID | 4Dp2A6SHQHEpuoMT4GuzZnnpLcDYrJnpELm1UjuNHgv7 | Solscan |
| Cluster | Solana Mainnet-beta (genesis 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d) | getGenesisHash |
| ProgramData | 9ikmDTbbRhtgYKjRhcnzCK9RpPWQ8uTYUeNJ16kWMLSG | solana program show |
| Allocated bytes | 357,517 (ELF is 357,472; the remainder is retained zero padding) | ProgramData account length |
| Deploy slot | 451,589,196 | ProgramData slot field |
| Upgrade authority | 8YvdDpWVAxpuyDHw3tpUheq99vgtakFELdqezykYosds | ProgramData authority field |
| Bytecode sha256 | 019da88bc97498b127ddbaa76468ff8ad86c5094ae46045f7f9a9127b3c1dbdb | Matches the local build artifact |
| Upgradeable? | Yes — the deployer key can replace the program | ProgramData Option flag = 1 |
Note the last row: the program is upgradeable, not immutable. A "fully trustless, immutable contract" is not what is deployed today. The upgrade authority is a single team-held key; it is not a multisig and is not timelocked.
| Fix | Status | Evidence |
|---|---|---|
| let-bound unpack (AccountBorrowFailed) | PRESENT | processor.rs:868-881, 2330-2334 |
| oracle-omit bypass closed | PRESENT | processor.rs:1300-1316 |
| admin-feed decimals cross-check | PRESENT | processor.rs:1319-1322 + P2P twin |
| InitializePool USDC allowlist | PRESENT | processor.rs:436-437 |
| hex32! length assert | PRESENT | pyth.rs:50-60 |
| Mobile: quorum-aware Pyth attach, blockhash ordering, exact-amount reads, raw-string fields, honest state | PRESENT | verified at each site by the mobile agent |
vault.total_staked_skr is only ever mutated inside process_claim_skr_yield, from profile.staked_skr + locked_skr. process_unstake_skr returns the SKR to the user and never touches the yield vault, and the claim path's no-profile branch keeps earning on the cached position.staked_skr. Exploit: stake X → ClaimSkrYield (registers X shares) → UnstakeSKR (SKR back, shares remain) → repeat with N fresh accounts re-staking the same X → N·X shares against X real escrowed SKR. On the next dividend the attacker's positions claim ~all of it (payout is first-come, capped by the vault token balance); honest stakers receive 0 and their accrued_rewards is silently written off. Cost to the attacker: transaction fees only.
spl_token::state::Account::unpack(&skr_escrow...)) instead of the cached counter — or at minimum decrement vault.total_staked_skr in process_unstake_skr (and the ClaimDefault slash path) and make the profile account mandatory on the claim path.create_or_allocate_pda returns Ok when the account is already program-owned, and there is no is_initialized read anywhere in the handler — so a second call unconditionally packs a fresh zeroed vault: acc_reward_per_share = 0, total_staked_skr = 0, pending_rewards = 0, authority = caller. The PDA is derived from reward_mint only, so any wallet can call it. Consequences: every user's stored reward_debt now exceeds staked·acc/1e12 → all accrued rewards compute to 0 (stranded), and with total_staked_skr == 0 all subsequent deposits stop updating acc → permanently unclaimable dividends. This is repeatable sabotage, and it also lets anyone race the team for first-call ownership of the vault (the authority field is currently read nowhere, but any future consumer inherits the hole).
if existing.is_initialized { return Err(...) }, and gate first init on the AdminConfig admin (same pattern as WithdrawTreasury).The script's only check is fs.existsSync(soPath) — it never builds and never compares freshness. The artifact on disk (300,104 bytes, md5 189a61df, mtime 2026-09-23 09:30) predates both the round-8 commit (09:46) and the yield sources — all five program/src/*.rs files are newer. Running the runbook command today write-buffers and upgrades that old ELF, prints "MAINNET BOOTSTRAP COMPLETE", and ships a program without the Pyth Full-verification hardening, the ±staleness bounds, the allowlists, or the yield feature.
cargo build-sbf (or hard-fail without --skip-build); fail if any program/src/** file or program/Cargo.lock is newer than the .so; print md5 + size before upload.buildClaimSkrYieldTx has zero callers; there are no buildInitializeSkrYieldVaultTx / buildDepositSkrYieldTx builders at all; no UI screen wires it; and buildBorrowTx never appends the two yield-vault PDAs, so the program's 50/50 origination-fee split never fires from the app — the vault can never be funded in production. The deployed program (devnet) predates tags 15–17, so a claim would revert with invalid-instruction-data even if wired. ✔ VERIFIED — grep: zero callers
CLK_SYLD read) or cut the dead code until the upgrade lands. Don't ship a live-looking claim path against an un-upgraded program.Accrual is purely by acc_reward_per_share snapshot; last_interaction_time is recorded but never enforced. Both deposit triggers (permissionless DepositSkrYield and the borrow-path fee split) are observable before they land, so an attacker can stake in slot N, register shares, let the dividend land in N+1, claim pro-rata, and unstake in N+2 — capital returned, zero holding risk, disproportionate payout. ✔ VERIFIED in source — no time check on the claim path
last_acc_update), or a minimum stake age before claimability.Only assert_signer — no vault-authority/treasury/admin check, so anyone can push rewards at any time and thereby control exactly when acc moves (who gets entitled), or interleave dust deposits to shift rounding. Init accepts any reward_mint pubkey. ✔ VERIFIED in source
vault.authority (with a rotation path proving upgrade authority), allowlist reward_mint to {USDC devnet/mainnet, SKR}. If the drip is meant to be permissionless, add epoch pacing so it can't control accrual timing.solHolding = tokenList.find(symbol === 'SOL') is always undefined — tokenList comes from getParsedTokenAccountsByOwner, which never contains native SOL — so 150.0 is always used. That flows into the on-chain collateral amount: the tx reverts InvalidCollateralRatio when the price is above market and silently over-locks when below. Two hardcoded SOL prices coexist (150.0 here, 101.12 in livePrices). ✔ VERIFIED
livePrices.sol (already fetched every 120s); disable the borrow CTA with "price unavailable" when stale rather than substituting a constant.Live devnet ProgramData holds a 299,937-byte ELF (md5 69577ae6…); the local artifact is 300,104 bytes (189a61df) and the ELFs differ at e_entry — different builds. The runbook recipe yields 1c4ac89d for live devnet vs 189a61df locally — a false mismatch — and no 600fba4a prefix is reproducible from anything on this box. The field churns each round (9bbcdc68 → 25b68ef2 → 600fba4a) without a recorded recipe. ✔ VERIFIED via live RPC by the ops agent
verify-devnet.sh that computes it; state which build the deployed ELF actually is.Observed ~30–50% failure rate across agents (4/12 for one, multiple runs for another), always left: 0 at :572/:581; also reproduces in isolation. An instrumented verbatim copy passed 3/3, so the mechanism is inconclusive — non-deterministic solana-program-test behavior, not a proven program error. Either way, cargo test is not a trustworthy deploy gate today. ✔ OBSERVED by two independent agents
Both allocation sites skip acc_reward_per_share when total_staked_skr == 0 but still credit pending_rewards — and claims pay only staked · acc / 1e12, which never includes that money. The first dividend (e.g. keeper deposits before any user syncs) is lost forever. On devnet this is 100% of routed revenue, because the SKR mint doesn't exist there. ✔ VERIFIED in source
unallocated_rewards field rolled into the next acc increase, or reject deposits while total_staked_skr == 0.pending_rewards and the vault token balance — over-claimers silently write off other users' accrued rewards (only payout = claimable.min(vault_tok.amount) stands in the way).setCachedOrders without the network arg (cross-network loan leakage when the toggle is used).NoYieldToClaim error is never returned (dead code); runbook has NO yield section; test count stale (88 vs 96); BorrowFromPool doc comment omits the two new optional accounts.authority field it records is currently unread — a trap for future handlers).checked_mul(...).unwrap_or(0) sites silently zero reward math instead of erroring — inconsistent with the deposit path's ok_or(AmountOverflow).test_skr_collateral_allowlist asserts a Rust constant and executes nothing.calculateTokenUsd lost its price-parameter type (prices: any).assemble/bundle task prefixes; FLAG_SECURE skipped on DEBUG builds.P0: C-1 escrow-derived stake (or decrement on unstake) · C-2 reinit guard + admin gate · C-3 build-sbf/freshness preflight · H-7 unallocated-rewards carry · H-2/H-3 deposit auth + time-weighting decision.
P1: H-1 wire the feature or cut it · H-4 live price · H-5 verify recipe · H-6 deterministic test · M-1..M-8.
P2: lows + runbook yield section + doc comments.
Product decisions needed from the user: ship the yield feature or cut it for now; rebuild the artifact before any deploy.
All P0/P1/P2 fixes from this report are implemented and verified. C-1: claim stake is now escrow-authoritative (skr_escrow account required, accrual bounded by the real balance, UnstakeSKR syncs positions down). C-2: vault init is admin-gated and reinit-rejected. C-3: the deploy script builds the ELF itself and hard-fails on a stale artifact (fresh build: 339,928 bytes, md5 308dbba1, not yet deployed). H-2/H-3/H-7: 1h claim cooldown (error 40), authority-gated deposits, unallocated_rewards folding so pre-stake dividends are never stranded. Mobile: yield client fully wired (init/deposit/claim builders, borrow fee-split append, unstake sync, on-chain-gated yield card), live prices replace the hardcoded $150, honest banners, strict collateral parsing, cache namespacing. Tests: 97/97, yield suite 6/6 consecutive runs green (flakiness root-caused: identical-(blockhash,message) memoization — every submission now advances a slot). Details: .superstack/build-context.md.
All P0 and P1 fixes implemented and verified across program, client, and scripts (101/101 tests green):
StakeSKR immediately registers yield shares and initializes UserYieldPosition if new, harvesting pre-stake pending and moving vault.total_staked_skr & position.staked_skr up synchronously. Attacker dividend capture test pinned.UnstakeSKR gates optional pool account strictly by discriminator/LEN to eliminate account 5/6 slot collisions. Clamps effective stake and post-unstake stake to escrow to eliminate ghost shares. ClaimDefault immediately syncs borrower yield position and vault total down on slash.AbortSignal.timeout with robust fetchWithTimeout (Hermes safe). Client tracks PriceSource and strictly disables borrowing when only fallback-baseline is available, showing "Awaiting Live Price Feed...".crank_oracles.mjs; dynamic rent exemption computed via getMinimumBalanceForRentExemption(soStat.size + 45) + 0.1 SOL in deploy-mainnet.mjs; build freshness narrowed to src/.InitializeAdmin rotates yield vault authority; SGT detection supports both devnet mint and mainnet group mint GT22s89nU4iWFkNXj1Bw6uYhJJWDRPpShHt4Bk8f99Te; loan scan RPC queries filter via B58_CLK_LOAN / dataSize.Adversarial cross-instruction hunt on the full contract + client. Invariant verdicts: conservation HOLDS (every lamport/token flow sums exactly, error paths included), auth matrix HOLDS (no aliasing/role-confusion path found), state machine violated in 2 places, oracle violated in 3. New highs: a borrower-supplied Pyth account overrides the pool's mandatory custom feed (2 independent PoCs — borrow ~77x the configured limit); the 1h cooldown is a payout-delay only (unstake harvests and frees capital in the same slot — the zero-risk snipe survives); the Pyth attach signs before the body instructions are appended (invalid signature once Hermes is enabled); the borrow UI hardcodes 7 days while offering 3/7/14/30; the devnet-smoke script inherits the MAINNET RPC from .env; and the Wormhole anchor is wrong (receiver Config.wormhole = 4uQeVzbXX…, proven via the SDK struct layout — HDwc and worm2 are both wrong, and the atomic posting path is unviable on mainnet). Fuzzer permanently extended with yield ops + 3 share/dividend invariants (9 seeds green). Full list + fixes: .superstack/build-context.md (round-11 section).
Post-round-12 verification found a critical introduced by the rescue instruction: inserting WithdrawUnusedYield before ClaimSkrYield shifted the borsh discriminants (Withdraw=17, Claim=18) while the mobile client still sends tag 17 — every dividend claim dispatched to the rescue handler and reverted. Fixed by reordering (Claim=17, Withdraw=18) and pinned forever by test_wire_tags_are_pinned (asserts the byte encoding of all 19 variants). Also fixed: Pyth receiver removed from the signing allowlist, the local order's 7-day hardcode, the missing stake-builder yield appends (round-10's share registration now fires from the app), builder network params, modal live prices, cooldown error 38, the rescue builder, and full runbook alignment incl. a 10-minute keeper workflow. 100/100 tests.
An independent, fresh-eyes pass over the deployed program produced the grades at the top of this page. Program security came back strong: no path was found by which an unprivileged account can steal funds. Three executable proof-of-concept bugs were found, and the ops tooling was judged not ready. Statuses below are current as of the date on this page — "Fixed in source, awaiting redeploy" means the fix is committed but is NOT yet in the on-chain bytecode.
| ID | Severity | Area | Finding | Status |
|---|---|---|---|---|
POC-1 |
High | Yield / fee routing | When the SKR yield-vault leg of the origination-fee split cannot pay (accounts present but unusable), the fee could be partially stranded instead of routing in full to the treasury. | Fixed in source, awaiting redeploy |
POC-2 |
High | P2P pawns | CreateP2POffer did not default the loan asset to the canonical mainnet USDC mint when no mint account was appended, letting a mainnet funder be handed an unfundable offer. |
Fixed in source, awaiting redeploy |
POC-3 |
High | Oracle-free pools | On oracle-free pools the borrower could price collateral above the hardcoded baseline using a live feed, rather than being capped at min(baseline, live). |
Fixed in source, awaiting redeploy |
OPS-1 |
Critical (ops) | Keeper automation | Price-feed automation was not reliable. At the time of writing both mainnet feeds are stale well past the 600s on-chain pricing limit (observed age ≈ 14,100s), so borrow and liquidation paths that read them revert. The Keeper workflow had also been pointed at a devnet RPC while using the mainnet program id, so it had never cranked a mainnet feed. | Open |
OPS-2 |
High (ops) | Key separation | Operator scripts allowed dangerous defaults: a burn path could burn more than it bought, an oracle rotation could silently fall back to a default local key path, and treasury withdrawal could default its destination to the admin hot wallet. | Mitigated in tooling; keys not yet rotated |
OPS-3 |
High (ops) | Treasury state | The treasury PDA (5buCUcCHHDCzQpanMKCK8uruErL5D2UzSFVrbtPrKV7y) has no account on chain at audit time — only its USDC ATA exists, with a 0 balance. No protocol fee has ever been collected, and fee-bearing instructions would fail until it is initialized. |
Open |
MOB-1 |
Medium | Mobile client | Mobile security graded D+ at audit time (hardcoded prices, fabricated yield/LST banners, inconsistent collateral parsing, cache namespacing gaps). | Remediation in progress |
The on-chain test suite is counted directly from the source rather than asserted: grep -c '#\[test\]\|#\[tokio::test\]' program/tests/*.rs sums to 103 test functions across bank_integration, functional, security_tests, fuzz_invariants, skr_yield_and_lst_tests and the round-14 zz_round14_poc regression file. A green count is a regression signal, not a security proof — the three POC items above were found with that suite green.
total_liquidity = 0 and loans_originated = 0; nothing has been borrowed or lent on mainnet..superstack/build-context.md. Deployment facts on this page were captured live from mainnet-beta RPC on 2026-09-29.