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

Liquidators

Varla's liquidation system is split into a router (VarlaLiquidator) and two execution strategies: merge liquidation and convert liquidation.
ℹ Source files
contracts/VarlaLiquidator.sol — router
contracts/liquidators/VarlaLiquidatorBase.sol — shared abstract
contracts/liquidators/VarlaMergeLiquidator.sol — merge strategy
contracts/liquidators/VarlaConvertLiquidator.sol — convert strategy

Architecture

Liquidation flow
VarlaLiquidator (router, AccessManaged)
       │
       ├─→ VarlaMergeLiquidator
       │      └─ calls IMarketAdapter.convert() to merge positions
       │
       └─→ VarlaConvertLiquidator
              └─ converts collateral to repayment token

Both inherit: VarlaLiquidatorBase (abstract)
  └─ shared: health checks, bonus calculation, position iteration

VarlaLiquidator (Router)

The entry point for all liquidations. It validates that the user's health factor is below 1.0, then delegates to the appropriate liquidator variant.

FunctionDescription
liquidate(address user, ...)Permissionless — anyone can liquidate an unhealthy position. Routes to the correct liquidator strategy.
setMergeLiquidator(address)Admin — set the merge liquidator contract
setConvertLiquidator(address)Admin — set the convert liquidator contract

Liquidator Variants

VarlaMergeLiquidator

Merge liquidation — used when a prediction market position can be merged. The liquidator calls the market adapter's convert() function to merge complementary position tokens back into the underlying collateral.

This is the primary liquidation path for Polymarket NegRisk positions (where YES + NO tokens can be merged back into the conditional token).

solidity
// Inherits VarlaLiquidatorBase
contract VarlaMergeLiquidator is VarlaLiquidatorBase {
    // Uses adapter.convert() to merge positions
    // Repays debt from merged proceeds
    // Sends bonus to liquidator
}
VarlaConvertLiquidator

Convert liquidation — used when positions cannot be merged. The liquidator seizes the ERC1155 collateral directly and converts it through other means (e.g. selling on a DEX).

solidity
// Inherits VarlaLiquidatorBase
contract VarlaConvertLiquidator is VarlaLiquidatorBase {
    // Seizes ERC1155 positions directly
    // Converts to repayment token externally
    // Sends bonus to liquidator
}

VarlaLiquidatorBase (Abstract)

Shared logic inherited by both liquidator variants:

ResponsibilityDescription
Health factor validationConfirms HF < 1.0 before proceeding
Bonus calculationComputes liquidation bonus based on tier config and current HF
Position iterationIterates over user's deposited positions to find liquidatable collateral
Dust checksEnsures remaining debt/collateral don't fall below dust thresholds
Fee collectionSends protocol liquidation fee to treasury

Liquidation Bonus

The liquidation bonus is dynamic — it increases as the health factor drops further below 1.0, up to a per-tier maximum. This is configured in VarlaCore's TierLiquidationConfig.

ParameterSource
maxLiquidationBonusBpsPer risk tier in VarlaCore
liquidationFeeBpsPer risk tier — protocol fee on liquidations
healthFactorForMaxBonusHF threshold where max bonus kicks in
targetHealthFactorHF target after partial liquidation

✦ Key Takeaways
  • Liquidations are permissionless — anyone can call liquidate() on an unhealthy position
  • Two strategies: merge (via market adapter) and convert (direct seizure)
  • Bonus scales dynamically with how far HF drops below 1.0
  • Protocol takes a fee (liquidationFeeBps) on each liquidation
  • Dust thresholds prevent tiny residual positions after liquidation

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