Skip to content
Termbook
App integrations

Shared assessment

Describe verifiable reads and policies instead of adding vendor-specific risk contracts.

On this page

Shared components

ComponentEnforcement
Execution policyApproved targets, selectors, argument constraints, native value and spend limits.
Read programBounded ABI queries and deterministic conversion into uniform state fields.
Value readerOwnership, prices, liabilities, recovery costs and retained-value factors.
Recovery policyOrdered exit phases, spend bounds, receipt protection and completion checks.
Implementation guardThe admitted target and implementation code identities.

The developer configures these rules in the definition. The same deployed modules enforce them for each use case. Unsupported read or exit behavior needs platform work before admission; it does not become safe because the TypeScript object matches a type.

Assessment configuration

FieldDefine
read_program, state_target, readsABI programs for meta, positions, pending reconciliation and requests.
assets, marketsAsset decimals, oracle/feed, holding and exposure limits, quote programs and receipts.
retained_bps, recovery_costsConservative value retained and settlement-unit recovery costs.
max_positions, max_pending, max_requestsPortfolio bounds the reader and recovery loop can handle.
action_limits, callsPer-action funding/exposure limits and exact/range/account/spend constraints.
recoveryPending, request, position and holding-phase exit calls.
pricesDirection, amount, price scales, oracle deviation, slippage and authorization age.

Build a read program

ReadProgramBuilder and compile_read_program are exported by the SDK. Programs make bounded static reads against pinned contracts. They cannot run arbitrary JavaScript onchain. The Kuru quote program checks market parameters, status and available bid depth before computing recoverable proceeds.

Prepare activation calls

activation.ts
import { prepare_use_case, prepare_atomic_spot } from "@termbook/sdk";

const options = {
  client, registry, core, health_source, health_factory,
  max_health_age: 90,
};

const prepared = exchange.definition.atomic_spot
  ? await prepare_atomic_spot(exchange.definition, {
      ...options,
      max_slippage_bps: 50,
      max_deviation_bps: 100,
      max_authorization_age: 90,
    })
  : await prepare_use_case(exchange.definition, options);

const calls = prepared.calls;

These SDK helpers prepare governance transactions; they do not make the author an administrator. Authorized activation must configure the readers, policies, recovery components and integration version before an app token becomes active.

Documentation
8 results

Let’s talk

Tell us what you have in mind.

Supply liquidity