Automated Lending Platform (ALP)
The Automated Lending Platform (ALP) is the core lending protocol component of Flow Credit Market (FCM). ALP provides the foundational lending and borrowing infrastructure with automated position management and liquidation protection.
ALP is one of three core components that make up FCM: ALP (Automated Lending Platform) provides the lending/borrowing engine, Flow Yield Vaults (FYV) handles yield aggregation strategies, and MOET serves as the synthetic stablecoin and unit of account.
What is ALP?
ALP is a decentralized lending protocol that enables users to deposit collateral to create lending positions, borrow assets against their collateral up to their borrowing limit, earn interest on deposits, and maintain positions through automated rebalancing.
The protocol uses MOET as its primary unit of account and default borrowed asset, with all prices quoted in MOET terms.
Key Innovation: Automated Rebalancing
ALP's standout feature is its automated rebalancing system that uses DeFi Actions to maintain optimal position health. When overcollateralized (health > 1.5), the system automatically borrows more to maximize capital efficiency. When undercollateralized (health < 1.1), it automatically repays debt using yield from FYV. The protocol targets a health range of 1.1 to 1.5 for balanced risk/reward, and prevents liquidations by pulling from TopUpSource (often FYV strategies) when needed.
Integration with FYV
ALP's unique liquidation prevention mechanism leverages yield from Flow Yield Vaults:
- User deposits collateral into ALP position
- ALP auto-borrows MOET to reach target health
- Borrowed MOET flows into FYV strategy (via DrawDownSink)
- FYV generates yield on the borrowed MOET
- If collateral price drops, ALP pulls from FYV (via TopUpSource) to prevent liquidation
- Result: Yield helps maintain position health automatically
Core Components
The protocol consists of four key components: the Pool serves as the central contract managing all positions and reserves; each Position represents a user's credit account tracking collateral and debt; TokenState maintains per-token state including interest indices; and the Health Factor measures the ratio of collateral to debt (which must stay above 1.0).
Learn more in Architecture Overview.
Documentation Sections
Core Concepts
- Architecture Overview - Core components and system design
- Credit Market Mechanics - How lending and borrowing works
- Position Lifecycle - Creating, managing, and closing positions
Advanced Features
- Rebalancing - Automated position management
- Liquidation System - Liquidation triggers and mechanisms
- DeFi Actions - Protocol composability framework
- MOET's Role - The unit of account in ALP
How ALP Fits into FCM
_14graph TB_14 User[User] -->|Deposits Collateral| ALP[ALP Position]_14 ALP -->|Auto-borrows MOET| MOET[MOET Token]_14 MOET -->|Via DrawDownSink| FYV[FYV Strategy]_14 FYV -->|Generates Yield| Yield[Yield Tokens]_14_14 Price[Price Drop] -.->|Triggers Rebalancing| ALP_14 ALP -->|Pulls Funds| FYV_14 FYV -->|Via TopUpSource| ALP_14 ALP -->|Repays Debt| MOET_14_14 style ALP fill:#f9f,stroke:#333,stroke-width:4px_14 style FYV fill:#bbf,stroke:#333,stroke-width:2px_14 style MOET fill:#bfb,stroke:#333,stroke-width:2px
Getting Started with ALP
To use ALP directly:
- Ensure you have Flow tokens or other supported collateral
- Connect your wallet to the Flow blockchain
- Create a position by depositing collateral
- Configure DrawDownSink and TopUpSource for automation
- Monitor your position health
For most users, we recommend using Flow Credit Market (FCM) which provides a complete solution combining ALP, FYV, and MOET.
Resources
- ALP GitHub Repository (FlowCreditMarket contract)
- Flow Credit Market (FCM) - The complete product
- MOET Token Documentation
- Flow Documentation
Security Considerations
ALP includes multiple safety features to protect users and the protocol. The system implements oracle staleness checks and deviation guards to ensure price accuracy, enforces warm-up periods after unpausing liquidations to prevent immediate exploits, provides slippage protection for DEX routes during trades, and continuously monitors health factors with alerts. Always monitor your position health and ensure sufficient collateral to avoid liquidation.