Everything you need to trust the system.
Full program specification, security audit, API reference, and integration docs. All public. All verifiable on-chain.
Up in two minutes.
Visit the dashboard and click "Sign in". Guardian only reads your public key — your private key never leaves your wallet.
Configure your health factor trigger (e.g. 1.20x), maximum repay per action (e.g. 30%), and rug exit price. All stored on-chain.
Click "Save to on-chain" — this calls initialize_guardian and creates your GuardianConfig account. One-time transaction, small rent (~0.002 SOL).
From here, the Railway agent polls your position every 30 seconds and executes protective transactions when thresholds are crossed.
Nine instructions. Every argument.
| Instruction | Caller | Arguments |
|---|---|---|
| initialize_guardian | OWNER | health_factor_threshold: u64, max_repay_percent: u8, rug_exit_price: u64 |
| update_thresholds | OWNER | health_factor_threshold: u64, max_repay_percent: u8 |
| execute_repay | AGENT | amount: u64, trigger_health_factor: u64 |
| execute_revoke_approval | AGENT | delegate: Pubkey |
| execute_exit_position | AGENT | mint: Pubkey, amount: u64 |
| update_guardian_score | AGENT | score: u8 |
| deactivate_guardian | OWNER | (none) |
| reactivate_guardian | OWNER | (none) |
| close_guardian | OWNER | (none) |
How 0–100 is computed.
Self-audit report. Full disclosure.
deactivate_guardian did not emit a GuardianStateChanged event. Added in v1.1.
FIXEDProgram is not upgradeable (authority set to None). Intentional design — immutable on deploy.
ACCEPTEDmax_repay_percent was enforced in the agent but not the contract. Now enforced on-chain via require!.
FIXED