$SCANRADAR — Docs
SCANRADAR / DOCUMENTATION

Under the engine.

A technical overview of the $SCANRADAR vault architecture: share-based accounting, whitelisted strategies, keeper-controlled capital movement, performance fees and on-chain events.

PROTOTYPE STATUS: The underlying model is unaudited and should be treated as experimental. Strategy integrations are simulated with internal accounting in the current prototype.
VAULT INTERFACE
Every call, by role.
USER

deposit()

Payable. Mints shares for attached NEAR, net of first-deposit storage.

USER

withdraw(shares)

Burns shares and pays NEAR from idle liquidity. Withdrawals remain available while paused, subject to idle liquidity.

KEEPER

deploy / recall

Moves capital between idle liquidity and an approved strategy, subject to its allocation cap.

KEEPER

harvest()

Reports strategy yield. In the prototype, the reported reward amount must be attached.

KEEPER

rebalance()

Recalls excess allocations and deploys idle assets toward strategy targets.

OWNER

Strategy controls

Add, update or remove whitelisted strategies, configure the performance fee and manage keeper/fee-recipient roles.

// $SCANRADAR vault interface
#[payable] deposit()
withdraw(shares)

deploy(strategy_id, amount)
recall(strategy_id, amount)
#[payable] harvest(strategy_id, reward_amount)
rebalance()

get_share_price()
get_strategies()
preview_deposit(amount)
preview_withdraw(shares)
PROTOCOL LOGIC
Key rules.
Share math

Shares and withdrawals use proportional asset/share accounting with rounded-down calculations and 256-bit intermediates.

Inflation protection

A virtual share/asset offset, minimum net deposit and internal idle-asset accounting help protect the share-price model.

Strategies

Up to 20 strategies can be configured. Enabled strategy targets may total no more than 10,000 basis points.

Withdrawal buffer

The amount not assigned to enabled strategy targets remains idle as the vault's withdrawal buffer.

Performance fee

Harvested rewards compound into strategy balances. The performance fee is capped at 2,000 basis points and is minted as shares.

Pause

Pausing blocks deposits, deployments and rebalances. Withdrawals, recalls and harvest operations remain available.

Withdrawal liquidity

Withdrawals are paid from idle liquidity. If it is insufficient, the withdrawal fails without permanently burning the user's shares.

ON-CHAIN VISIBILITY
Every movement leaves a trail.

State-changing vault calls emit structured events so activity can be tracked and inspected.

NEP-297

Event standard

Events use the protocol event standard with version 1.0.0.

7 EVENTS

Movement history

deposit, withdraw, withdraw_refunded, deploy, recall, harvest and rebalance.

EVENT_JSON:{
  "standard":"scanradar",
  "version":"1.0.0",
  "event":"harvest",
  "data":[{
    "strategy_id":0,
    "reward":"…",
    "fee_assets":"…",
    "fee_shares":"…",
    "share_price":"…"
  }]
}
DEVELOPMENT
Build & test.
TOOLCHAIN

Rust + near-sdk

The reference implementation uses Rust 1.86.0 and near-sdk 5.27. Newer compiler output may require runtime compatibility checks.

TESTING

Local verification

Build the WASM contract and run the Rust test suite before deploying or integrating with a live application.

cargo install cargo-near
cargo near build non-reproducible-wasm
cargo test

# Example read-only configuration call
near contract call-function as-read-only \
  SCANRADAR_CONTRACT \
  get_config \
  json-args '{}' network-config mainnet now

$SCANRADAR

Track the engine. Understand the rules. Explore the protocol.

Scroll to Top