Docsfor new users · 5-min read

How Beacon · Atlas works.

Atlas is a multi-strategy vault on X Layer testnet where three AI strategies compete for capital. One of them — Skeptic — pays the Beacon signal layer before every trade, and each payment fans out (cascades) to upstream signal authors. Every cascade produces an EIP-712 signed receipt anchored on-chain via CascadeLedger.

What is Beacon · Atlas?

Two products in one repo:

  1. Beacon SDK — a small TypeScript toolkit that turns HTTP endpoints into paid x402 resources on X Layer. Compose signals into cascades; composites sign EIP-712 receipts of the full payment graph.
  2. Atlas V2 — a Yearn V3-style ERC-4626 vault that allocates capital to three on-chain strategy contracts. Two trade heuristically (Fear = momentum, Greed = mean-revert). The third (Skeptic) buys paid intelligence from Beacon before trading — a live test of whether paid signals outperform free price action.

You'll see both in action on the dashboard: the strategy leaderboard shows Skeptic's live PnL, and the Cascades tab shows every receipt Skeptic has anchored on-chain.

1. Set up your wallet

Any EVM wallet works (MetaMask, OKX Wallet, Rabby). Click Connect in the top-right.

If your wallet isn't on X Layer testnet, the chip will show a red indicator and a Switch to X Layer Testnet button. Click it to add + switch in one prompt.

Network details (if your wallet asks to add it manually):
  • Chain name X Layer Testnet
  • Chain ID 1952 (0x7a0)
  • RPC https://testrpc.xlayer.tech
  • Explorer https://www.oklink.com/xlayer-test
  • Native token OKB

2. Get testnet gas + bUSD

You need two things to use the app: a little testnet OKB for gas, and some bUSD (the settlement token for Beacon) for signal calls and vault deposits.

  • OKB (gas) → www.okx.com/xlayer/faucet ↗. Enter your wallet address, complete the human check. You'll receive a small drip.
  • bUSD (settlement) → open-mint on testnet. Use the Mint 1 bUSD button in the demo widget, or the mint(to, amount) function on the bUSD contract directly. Mint as much as you like — it's testnet.

3. Call a paid signal

Try it right here — no leaving the page:

1 — request

Endpoint safe-yield.gudman.xyz
Cost 0.006 bUSD · 4 settlements expected
Wallet not connected
bUSD balance
Faucet ↗
Need gas? Get testnet OKB from the X Layer faucet.

2 — response

Connect a wallet, then click Call signal.

What happens when you click:

  1. Connect your wallet.
  2. If your bUSD balance is zero, click Mint 1 bUSD and approve the mint tx (costs a little OKB gas).
  3. Click Call signal →. Your wallet will pop up asking to sign one EIP-3009 TransferWithAuthorization for 0.006 bUSD.
  4. The server probes GET safe-yield.gudman.xyz → returns 402, you sign, retry with X-Payment, get 200 back.
  5. The composite cascades payments to three upstream signal authors (wallet-risk, liquidity-depth, yield-score) and returns an EIP-712 signed CascadeReceipt in the X-Cascade-Receipt header.
  6. The demo widget decodes that receipt and shows you every upstream settlement tx with a link to the block explorer.

What you should see: 4 settlement tx hashes on X Layer (1 from your wallet to the composite, 3 from the composite to upstream authors), all real, all within one call.

4. Deposit into the vault

Open the Deposit page. Steps:

  1. Connect wallet.
  2. Enter an amount of bUSD (mint more if you need to).
  3. Click Approve — standard ERC-20 approval for the vault.
  4. Click Deposit — the vault mints you ATLS shares 1:1 against current NAV.

From that moment, your share of the vault is proportional to balanceOf(you) / totalSupply(). As strategies book PnL, your NAV / share updates.

5. Read a cascade receipt

Go to the Cascades tab on the dashboard. Each row is one signed receipt. Click a row to expand and see:

  • The composite hash — the EIP-712 hash that was signed.
  • The buyer settlement tx — the on-chain transfer your wallet authorized.
  • Each upstream payment — slug, author, amount, settlement tx.
  • The anchor tx — when Skeptic submitted the receipt to CascadeLedger. This is what makes it on-chain-provable.

Any agent or contract can now query CascadeLedger for Skeptic's payment history and verify the signatures cryptographically — no trusted server required.

6. Withdraw

On the Withdraw page, enter an ATLS share amount and click Redeem. The vault burns your shares and sends you a proportional amount of bUSD from its idle balance.

If your redemption exceeds the vault's idle balance, the call reverts with WithdrawExceedsIdle. Use the WithdrawQueue contract: requestWithdraw(shares) escrows your shares, the admin recalls capital from a strategy and calls fulfill(), then you call claim() to pull the bUSD.

Under the hood — the two primitives

Beacon · paid signals with cascade receipts

Any endpoint can become paid intelligence:

import { defineSignal } from "@beacon/sdk";

const signal = defineSignal({
  slug:  "my-signal",
  price: 1500n,           // 0.0015 bUSD per call
  payTo: account.address,
  token: bUSDDescriptor,
  chainId: 1952,
  settlementWallet,
  handler: async (ctx) => ({ score: 88, ts: Date.now() }),
});

Composites fan payments out to upstream authors and sign the graph:

defineComposite({
  slug: "safe-yield",
  upstream: [
    { slug: "wallet-risk",     url: "...", shareBps: 3300 },
    { slug: "liquidity-depth", url: "...", shareBps: 3300 },
    { slug: "yield-score",     url: "...", shareBps: 3300 },
  ],
  handler: async (ctx, upstream) => ({ composite: score(upstream) }),
});

Atlas V2 · ERC-4626 multi-strategy vault

  • AtlasVaultV2 — ERC-4626. Holds bUSD. Allocates to strategies via allocate(strategy, amount).
  • IStrategy — each strategy has a sub-wallet (strategy-owned, only-strategy-callable). PnL is computed from on-chain balance snapshots inside report().
  • TwapOracle — 30-min ring buffer. NAV uses this, not spot, to kill flash-loan manipulation.
  • SlashingRegistry — strategies post stake, anyone can file a bond-backed fraud claim with a 24h challenge window.
  • CascadeLedger — accepts EIP-712 signed CascadeReceipts and emits CascadeSettled + UpstreamPaid events.

Vs the alternatives

Atlas borrows what's good from prior multi-strategy vaults and adds primitives nobody else has:

Feature Atlas V2 Yearn V3 Beefy Sommelier
Vault-controlled sub-wallet custody
On-chain P&L via balance snapshots
TWAP NAV oracle (anti flash-loan)
Slashing-backed strategy stake
x402 paid intelligence in strategy logic
EIP-712 signed cascade receipts✓ first
On-chain receipt registry✓ CascadeLedger
MCP server for any agent client
Open-source SDK on npm✓ @beacon/sdk

Contracts (X Layer testnet · chainId 1952)

AtlasVaultV20xC968…b4F5 ↗
CascadeLedger0x270B…ee8A ↗
TwapOracle0x641e…607C ↗
SlashingRegistry0x2726…A9bD ↗
Fear strategy0x90cC…83F1 ↗
Greed strategy0xba9f…e244 ↗
Skeptic strategy0x5c09…8C71 ↗
WithdrawQueue0x8639…41D9 ↗
DemoAMM0x54F9…Cd76 ↗
bUSD (open-mint)0xe5A5…6B76 ↗

Safety & limits

  • This is testnet. bUSD and OKB have zero real value. Don't deposit anything you can't afford to lose track of.
  • Not audited. 42/42 contract tests pass (10 adversarial: NAV inflation, custody breach, fraud-claim edge cases, etc.). Slither is clean of high/medium findings. Foundry invariants run in CI. Mainnet would require a professional audit first.
  • NAV is TWAP-priced. 30-min window. Single-block flash loans cannot move the NAV reference.
  • Strategies are slashable. Anyone can file a bond-backed fraud claim. 24h challenge window. Admin can also call emergencyRevokeStrategy to pull capital instantly.
  • The vault is pausable by the guardian for incident response.

FAQ

What is bUSD and why isn't this real money?
bUSD is a testnet ERC-3009 token Atlas deploys for demo settlement. The vault, strategies, and cascade flow are all real on X Layer testnet. Mainnet deployment uses real USDT0/USDC; the architecture is identical.
What's the actual edge?
Atlas combines two primitives nobody has shipped together: vault-custody multi-strategy capital allocation (Yearn V3 shape) plus EIP-712 signed cascade receipts (a new primitive from @beacon/sdk). The Skeptic strategy is the live test of whether paid intelligence beats free price action.
How is Skeptic's PnL accounted for?
All P&L derives from on-chain balance snapshots inside IStrategy.report(). The strategy compares its sub-wallet's current equity (bUSD + MOCK-X valued at TWAP) against cumulative debt allocated by the vault. Signal costs come out of the executor's bUSD, so they show up directly as performance drag.
Can someone manipulate NAV with a flash loan?
No. NAV uses a 30-minute TWAP from TwapOracle, not raw AMM spot. Single-block manipulation can't move the price reference enough to inflate share value.
What happens if a strategy goes rogue?
Strategies must post a stake with SlashingRegistry. Anyone can open a fraud claim with a bond. After a 24h challenge window, unresolved claims slash the stake. The vault admin can also call emergencyRevokeStrategy to pull all capital back instantly.
How do I withdraw?
Use the withdraw page. Standard ERC-4626 withdrawals come from the vault's idle bUSD balance. For larger redemptions when capital is allocated, use the WithdrawQueue (request → admin recall → claim).
What's a CascadeReceipt and why does it matter?
An EIP-712 signed payload listing every upstream the composite paid (slug, author address, amount, on-chain settlement tx) when serving one buyer call. Provable cryptographically without trusting the server. Indexable on CascadeLedger for permanent on-chain history. Replaces heuristic block-window matching used by other agent-marketplace demos.
Has this been audited?
Not professionally. 42/42 contract tests pass including 10 adversarial tests (NAV inflation, custody breach, fraud claims, etc), Slither is clean of high/medium findings, Foundry invariants in CI. Mainnet deployment would require a full audit first.

Glossary

x402
HTTP status 402 ("Payment Required") + a protocol for paying for a retry. Beacon's signals return 402 with a PaymentRequired body; the client signs an EIP-3009 TransferWithAuthorization and retries with an X-Payment header.
EIP-3009
Gasless ERC-20 transfer via typed-data signature. Signer can authorize a third party to pull tokens; no on-chain approve needed.
Cascade receipt
An EIP-712 signed payload listing every upstream payment the composite made to serve one buyer call. Returned in X-Cascade-Receipt, indexable on CascadeLedger.
NAV
Net asset value per vault share. Equals total vault assets (TWAP-priced) divided by total shares.
Sub-wallet
A strategy-owned contract that holds the capital the vault allocated. Only the strategy contract can call it — the vault can only pull capital via recall().
ATLS
The vault's share token. 1 ATLS = proportional claim on the vault's NAV.

Still stuck? Open an issue at github.com/Ridwannurudeen/beacon/issues.