Sol.College

Structure lesson (licence does not allow quoting code)

Arva

Open credit layer for Argentine grain warrants: producers lock a certified digital warrant (1 token = 1 t) and borrow USDC from an open liquidity pool. Anchor program + Next.js app on Solana devnet. Not audited.

Original
alejandrocol-dev/Arva
SuperStack fork
Blockchains/Arva @ b1f6e10
Stars
0
Last push (original)
2026-10-26
Languages
TypeScript, HTML, Rust, CSS, JavaScript
Detected stack
AnchorMetaplexNext.jsweb3.js
Categories
DeFiInfrastructure & Tooling
Licence
none detected: code not quoted on Sol.College
Homepage
https://arva-devnet.vercel.app/

Architecture

78 source files. By extension: .tsx ×32, .ts ×25, .rs ×21.

Top-level directorySource files
app49
programs21
scripts8

On-chain programs: programs/arva

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
set_priceSetPriceprograms/arva/src/lib.rs:26
deposit_liquidityDepositLiquidityprograms/arva/src/lib.rs:42
borrowBorrowprograms/arva/src/lib.rs:46
repayRepayprograms/arva/src/lib.rs:50
liquidateLiquidateprograms/arva/src/lib.rs:54
handle_liquidateLiquidateprograms/arva/src/instructions/liquidate.rs:77
handle_deposit_liquidityDepositLiquidityprograms/arva/src/instructions/deposit_liquidity.rs:37
handle_borrowBorrowprograms/arva/src/instructions/borrow.rs:88
handle_repayRepayprograms/arva/src/instructions/repay.rs:84
handle_set_priceSetPriceprograms/arva/src/instructions/set_price.rs:17

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
app/lib/arva-real.tsPublicKey, getAssociatedTokenAddressSync, AnchorProvider, SystemProgram, Transaction, seeds
programs/arva/tests/common/mod.rsPubkey, Keypair, VersionedTransaction
scripts/setup-devnet.tsPublicKey, findProgramAddressSync, createMint, getAssociatedTokenAddressSync, Keypair, mintTo
scripts/test-cycle.tsPublicKey, getAssociatedTokenAddressSync, findProgramAddressSync, SystemProgram, AnchorProvider, Program
app/lib/arva.tsConnection, Transaction, Program, VersionedTransaction, seeds, PublicKey
app/app/api/starter/route.tsPublicKey, getAssociatedTokenAddressSync, Keypair, SystemProgram, Connection, Transaction
scripts/set-usdc-metadata.tsPublicKey, Keypair, Transaction, sendAndConfirmTransaction, Connection, findProgramAddressSync
scripts/inspect.tsPublicKey, findProgramAddressSync, Connection, Keypair, getAssociatedTokenAddressSync, AnchorProvider
programs/arva/src/instructions/borrow.rsseeds, transfer, Program, has_one, CpiContext, init_if_needed
programs/arva/src/instructions/repay.rsseeds, transfer, Program, has_one, CpiContext, init_if_needed
programs/arva/src/instructions/liquidate.rsseeds, Program, transfer, init_if_needed, has_one, CpiContext
scripts/whoami.tsPublicKey, findProgramAddressSync, Connection, getAccountInfo, getAssociatedTokenAddressSync

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/arva/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

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
appnpm run dev
appnpm run start
appnpm run build
appnpm run lint
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it