LogoLogo
  • About
    • Introduction
    • Unlockd SDK
    • Partners & Revenue Sharing
  • Getting Started
    • Installation
    • SDK Modules
      • Action Module
      • Auction Module
      • Market Module
      • Buy Now Module
      • Sell Now Module
      • Wallet Module
      • NFT Batch Transfer Module
    • Code Examples
      • Borrowing Assets
      • Fetch prices
      • Login
      • Borrow Signature
      • Minimum Repay
      • Liquidation Price
      • Health Factor
      • Available to borrow
    • UI Snippets
    • Reservoir Integration
  • USE CASES (code examples)
    • Borrow against RWAs
    • 'Buy Now, Pay Later' financing
  • Resources
    • npmJS Package
    • Best Practices
    • Changelog
    • Support & Contact
    • Unlockd V2
    • Product Documentation
    • Protocol Documentation
    • Risk Documentation
    • External Audits
    • Website
    • X (Twitter)
    • Discord
    • Other links
Powered by GitBook
On this page
Export as PDF
  1. Getting Started
  2. Code Examples

Health Factor

import {healthFactor} from "@unlockdfinance/unlockd-ts";
const oneEth = BigInt(1e18)

const params = {
  collateral: (BigInt(100) * oneEth),
  debt: (BigInt(50) * oneEth),
  liquidationThreshold: BigInt(8500)
}
const result = healthFactor(params)
PreviousLiquidation PriceNextAvailable to borrow

Last updated 1 year ago