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.

Supply/Lending Interface Implementation #245

@JosueBrenes

Description

@JosueBrenes

Description

Currently, the marketplace only supports borrowing operations. We need to implement the complete supply/lending interface that allows users to provide liquidity to pools and earn interest on their supplied assets.

What to Implement

  • Complete supply modal component for all supported assets
  • Enhanced supply hook with proper error handling
  • Lender dashboard page with supply positions
  • Integration with Blend SDK supply operations
  • Real-time APY calculations and display

Acceptance Criteria

  • Users can supply USDC, XLM, and TBRG tokens to pools
  • Real-time APY calculation and display for each asset
  • Supply transaction confirmation and status tracking
  • Integration with existing wallet provider
  • Proper error handling and user feedback
  • Supply position tracking in user dashboard

Technical Requirements

Files to Create/Modify

  1. Supply Modal Component

    • Path: src/components/modules/marketplace/ui/components/SupplyLiquidityModal.tsx
    • Purpose: Modal for supplying assets to pools
  2. Enhanced Supply Hook

    • Path: src/components/modules/marketplace/hooks/useSupply.hook.ts (already exists, needs completion)
    • Purpose: Handle supply operations and state management
  3. Lender Dashboard Page

    • Path: src/components/modules/marketplace/ui/pages/LenderPoolPage.tsx
    • Purpose: Display lender-specific information and actions
  4. Supply Helper Functions

    • Path: src/helpers/supply.helper.ts (create new)
    • Purpose: Supply-related utility functions

Implementation Details

  • Use existing useSupply.hook.ts as starting point
  • Follow patterns from BorrowModal.tsx for consistency
  • Implement proper loading states and error handling
  • Add supply transaction tracking
  • Integrate with existing notification system

Design Considerations

  • Maintain consistency with existing marketplace design
  • Show clear APY information for each asset
  • Display supply limits and available liquidity
  • Provide clear transaction status feedback

Dependencies

  • @blend-capital/blend-sdk for supply operations
  • Existing wallet provider integration
  • Current notification system

Definition of Done

  • Code is tested and working on testnet
  • All UI components are responsive
  • Error handling is implemented
  • Code follows project conventions
  • Documentation is updated

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