Documentation
NYXAR is a non-custodial, autonomous wealth agent on Solana. It manages tokenized real-world assets (stocks and crypto) plus a USDC yield base, earns lending yield on every idle dollar, and moves to safety on its own when markets turn. All of it happens inside limits you sign, in a wallet only you control.
Introduction #
Most portfolios do nothing while you sleep. Cash sits idle, risk assets ride out every drawdown, and the disciplined moves (trimming into danger, re-entering when it clears) are exactly the ones humans are worst at making unemotionally.
NYXAR turns a portfolio into a rules-based, always-on index. You define a policy once: a target mix, a safety floor, how aggressively to shelter and how gradually to re-enter. An agent then watches the market 24/7 and rebalances your vault inside those limits, on decentralized markets that never close. It never takes custody: your assets live in a vault only your wallet can withdraw from.
Your keys, always
Funds live in a vault account derived for your wallet. The agent can rebalance within your caps; it can never withdraw.
You write the constitution
A signed policy sets the target mix, floors and triggers. The agent governs inside it; the program enforces it on-chain, per trade.
USDC base yield
Idle dollars flow into USDC lending on Kamino, targeting roughly 7% APY. The rate is variable and set by lending-market conditions.
Responds to conditions
Tokenized stocks trade around the clock on-chain, so NYXAR reacts to regime changes in real time, not on a market-hours calendar.
How NYXAR works #
NYXAR is built in three layers that sit on top of each other inside your vault:
1 · Yield-bearing base
Every dollar you deposit is put to work immediately. Base capital is supplied to USDC lending on Kamino, targeting roughly 7% APY on dollar-backed assets. The interest-bearing receipt tokens become the collateral foundation the growth sleeves are built on, so nothing sits idle.
2 · Growth sleeves
On top of the base, the agent holds a target mix across three sleeves: equities (tokenized stocks & ETFs, such as xStocks), crypto (SOL, BTC, ETH) and USDC (the dollar base supplied to Kamino). The split is set by your chosen strategy and is what the agent steers back toward as prices drift.
3 · Flight to safety
Continuously, the agent computes the NYXAR Score, a composite read on market regime. When the score crosses your shelter threshold, the agent rotates risk assets into USDC on Kamino (safe yield), in stages. When the regime clears, it rebuilds risk gradually. Exiting is only 20% of the job; the disciplined re-entry is where long-term returns are actually made.
// the agent runs this continuously, per vault const score = nyxarScore() // regime read, 0 to 100 const target = policy.targetFor(score) // your mix, adjusted for regime const drift = current.vs(target) if (Math.abs(drift) > policy.band && cooldownElapsed()) vault.rebalance(...) // one Jupiter route, inside your caps
Quickstart #
Creating your first vault takes about two minutes. You’ll need a Solana wallet (Phantom, Solflare, Backpack or any wallet-standard wallet) and a little SOL for fees.
- Connect your wallet. Open the app and connect on Solana. No wallet handy? Use “Explore in demo mode” to look around first.
- Pick an amount and a strategy. Choose how much to fund and one of the presets: Preserver, Balanced or Growth (see Strategies).
- Set your autonomy level. Advisor, Copilot or Autopilot: how much the agent may do on its own (see Autonomy levels).
- Sign & create. One signature writes your policy; one transaction creates your vault and funds it. Creating the vault costs a fraction of a cent in SOL fees, separate from your deposit.
- You’re live. If you chose Autopilot, the agent is appointed at creation and starts managing immediately. Watch it from your dashboard; withdraw or revoke anytime.
The NYXAR Score #
The NYXAR Score is a single number from 0 to 100 that estimates how dangerous the current market regime is. Low is calm; high is stormy. It’s a composite, deliberately not a single price trigger, so it’s slow to panic and hard to whipsaw.
What it measures
| Signal | Weight | What it captures |
|---|---|---|
| Realized volatility | 35% | Where current volatility sits versus its own history (percentile). Rising vol lifts the score. |
| Trend vs 200-day | 30% | Position and slope relative to the long-term trend. Breaking below trend raises risk. |
| Drawdown velocity | 20% | How fast price is falling, not just how far. Sharp, fast drops score higher than slow grinds. |
| Leverage / positioning | 10% | Crowding and leverage in the system (funding, open interest). |
| Macro calendar | 5% | Known event risk within ~48h (FOMC, CPI, jobs prints) nudges the score ahead of the print. |
Regime bands
Track & harvest
The agent holds your target mix and compounds base yield. Business as usual.
Trim at the edges
Elevated risk. The agent begins de-risking in stages if the reading persists. One scary wick won’t move your money.
Flight to safety
Rotate risk assets into USDC on Kamino, held in your own vault, never an omnibus account.
Rebuild gradually
As the score clears back below your re-entry level, risk is rebuilt over time, not all at once.
Flight to safety #
“Flight to safety” is NYXAR’s core behavior, and it’s what separates it from a stop-loss. A stop-loss is a single price trigger that fires once, blind to context, usually into the worst liquidity of the day. NYXAR’s flight-to-safety:
- De-risks in stages as the regime deteriorates, rather than dumping everything at one price.
- Earns yield on what it shelters. Value rotates into USDC supplied to Kamino lending, not idle cash.
- Avoids whipsaw with hysteresis. Separate shelter and re-entry thresholds mean it doesn’t churn on noise.
- Re-enters gradually when the regime clears, on the schedule your policy sets.
Vaults #
A vault is your own on-chain account: a program-derived account (PDA) created for your wallet, holding your funds under a policy the agent must obey. Most people run more than one: a cautious core, a braver satellite.
Creating a vault
From the app, choose an amount and a strategy, set your autonomy level, then sign and create. Under the hood, the factory instruction derives a fresh vault PDA owned by your wallet, with the token whitelist and the routing venue preconfigured. If you fund with SOL, it is wrapped to wSOL inside the vault in the same transaction.
Funding & withdrawing
Add funds anytime by sending USDC, wSOL or SOL to your vault’s address, or via the Deposit action. Only you can withdraw: withdraw_token and withdraw_sol are owner-only and send straight back to your wallet. There are no lockups and no exit fees.
Closing a vault
The app’s Close vault action withdraws every asset back to your wallet, revokes the agent, and closes the vault’s accounts, and the rent deposit returns to you. A closed vault stops appearing on your dashboard.
Strategies #
Strategies are presets for your target mix and how aggressively you shelter and re-enter. Pick one as a starting point, then fine-tune the policy.
| Strategy | Target mix (equities / crypto / USDC) | Temperament |
|---|---|---|
| Preserver | 55 / 15 / 30 | Shelters early, re-enters slowly. Capital-first. |
| Balanced default | 62 / 23 / 15 | The NYXAR default, a middle path. |
| Growth | 55 / 40 / 5 | Shelters late, re-enters fast. Return-first. |
Custom policy
Beyond the presets you control: the target mix, a safety floor (minimum % always in USDC), the shelter threshold (the NYXAR Score at which de-risking begins), re-entry speed, and the asset whitelist. The agent can trade nothing outside it.
Autonomy levels #
You choose how much the agent may do on its own. All three stay inside your policy and caps. The difference is who presses “go”.
| Level | Who acts | Behavior |
|---|---|---|
| Advisor max human | You sign every move | The agent proposes rebalances; nothing executes without your signature. |
| Copilot default | Auto-shelter | De-risking is automatic, because safety shouldn’t wait for you to wake up. Re-entries wait for your approval. |
| Autopilot max agent | Full delegation | The agent manages entirely inside your envelope. You get receipts, not questions. |
The agent #
The agent is NYXAR’s off-chain brain. It’s an always-on service that, each tick (about every 10 minutes):
- computes the live NYXAR Score from market data and Pyth price feeds;
- discovers the vaults that have appointed its key;
- reads each vault’s real on-chain balances;
- computes the target allocation from the vault’s policy and the score;
- if the vault has drifted past its band and the on-chain cooldown has elapsed, submits one
rebalance: a real Jupiter route the vault executes on itself.
The agent key is powerful only in a narrow way: it can call rebalance within the vault’s hard caps, and nothing else. It cannot withdraw a cent. Losing the agent key is not the same as losing funds. The worst case is that the vault stops rebalancing until you appoint a new agent or manage it manually.
Non-custody model #
NYXAR is non-custodial by construction. Your assets are held in a vault account derived for your wallet. The agent receives delegated trading rights only. They are scoped to a whitelist of assets and a single routing venue, capped by your policy, and revocable in one transaction.
Withdrawals
withdraw_token and withdraw_sol are owner-only and pay to your wallet. The agent has no withdrawal path, not even to itself.
Policy & revoke
Changing the policy or revoking the agent requires your key. One transaction (revoke_agent) stops the agent instantly.
Control boundary #
Three parties, three roles, and the program is the police.
| You decide, at setup | The agent decides, continuously | The program enforces, always |
|---|---|---|
| Target mix & safety floor · volatility ceiling & re-entry speed · asset whitelist · autonomy level · deposits, withdrawals, revocation | When the regime changed · how much to move and in what order · where to route · when to begin re-entry, all inside your bands | Cannot withdraw to any address · cannot touch a non-whitelisted asset or venue · cannot breach your caps, checked per trade · cannot change your policy |
The on-chain caps that back this up:
| Guard | What it does |
|---|---|
| Token whitelist | The vault will only hold and trade owner-approved token mints. |
| Single routing venue | Trades route through one immutable venue set at creation, so the agent can’t send funds elsewhere. |
| Per-trade cap | max_trade_bps limits how much of a balance a single trade can move (default 25%). |
| Cooldown | A minimum time between trades (default 1 hour) throttles activity. |
| Slippage floor | Every swap carries a min_out; it fails rather than execute at a bad price. |
| Owner-only accounts | Withdrawals and policy changes require the owner’s signature; the agent is not a signer on them. |
| One-tx revoke | revoke_agent removes the agent and pauses trading immediately; withdrawals stay available. |
Yield & risk #
The base lending layer is USDC supplied to Kamino lending on Solana. That is the yield foundation of the portfolio. It is variable, set by market conditions, and not a guaranteed or insured rate.
The growth sleeves, tokenized stocks and crypto, carry normal market risk. That’s precisely the part NYXAR’s flight-to-safety logic actively manages, but it does not remove it. Nothing here is FDIC or SIPC coverage, and no strategy removes market risk entirely.
Network & addresses #
NYXAR runs on Solana mainnet-beta.
| Parameter | Value |
|---|---|
| Network | Solana (mainnet-beta) |
| RPC | https://api.mainnet-beta.solana.com |
| Explorer | https://solscan.io |
| Fee token | SOL |
| USDC mint | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v (6 dec) |
| wSOL mint | So11111111111111111111111111111111111111112 (9 dec) |
| Tokenized stocks | xStocks (Backed), mints listed at launch |
| Vault program ID | published at launch |
| Lending market | Kamino USDC reserve |
| Routing | Jupiter aggregator |
| Price feeds | Pyth |
Vault program #
Each vault is an account owned by the NYXAR vault program and controlled by the wallet that created it. Owner-only instructions manage funds and policy; the appointed agent may only call rebalance.
Owner instructions
| Instruction | Purpose |
|---|---|
deposit_token(mint, amount) | Move an approved token into the vault. |
withdraw_token(mint, amount) | Withdraw a token to the owner. amount = 0 withdraws the full balance. |
withdraw_sol(amount) | Withdraw SOL to the owner. amount = 0 withdraws the full balance. |
set_agent(pubkey) | Appoint the agent allowed to call rebalance. |
revoke_agent() | Remove the agent and pause trading immediately. |
set_policy(policy_hash) | Store the hash of your signed policy. |
set_token_allowed(mint, allowed) | Add or remove a mint from the whitelist. |
set_limits(max_trade_bps, cooldown) | Set the per-trade cap and cooldown. |
set_paused(paused) | Pause or resume rebalancing. |
Agent instruction
// callable only by the appointed agent, only within the caps below pub fn rebalance( ctx: Context<Rebalance>, mint_in: Pubkey, mint_out: Pubkey, amount_in: u64, min_out: u64, route: RouteData, // Jupiter route, executed via CPI ) -> Result<u64>
View helpers
The vault account exposes owner, agent, paused, max_trade_bps, cooldown, last_trade_at and the whitelist, all readable from any RPC without a transaction.
Vault factory #
Vault creation is permissionless: the program has no admin and takes no fees. Anyone can create a vault they own.
| Instruction | Purpose |
|---|---|
create_vault(policy_hash, agent) | Create a vault you own, optionally appointing an agent (pass the default pubkey for none). |
create_vault_with_sol(policy_hash, agent, lamports) | Same, but wraps the SOL you send to wSOL inside the new vault in one transaction. Autopilot passes the NYXAR agent here. |
| Vault address | Derived as a PDA from ["vault", owner, index], so your vaults are discoverable from your wallet alone. |
VaultCreated event | Emitted on each creation with owner, vault, policy hash and agent. |
const program = new anchor.Program(IDL, PROGRAM_ID, provider) const sig = await program.methods .createVaultWithSol(policyHash, NYXAR_AGENT, new BN(0.5 * LAMPORTS_PER_SOL)) .accounts({ owner: wallet.publicKey }) .rpc() // VaultCreated → your new vault PDA
Policy & signing #
Your policy (target mix, thresholds, re-entry, autonomy) is expressed as structured data and signed by your wallet as an off-chain message (Ed25519, sign-in-with-Solana style). The signature is free and moves nothing; it proves you authored the policy. The vault stores only the hash of the policy on-chain, so anyone can verify a policy against its hash and recover your address from the signature.
Rebalance mechanics #
When the agent rebalances, the vault performs the swap on itself through the routing venue. Every call is bounded:
- Direction & size come from the drift between current and target allocation. The agent moves a fraction of the gap, never the whole balance.
- Per-trade cap (
max_trade_bps) hard-limitsamount_into a share of the input balance. - Cooldown (
cooldownvslast_trade_at) blocks trades that are too frequent. - Slippage floor (
min_out) is derived from the live quote; the transaction fails if it can’t be met. - Whitelist: both
mint_inandmint_outmust be allowed, or the instruction fails.
Proceeds always stay inside the vault. There is no path for a rebalance to send value anywhere but back into your vault’s own balance.
FAQ #
Is NYXAR custodial?
No. Assets live in a vault account created for your address; the agent receives delegated trading rights only, scoped to a whitelist and a single venue, capped by your policy, and revocable in one transaction. It can rebalance; it cannot withdraw to any other address.
Isn’t this just a fancy stop-loss?
No, and the difference is the whole product. A stop-loss is a single price trigger that fires once, blind to context. NYXAR runs a continuous composite score, de-risks in stages, earns yield on what it shelters, avoids whipsaw with hysteresis, and re-enters gradually. The disciplined re-entry is where long-term returns are made.
What if the agent goes offline?
Nothing dangerous. The agent can only trigger rebalances; it isn’t required for your funds to exist or exit. If it disappears, your vault simply goes static: assets stay in your wallet, base yield keeps accruing, and you can withdraw or trade manually anytime.
How is this different from a robo-advisor?
Three ways: robo-advisors hold custody (NYXAR never does); they rebalance on a calendar during market hours (NYXAR responds to conditions in real time, because tokenized stocks trade 24/7 on-chain); and they leave cash idle (NYXAR’s base earns a variable Kamino lending yield from deposit).
Where does the base yield come from?
The base sleeve is USDC supplied to Kamino lending on Solana, targeting roughly 7% (variable, set by market conditions). The growth sleeves carry normal market risk, and that’s the part flight-to-safety manages. This is on-chain lending, not a bank deposit, and is not FDIC/SIPC coverage.
Glossary #
| NYXAR Score | A 0 to 100 composite estimate of market-regime danger that drives flight-to-safety. |
| Sleeve | One slice of the growth allocation: equities, crypto, or the USDC base. |
| Shelter | The de-risking action taken when the score crosses your shelter threshold. |
| Re-entry | The gradual rebuild of risk assets after the regime clears. |
| Policy | Your signed rule set: target mix, floors, thresholds, re-entry, autonomy. |
| Vault | Your on-chain account (a PDA of the vault program) that holds funds and obeys the policy. |
| Agent | The off-chain service that computes the score and submits capped rebalances. |
| USDC | The dollar-denominated token used as the safe/base asset on Solana. |
| xStocks | Tokenized stocks and ETFs issued by Backed, tradable on Solana. |
| Receipt token | The yield-bearing token received for supplying to the lending base; used as collateral. |
Links #
- NYXAR app: create and manage vaults.
- Main site: what NYXAR does, and the live demo.
- @NyxarProtocol on X: announcements, and the only place the contract address is posted.
- Solscan: verify programs and transactions at launch.
NYXAR · Documentation · v0 spec, launching on Solana.
This documentation is for informational purposes only and is not investment, legal, or tax advice. Digital assets involve substantial risk of loss. Tokenized stocks are not available to U.S. persons, among others. The programs described here are pre-release and not independently audited.