Security Architecture
Last Updated: September 29, 2026 · Native SBF Program4Dp2A6SHQHEpuoMT4GuzZnnpLcDYrJnpELm1UjuNHgv7
Responsible Vulnerability Disclosure
Bug Reports & Security InquiriesClockLend places security and capital preservation above all else. If you discover any potential security vulnerability, smart contract anomaly, economic attack vector, or unexpected edge case, please disclose it immediately to our official security contact on X (Twitter):
Audit status — read this before trusting any number above
14 internal AI-assisted audit rounds. The program is deployed and hash-verified on Solana
Mainnet-beta (4Dp2A6SHQHEpuoMT4GuzZnnpLcDYrJnpELm1UjuNHgv7). Remediation is
ongoing: round 14 found three executable proof-of-concept bugs and graded ops readiness
not ready. No third-party audit has been performed — there is no external auditor,
and no audit firm has reviewed this code. Full findings and their current status are in the
round-14 report.
1. Core Security Invariants
ClockLend is built directly in native Solana SBF Rust (solana-program v2.2.1) without heavy frameworks or macro abstractions. The entire settlement pipeline adheres to formal cryptographic invariants:
- Pure Integer Arithmetic (Float-Free): All interest calculations, LTV ratios, liquidation margins, and dividend distributions use 128-bit integer math with saturating additions and checked multiplications. Zero floating-point arithmetic guarantees 100% deterministic execution and immunity to IEEE-754 precision drift.
- Fail-Closed AccountKind Discriminators: Every on-chain account incorporates an explicit 8-byte discriminator verified before any instruction unpacks data, completely preventing cross-type confusion attacks.
- Isolated PDA Escrow Vaults: Collateral and principal never enter omnibus pools. Each loan and pawn offer derives unique Program Derived Addresses (PDAs) with cryptographically validated program authority seeds, preventing unauthorized fund drains.
- Anti-Frontrunning Pre-Creation Defense: Escrow and vault initialization instructions assert program ownership and strict zero-lamport initialization checks, preventing griefing attacks where malicious actors pre-fund PDAs.
- Fail-Closed Oracle Staleness Guard: Price feeds older than 600 seconds automatically halt borrow and liquidation operations, protecting users and liquidity providers from flash loan attacks and market dislocations. This guard is doing its job right now: at the time of writing the mainnet SOL and SKR feeds are stale, so borrows that read them revert until the keeper refreshes them (see the open ops finding in the round-14 report).
- 24-Hour Social Grace Window: Borrowers past due receive a 24-hour protection window where social peers or community members can rescue the debt before liquidation triggers, stopping automated liquidation bot cascades.
2. Protocol Revenue & Capital Distribution
ClockLend's monetization model is non-custodial on the lending side. Where revenue is distributed to token holders and reserves, note carefully who executes it — the split is enforced by the program, but the buyback is not:
- Staker Dividend Stream: When the SKR yield vault is initialized and appended to a borrow, the program routes a share of the origination fee (0.25% SOL / 0.50% USDC/SKR) into the
SkrYieldVaultat disbursement. If the vault token account is uninitialized or mismatched, the full fee routes to the treasury instead — the split is conditional, not guaranteed. Stakers claim proportional USDC dividends with a 1-hour anti-flash-loan harvest cooldown. As deployed, the mainnet yield vault is initialized but has never been funded. - Principal + 85% Interest for LPs: Lending desk owners maintain isolated custody over their funds. Upon loan repayment, 100% of the loan principal and 85% of accrued interest return to the desk vault PDA.
- 🔥 30% Protocol Revenue Buy & Burn: 30% of project revenue is committed to buying and burning $SKR (Jupiter DEX market buys plus direct SPL burns). This is a team-run buyback & burn program executed manually via
scripts/burn-skr.mjs— it is not an autonomous on-chain mechanism, and it depends on a human operator running the script and on the treasury actually holding funds. No buyback has been executed to date. - 70% Protocol Reserves: Kept in the Treasury PDA for protocol security, insurance reserves, and keeper gas. The treasury is withdrawable by the team's admin key.
3. Audit Findings & Resolution Matrix
The table below covers findings from the earlier internal rounds (8–13) and records their status as verified in source at that time. It is not a current statement of the deployed program: round 14 subsequently found three further executable proof-of-concept bugs, and those fixes are in source but not yet redeployed on chain. See the round-14 report for current status.
| Finding ID | Category | Severity | Description | Status |
|---|---|---|---|---|
C-01 |
P2P Validation | Critical | P2P offer mint injection check preventing worthless token substitutions | Verified Fixed |
C-02 |
Collateral Safety | Critical | SKR collateral liquidation dispatch restoring 5% protocol margin and lender payouts | Verified Fixed |
C-03 |
ABI & Wire Tag Safety | Critical | Instruction wire-tag pinning preventing discriminant shift across mobile client and on-chain rescue handlers | Verified Fixed |
H-01 |
Account Dispatch | High | AccountKind discriminator validation preventing type confusion across loan orders and offers | Verified Fixed |
H-02 |
Escrow Safety | High | PDA ownership assertion across all 5 token escrow sites to reject pre-created accounts | Verified Fixed |
H-03 |
Access Control | High | ProgramData-derived upgrade authority verification preventing admin race conditions | Verified Fixed |
H-04 |
Oracle & Pricing | High | Dynamic multi-source live price feed validation replacing static constants and halting on stale feeds | Verified Fixed |
H-05 |
Fee Solvency | High | Borrow fee routing validation with Treasury fallback and unallocated reward rolling preventing stranded capital | Verified Fixed |
M-01 |
Yield Harvesting | Medium | 1-hour anti-flash-loan cooldown on SkrYieldVault harvest instructions | Verified Fixed |
M-02 |
Token Burning | Medium | Atomic instruction bundling for Treasury SKR burn preventing token custody leaks | Verified Fixed |
L-01 |
System CPI | Low | Strict system program ID verification prior to native lamport transfers | Verified Fixed |
4. Mobile & Android Seeker Hardware Security
ClockLend was developed specifically for the Solana Seeker hardware ecosystem. Mobile security was graded D+ in round 14 and remediation is in progress — the client protections below are what the app implements:
- Seed Vault Integration: Hardware-backed key generation and seed storage inside the device Secure Processing Unit (SPU). Transactions are signed in the enclave via Mobile Wallet Adapter rather than by a key held in JavaScript.
- FLAG_SECURE Screen Shielding: Prevents unauthorized screen captures, screen recording trojans, and operating system task switcher leakage. (Note: on debug builds this flag is skipped.)
- Anti-Tamper & Anti-Emulator Guard: The release build refuses execution on rooted hardware, Android emulators, or dynamic instrumentation tools (Frida, Xposed). Release-keystore guard coverage is narrower than originally intended — tracked as an open low finding.
- RPC Dependency Disclosed: The client talks directly to Solana RPC/WebSocket endpoints and has no ClockLend backend server — it never routes user transactions through an app server. However, it does rely on third-party RPC infrastructure (Helius, plus public Solana RPC nodes). Those providers can see your IP address and the transactions you submit, and could in principle censor or delay them. This is a real, disclosed dependency, not "zero intermediaries".