A decentralized lending protocol on Solana that provides liquidity for Solana program deployments. Depositors earn yield while borrowers access SOL to deploy their programs to the network.
Solignition connects liquidity providers with developers who need SOL for program deployment. The protocol:
- Enables Deposits: Users deposit SOL into a shared liquidity pool and earn yield over time
- Facilitates Program Deployment Loans: Borrowers request loans to cover the cost of deploying Solana programs
- Automates Deployments: Includes a deployer service that handles program deployment when loans are approved
- Distributes Yield: Interest from loans is distributed proportionally to depositors based on their share of the pool
- Manages Loan Lifecycle: Tracks loans through their lifecycle (Active → Repaid/Recovered)
- Deposit SOL: Contribute to the liquidity pool
- Earn Yield: Receive proportional share of interest from loans
- Withdraw Anytime: Withdraw deposits plus accumulated yield (subject to available liquidity)
- Track Performance: Monitor deposits and earnings through the web interface
- Request Loans: Submit loan requests specifying amount and program to deploy
- Automated Deployment: Protocol deploys your program upon loan approval
- Authority Transfer: Receive upgrade authority for your deployed program
- Flexible Repayment: Repay loans with accrued interest at your convenience
- Configure Parameters: Set interest rates, admin fees, and other protocol parameters
- Manage Loans: Recover loans if borrowers fail to repay
- Protocol Controls: Pause/unpause protocol in emergencies
- Fee Collection: Treasury receives admin fee split from loan interest
Located in anchor/programs/solignition/src/lib.rs, the on-chain program handles:
- Protocol initialization and configuration
- Deposit and withdrawal operations
- Loan request, repayment, and recovery
- Interest calculations (time-based, using basis points)
- Yield distribution to depositors
- Authority management for deployed programs
Key Accounts:
ProtocolConfig: Global protocol state and configurationDepositorRecord: Individual depositor balance and yield trackingLoan: Loan details including amount, interest rate, timestamps, and state
The @solignition/frontend package, a modern web3 interface built with:
- Gill SDK: Simplified Solana wallet integration
- Codama-Generated Client (in
apps/frontend/src/anchor-client): Type-safe TypeScript client from the program IDL, imported via the@project/anchoralias - shadcn/ui + Tailwind: Professional, accessible UI components
- Wallet UI Components: Pre-built wallet connection components
The @solignition/deployer package, an automated deployment service (runs on a cloud VM via pm2; containerization is a future task) that:
- Monitors loan requests
- Deploys programs to Solana when loans are approved
- Manages deployment state and binaries
- Transfers program upgrade authority to borrowers
- Node.js 18+ and npm
- Rust and Anchor CLI (
anchor-cli) - Solana CLI tools
- A Solana wallet with devnet SOL
# Clone the repository
git clone <your-repo-url>
cd solignition
# Install dependencies
npm installGenerate and sync program ID:
npm run setupThis creates a new program keypair and updates:
Anchor.tomlconfiguration- Program's
declare_id!macro - TypeScript client exports
Build the Solana program:
npm run anchor-buildGenerate the TypeScript client (Codama → apps/frontend/src/anchor-client/generated):
npm run codama:jsStart a local validator with the program deployed:
npm run anchor-localnetIn another terminal, start the web interface:
npm run devVisit http://localhost:5173 to interact with the protocol.
Run the Anchor program tests:
npm run anchor-testThe test suite includes comprehensive unit tests for:
- Interest calculations
- Yield distribution
- Loan lifecycle management
- Edge cases and overflow protection
Deploy to Solana Devnet:
npm run anchor deploy --provider.cluster devnetUpdate the cluster in the web interface to connect to devnet.
solignition/ # Monorepo root (npm workspaces + changesets)
├── apps/
│ └── frontend/ # @solignition/frontend — React + Vite web app (self-contained)
│ └── src/
│ ├── anchor-client/ # Codama-generated program client (codama:js output)
│ ├── anchor-idl/ # Anchor IDL + types, synced in via `npm run sync:anchor`
│ ├── components/ # React components (incl. solana/ wallet, ui/ shadcn)
│ └── features/ # Feature UIs (solignition/, account/)
├── anchor/ # Solana program (Anchor)
│ ├── programs/solignition/ # On-chain program source (lib.rs)
│ ├── target/idl, target/types # Generated IDL + types (synced into the frontend)
│ └── tests/ # Program tests
├── deployer/ # @solignition/deployer — Express deploy service
│ ├── src/ # Service source
│ └── binaries/ # Cached program binaries
├── landing/ # @solignition/landing — marketing site (Vite)
├── docs/ # @solignition/docs — docs site (Vite)
├── .changeset/ # changesets config + pending release notes
└── package.json # workspace root (orchestration scripts only)
This repo is an npm-workspaces monorepo. Each deployable is its own versioned package, and
each installs standalone from its own directory with its own lockfile — the root workspaces
array and root lockfile exist for local dev and changesets discovery, not for deployment.
| Package | Path | Deploys to |
|---|---|---|
@solignition/frontend |
apps/frontend |
Vercel (Root Directory = apps/frontend; self-contained, plain isolated install) |
@solignition/landing |
landing |
Vercel |
@solignition/docs |
docs |
Vercel |
@solignition/deployer |
deployer |
Azure VM via pm2 (Docker is future scaling) |
| anchor program | anchor |
anchor deploy (upgrade authority) |
- After a meaningful change: run
npm run changeset, pick the affected package(s) and the bump level (patch / minor / major), and write a one-line summary. Commit the generated.changeset/*.mdfile alongside your code. - To cut a release:
npm run version-packagesbumps versions, writes each package'sCHANGELOG.md, and consumes the changeset files; commit that, thennpm run tag-releasecreates the git tags. Deploy the package(s) that bumped. - There is no parallel/old-version support — deploying replaces production.
Interest is calculated using a time-based formula:
interest = (principal × rate_bps × elapsed_seconds) / (10,000 × SECONDS_PER_YEAR)
- Rates are in basis points (bps): 100 bps = 1%
- Time-based accrual: Interest accumulates proportionally to loan duration
Loan requested:
- Open fee spilt between admin_pda and associated vault treasury
- updates associated share value
When loans are repaid:
- interest is split into admin_pda and associated vault treasury
- updates associated share value
Share Value
$TotalAssets = TotalDeposits + AccruedInterest$ $Share Price = TotalAssets / TotalShares$ - $WithdrawableAssets = UserShares * SharePrice
- Active: Loan is outstanding, interest is accruing
- Repaid: Borrower has fully repaid the loan with interest
- Recovered: Admin has recovered the loan (borrower failed to repay)
- Pending: loan has been requested and program pending deployment
- RepaidPendingTransfer: loan has been repaid program pending authority transfer
Protocol parameters (set during initialization or via update_config):
default_interest_rate_bps: Base interest rate for loansdefault_admin_fee_bps: Percentage of interest allocated to protocol treasuryadmin_fee_split_bps: Split between admin and deployer service- Pause functionality for emergency stops
- Protocol admin has privileged access (recovery, configuration)
- Loans are collateralized by the smart contract itself
- No slashing mechanism for failed deployments
This project uses:
- Anchor 0.30+: Solana program framework
- Codama: IDL-to-client code generation
- Gill SDK: Modern Solana web3 library
- TypeScript: Type-safe client development
- Vitest: Fast unit testing
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Discord:Discord Link