Varla
OverviewWhat it is and why it matters.How It WorksLending against prediction markets, step by step.FeaturesLending, borrowing, leverage, and risk management.Supported MarketsPolymarket, Opinion, Kalshi, and more.
DocumentationProtocol docs, guides, and architecture.Smart ContractsPool, Collateral Manager, Oracle, Liquidation Engine.SDK ReferenceTypeScript SDK for protocol interactions.API ReferenceREST and GraphQL endpoints for market data.
BlogLatest news and announcements from Varla.FAQsFrequently asked questions about the protocol.Security & AuditsProtocol security, audits, and trust assumptions.Brand AssetsLogos, colors, and typography guidelines.
Sign up
Varla
Protocol
Overview What it is and why it matters.
How It Works Lending against prediction markets, step by step.
Features Lending, borrowing, leverage, and risk management.
Supported Markets Polymarket, Opinion, Kalshi, and more.
Developers
Documentation Protocol docs, guides, and architecture.
Smart Contracts Pool, Collateral Manager, Oracle, Liquidation Engine.
SDK Reference TypeScript SDK for protocol interactions.
API Reference REST and GraphQL endpoints for market data.
Resources
Blog Latest news and announcements from Varla.
FAQs Frequently asked questions about the protocol.
Security & Audits Protocol security, audits, and trust assumptions.
Brand Assets Logos, colors, and typography guidelines.
Sign up

Introduction

Overview
Varla 101

Protocol

Overview
Lending Model
Supply & Borrow Interest Rates Reserves
User Positions
Open Positions Supply Assets Borrow Assets Withdraw Assets Repay Loans
Risk Engine
Health Factor LTV & Thresholds Liquidations Market Resolution Oracle System

Markets

Overview
Polymarket
Opinion
Kalshi
Adapters

Token

Overview
Distribution
Utility & Governance
Varla Gems

Security

Overview
Trust Assumptions
Risk Disclosure
Risk Parameters

Resources

FAQ
Glossary
Links
Brand Assets

Getting Started

Overview
TypeScript SDK
GraphQL API
Smart Contracts

Smart Contracts

Overview
Core Protocol
VarlaPool VarlaOracle Interest Rate Liquidators Market Adapters
Governance & Access
Governance

References

SDK Reference
API Reference

Operations

Testing & Debugging
Contract Addresses

Security

Overview
Trust Assumptions
Risk Disclosure
Risk Parameters

SDK Reference

Complete reference for the @varla/sdk TypeScript package — read pool state, manage positions, execute transactions, and build liquidation bots.

Installation

bash
npm install @varla/sdk viem

Core Methods

MethodReturnsDescription
readPoolSnapshot()PoolSnapshotCurrent utilization, borrow APY, supply APY, total assets
readAccountSnapshot(address)AccountSnapshotCollateral, debt, health factor, borrowing capacity
deposit(tokenId, amount)TxHashDeposit ERC-1155 positions as collateral
borrow(amount)TxHashBorrow stablecoins against collateral
repay(amount)TxHashRepay borrowed stablecoins
withdraw(tokenId, amount)TxHashWithdraw collateral positions
liquidate(borrower, tokenId, amount)TxHashExecute liquidation on unhealthy position
supply(assets)TxHashSupply stablecoins to lending pool (lender)
redeemShares(shares)TxHashRedeem vault shares for stablecoins (lender)

Quick Example

Read pool state + deposit collateral ts
import { createVarlaClient } from '@varla/sdk';
import { createWalletClient, http } from 'viem';
import { polygon } from 'viem/chains';

const client = createVarlaClient({
  chain: polygon,
  transport: http(),
});

// Read current pool state
const pool = await client.readPoolSnapshot();
console.log('Supply APY:', pool.supplyAPY);
console.log('Borrow APY:', pool.borrowAPY);
console.log('Utilization:', pool.utilization);

// Deposit collateral (requires wallet)
const wallet = createWalletClient({ ... });
const varla = client.withWallet(wallet);

await varla.deposit(tokenId, amount);
await varla.borrow(parseUnits('1000', 6)); // Borrow 1000 USDC
💡 Full examples
See TypeScript SDK Getting Started for detailed integration walkthroughs with complete code samples.

Menu

  • Overview
  • How it works
  • Features
  • Documentations
  • FAQs

Ecosystem

  • Prediction markets
  • Builders
  • Integrations
  • Governance

Company

  • About
  • Terms
  • Privacy
  • Support

©2026 Varla Labs Inc. All rights reserved