Integrate Solana LP Management Page
**We require two specific deliverables:**
1. **New "LP manage" Page:** A new page integrated into our existing Next.js application that allows users to interact with our smart contract.
2. **Liquidation Script:** A standalone TypeScript bot that our team can run to liquidate expired loans and reclaim protocol funds.
---
### **Part 1: "Create Pool" Page Integration**
**Objective:**
Design and build a new page within our existing Next.js application, accessible via a new route (e.g., `/create-pool`). This page will serve as the primary user interface for our new lending protocol.
**Figma Design:**
https://www.figma.com/design/a6ERlSlwBeCev58srf4meX/Untitled?node-id=0-3433
The new page must be implemented to be pixel-perfect according to the Figma design and seamlessly integrate with our dApp's existing layout, navigation, and styling (Tailwind CSS).
**Core Functionality & User Flow:**
1. **Component Structure:**
* Leverage our existing `WalletProvider` and UI components (buttons, inputs, modals) where possible to maintain a consistent look and feel.
* The core logic will be encapsulated in a new set of components for the `/create-pool` page.
2. **Page Elements:**
* **Token Inputs:**
* Two input fields for the token pair. One token is fixed as SOL.
* The second input allows the user to select an SPL token mint address (from user wallet). The UI must fetch and display the token's symbol and icon (using a token list or on-chain metadata).
* **Amount Inputs:**
* A display field showing the fixed amount of SOL our protocol will loan (e.g., "2 SOL"). This value must be fetched from our smart contract's on-chain configuration.
* **Information Display:**
* Display the loan duration (e.g., "1 Day") and the service fee, both fetched from the contract's configuration account.
* **"Create Pool" Button:**
* This button triggers the primary on-chain interaction.
* **Transaction Logic:** On click, the frontend must construct and send a **single, atomic transaction** that calls our smart contract's instruction.
* **UX/UI Feedback:** Implement clear loading/pending states for the button. Use our existing notification system (e.g., `react-hot-toast`) to display "Transaction Sent," "Success," or "Error" messages.
**B) Managing Existing Pools (The "My Positions" Tab/Section):**
* **Dashboard View:** This section will display a list of all liquidity pools the currently connected user has created with our protocol.
* **Fetching User Pools:** The application must fetch all `PoolLoan` accounts created by the connected user.
* **"Close Position" Button:**
* **Transaction Logic:** Clicking this button will initiate a transaction that calls our smart contract's `remove_liquidity` function. This function, when called by the user, handles the repayment of the loan and returns the user's share of the liquidity back to their wallet.