Solana on-chain layer for LIME's capped continuous payoff markets.
- Market lifecycle program (
lime-market) - Vault and collateral program (
lime-vault) - Settlement and payout program (
lime-settlement) - TypeScript SDK (
sdk/) to plug intolime-mvp
- Matching remains off-chain
- Collateral, positions, resolution and payout are on-chain
- Fully collateralized contracts with bounded payoff in
[L, U] - MVP supports
linearpayoff only
- Install dependencies:
- Node.js + npm
- Rust + cargo
- Solana CLI
- Anchor CLI
- Install JS dependencies:
npm install
- Build programs:
anchor build
- Run tests:
npm run test:anchor
- Build SDK:
npm run build:sdk
- Bootstrap devnet deployment + smoke market:
npm run bootstrap:devnet
programs/lime-market: protocol admin + market lifecycleprograms/lime-vault: collateral lock + position accountingprograms/lime-settlement: authorized resolution + claim/refund
sdk/ exports:
SolanaWalletProviderSolanaMarketServiceSolanaCollateralSolanaSettlement
These interfaces map to the frontend abstractions in lime-mvp/src/services/wallet.ts.
- Set wallet and RPC if needed:
export SOLANA_KEYPAIR=~/.config/solana/id.jsonexport SOLANA_RPC_URL=https://api.devnet.solana.com
- To redeploy to fresh program IDs, rotate local program keypairs:
npm run rotate:program-ids
- Set the browser wallet that should control admin UI actions:
export PROTOCOL_ADMIN=<phantom-or-solflare-admin-pubkey>- Optional:
export SETTLEMENT_RESOLVER=<resolver-pubkey>
- Run bootstrap:
npm run bootstrap:devnet
- Copy the printed
VITE_...vars to the frontend.env.
When PROTOCOL_ADMIN differs from the deploy wallet, bootstrap initializes protocol
authority to that browser wallet and skips the smoke market, because market creation
requires the protocol admin signature. Create and activate the first market from the
admin UI after copying the new program IDs.