Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Liquidation Interface Implementation #246

@JosueBrenes

Description

@JosueBrenes

Description

Implement a comprehensive liquidation management interface to handle at-risk positions when health factors drop below safe thresholds. This critical feature will help maintain protocol stability and provide opportunities for liquidators.

What to Implement

  • Liquidation detection and monitoring system
  • Liquidation modal with detailed position information
  • Health factor monitoring component
  • Liquidation transaction execution interface
  • Liquidation rewards calculation

Acceptance Criteria

  • Display positions at risk (health factor < 1.1)
  • Show liquidation penalties and potential rewards
  • Execute liquidation transactions via Blend SDK
  • Real-time health factor updates
  • Liquidation history tracking
  • Protection mechanisms for partial liquidations

Technical Requirements

Files to Create

  1. Liquidation Modal

    • Path: src/components/modules/marketplace/ui/components/LiquidationModal.tsx
    • Purpose: Interface for executing liquidations
  2. Liquidation Hook

    • Path: src/components/modules/marketplace/hooks/useLiquidation.hook.ts
    • Purpose: Handle liquidation logic and state
  3. Liquidation Helper

    • Path: src/helpers/liquidation.helper.ts
    • Purpose: Liquidation calculations and utilities
  4. Health Factor Monitor

    • Path: src/components/modules/marketplace/ui/components/HealthFactorMonitor.tsx
    • Purpose: Real-time health factor display

Implementation Details

  • Integrate with Blend Protocol liquidation functions
  • Calculate liquidation bonuses and penalties
  • Implement partial vs full liquidation logic
  • Add real-time position monitoring
  • Create liquidation opportunity scanner

Key Features

  • Risk Assessment: Visual indicators for position risk levels
  • Liquidation Calculator: Show potential profits/losses
  • Position Details: Comprehensive view of liquidatable positions
  • Transaction Simulation: Preview liquidation outcomes
  • Batch Liquidations: Handle multiple positions efficiently

Design Considerations

  • Clear risk indicators (red/yellow/green status)
  • Detailed breakdown of liquidation calculations
  • Confirmation dialogs for liquidation actions
  • Real-time updates of position status
  • Mobile-responsive design

Dependencies

  • @blend-capital/blend-sdk liquidation functions
  • Real-time price oracle integration
  • Health factor calculation engine
  • Existing wallet and notification systems

Definition of Done

  • Liquidation detection works accurately
  • UI clearly shows risk levels and calculations
  • Liquidation transactions execute successfully
  • Proper error handling and edge cases covered
  • Performance optimized for real-time monitoring
  • Comprehensive testing on testnet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions