Sol.College

Full lesson

IlyonAI

What it does

From the project README:

Ilyon AI is an agentic DeFi platform that turns natural-language intent into wallet-gated execution across Solana and seven EVM chains. Ask a question, get an answer; ask for a swap, get a signable transaction; ask for a yield strategy, get a sized allocation across audited protocols — all from a single chat box, with risk-scored every step of the way.
Original
Griffiniskid/IlyonAI
SuperStack fork
Blockchains/IlyonAI @ 0cd2cc6
Stars
0
Last push (original)
2026-07-29
Languages
Python, TypeScript, HTML, JavaScript, RouterOS Script, Solidity
Detected stack
Next.jssolana-pyweb3.js
Categories
Other
Licence
MIT

Architecture

1187 source files. By extension: .py ×853, .js ×147, .tsx ×107, .ts ×75, .sol ×5.

Top-level directorySource files
tests386
src371
web266
IlyonAi-Wallet-assistant-sourcecode(DO NOT CHANGE)42
IlyonAi-Wallet-assistant-main37
scripts35
services18
migrations14

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/ilyonai/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

Key code, explained

Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.

Griffiniskid/IlyonAI · services/solana-yield-builder/src/adapters/kamino.js L397–420 @ 0cd2cc6 · MIT · original
 /** * Build a Kamino Lend native withdraw IX (no SDK). */function buildKaminoWithdrawIx({ owner, collateralAmount, accounts }) {  const ownerPk = owner instanceof PublicKey ? owner : new PublicKey(owner);  const amountBN = BN.isBN(collateralAmount) ? collateralAmount : new BN(collateralAmount.toString());  return new TransactionInstruction({    programId: KAMINO_LEND_PROGRAM_PK,    keys: buildWithdrawAccounts({ owner: ownerPk, accounts }),    data: encodeWithdrawData(amountBN),  });} /** * Wrap one or more IXs into a serialized v0 base64 VersionedTransaction. * Adds a Compute Budget bump (Kamino lend IXs typically need ~200k+ CUs). */async function packIxs({ owner, ixs, connection }) {  const ownerPk = owner instanceof PublicKey ? owner : new PublicKey(owner);  const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });  const { blockhash } = await connection.getLatestBlockhash("confirmed");  const message = new TransactionMessage({    payerKey: ownerPk,
  1. Line 413 * Adds a Compute Budget bump (Kamino lend IXs typically need ~200k+ CUs).: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  2. Line 417 const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });: Sets the compute-unit limit or price (priority fee).
  3. Line 418 const { blockhash } = await connection.getLatestBlockhash("confirmed");: Fetches a recent blockhash. Transactions expire if it gets too old.
Griffiniskid/IlyonAI · services/solana-yield-builder/src/adapters/jito.js L109–132 @ 0cd2cc6 · MIT · original
    const inputSym = (asset || "SOL").toUpperCase();    const userPubkey = new PublicKey(user);     // SOL-direct path: native depositSol via @solana/spl-stake-pool.    if (inputSym === "SOL" || inputSym === "WSOL") {      const lamports = Math.floor(Number(amount) * 1_000_000_000);      if (lamports <= 0) {        throw new Error(`Jito deposit amount must be positive (got ${amount}).`);      }      const { instructions, signers } = await depositSol(        connection,        JITO_STAKE_POOL,        userPubkey,        lamports,      );      const tx = new Transaction();      // Bump compute budget — depositSol touches validator list + several PDAs.      tx.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 }));      tx.add(...instructions);      tx.feePayer = userPubkey;      const { blockhash } = await connection.getLatestBlockhash("confirmed");      tx.recentBlockhash = blockhash;      // Sign with ephemeral signers (user signs at wallet — these are extra      // session signers if depositSol returned any; usually empty for the
  1. Line 112 // SOL-direct path: native depositSol via @solana/spl-stake-pool.: Touches staking state: the amount locked and when it was locked.
  2. Line 126 tx.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 }));: Sets the compute-unit limit or price (priority fee).
  3. Line 129 const { blockhash } = await connection.getLatestBlockhash("confirmed");: Fetches a recent blockhash. Transactions expire if it gets too old.
Griffiniskid/IlyonAI · src/agent/tools/search_defi_opportunities.py L433–456 @ 0cd2cc6 · MIT · original
    # safety: TVL-weighted, capped + risk-tier bump.    tvl_log = math.log10(max(tvl, 1.0))  # 0 (TVL=1) to 11 (TVL=$100B)    safety = int(min(95, tvl_log * 8))  # $1M ~48, $100M ~64, $1B ~72    if risk == "LOW":        safety = min(100, safety + 15)    elif risk == "HIGH":        safety = max(0, safety - 20)     # durability: TVL-only (no time-series proxy yet).    durability = int(min(95, tvl_log * 8))     # exit: LP/lending/vault are all routine; unsupported drops exit.    if not executable:        exit_score = 35  # protocol UI only — slower    elif "lending" in product or "pool" in product:        exit_score = 85    elif "vault" in product or "yield" in product:        exit_score = 75    elif "lst" in product or "stake" in product:        exit_score = 60  # epoch unlocks    else:        exit_score = 70     # confidence: verified adapter + execution-ready = high.
  1. Line 433 # safety: TVL-weighted, capped + risk-tier bump.: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  2. Line 451 elif "lst" in product or "stake" in product:: Touches staking state: the amount locked and when it was locked.
Griffiniskid/IlyonAI · services/solana-yield-builder/src/adapters/sanctum.js L85–108 @ 0cd2cc6 · MIT · original
  },  JITOSOL: {    mint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"),    decimals: 9,    tokenProgram: TOKEN_PROGRAM_ID,  },  BSOL: {    mint: new PublicKey("bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1"),    decimals: 9,    tokenProgram: TOKEN_PROGRAM_ID,  },}; const LST_RECORD_STRIDE = 80; // 1+1+1+5+8+32+32const LST_MINT_OFFSET = 16;   // 1+1+1+5+8 function findPda(seedStrs) {  const seeds = seedStrs.map((s) => Buffer.from(s, "utf8"));  const [pda] = PublicKey.findProgramAddressSync(seeds, PROGRAM_ID);  return pda;} /** * Walk the lst_state_list account buffer at 80-byte stride and return the
  1. Line 102 const seeds = seedStrs.map((s) => Buffer.from(s, "utf8"));: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  2. Line 103 const [pda] = PublicKey.findProgramAddressSync(seeds, PROGRAM_ID);: Derives a PDA from seeds and the program ID and returns the address with its canonical bump.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
extensionnpm run devvite
extensionnpm run buildtsc --noEmit && vite build
webnpm run devnext dev
webnpm run startnext start
webnpm run buildnext build
webnpm run testvitest
webnpm run lintnext lint
IlyonAi-Wallet-assistant-main/clientnpm run devvite
IlyonAi-Wallet-assistant-main/clientnpm run buildvite build
IlyonAi-Wallet-assistant-main/clientnpm run testvitest run --environment jsdom
IlyonAi-Wallet-assistant-main/clientnpm run linteslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0
IlyonAi-Wallet-assistant-sourcecode(DO NOT CHANGE)/clientnpm run devvite
IlyonAi-Wallet-assistant-sourcecode(DO NOT CHANGE)/clientnpm run buildvite build
IlyonAi-Wallet-assistant-sourcecode(DO NOT CHANGE)/clientnpm run testvitest run --environment jsdom
IlyonAi-Wallet-assistant-sourcecode(DO NOT CHANGE)/clientnpm run linteslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0
services/solana-yield-buildernpm run startnode src/index.js

What you could build from it

Used in lessons