The protocol

A Solana program that watches your wallet and acts on your behalf.

Nine instructions. Eleven state fields. One Program Derived Address per wallet. Every action is enforced on-chain — the agent cannot exceed what you authorized.

Program identity
Program ID
599A5EBUVhmYoDZqS2UfVSvmpmnKU3z8MDwZc6aP1Jzp
Framework
Anchor 0.31.1
Network
Solana Devnet
Tests passing
233 / 233
PDA derivation

One guardian per wallet.

The Guardian PDA is derived deterministically from your wallet's public key. No collision possible, no second guardian possible, no impersonation possible.

// PDA derivation
seeds = [
b"guardian",
owner_pubkey.as_ref()
];
// Deterministic. Unforgeable. One-per-wallet.
Instructions

Nine functions. Two callers.

Instruction
Caller
Description
initialize_guardian
Owner
Creates GuardianConfig PDA with user-defined thresholds.
update_thresholds
Owner
Updates monitoring parameters in place.
execute_repay
Agent
Repays loan when health factor crosses threshold.
execute_revoke_approval
Agent
Revokes a malicious token delegate.
execute_exit_position
Agent
Exits token when price drops below floor.
update_guardian_score
Agent
Writes 0–100 risk score on-chain.
deactivate_guardian
Owner
Pauses all agent actions instantly.
reactivate_guardian
Owner
Resumes monitoring after a pause.
close_guardian
Owner
Closes PDA, returns rent lamports.
Account structure

GuardianConfig. Eleven fields.

Field
Type
Description
owner
Pubkey
Wallet that controls this guardian.
approved_guardian_agent
Pubkey
Only agent permitted to execute actions.
health_factor_threshold
u64
Trigger point for repay execution.
max_repay_percent
u8
Cap on single-action repay size (10–50).
rug_exit_price_threshold
u64
Price floor for forced exit.
guardian_score
u8
Public on-chain risk score (0–100).
is_active
bool
Master toggle for protection.
total_actions
u32
Lifetime count of protective actions.
last_action_timestamp
i64
Unix timestamp of last execution.
last_action_type
u8
0 = repay, 1 = revoke, 2 = exit.
bump
u8
PDA bump seed.
External integrations

Built on infrastructure you already trust.

Pyth Network
PRICE ORACLE

Sub-second price feeds for SOL and SPL tokens.

Kamino Finance
LENDING SOURCE

Health factor and obligation data per wallet.

Helius
TOKEN ANALYTICS

Holder concentration and mint authority checks.

Birdeye
LIQUIDITY FEEDS

Liquidity age and 5-minute change detection.

Anchor 0.31
PROGRAM FRAMEWORK

Rust + Anchor Solana program runtime.

Phantom
WALLET ADAPTER

User signing for owner-side instructions.

Execution flow

From threshold breach to signed transaction.

t+0.0s
Agent polls Kamino · health factor read
t+0.2s
HF computed below threshold · trigger flagged
t+0.4s
execute_repay instruction constructed
t+0.6s
Agent signs transaction · RPC submission
t+11.2s
Slot confirmed · GuardianActionExecuted emitted
t+11.4s
Score recalculated · written back on-chain

Read the code. Then trust it.

Every line is open-source under MIT. Every account is readable on the Explorer.