Skip to content

flexmeow/flex-contracts

Repository files navigation

Flex

A fixed-rate lending protocol inspired by Liquity V2 - borrowers set their own rates, and liquidity is managed through collateral redemptions: lenders or new borrowers can redeem existing borrowers’ collateral (paying slippage and fees), starting with those at the lowest rates.

Installation

  1. Clone the repository

    git clone https://github.com/johnnyonline/Flex.git
    cd Flex
  2. Set up virtual environment

    uv venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    deactivate  # To deactivate the venv
  3. Install dependencies

    # Install all dependencies
    uv sync

    Note: This project uses uv for faster dependency installation. If you don't have uv installed, you can install it with pip install uv or follow the installation instructions.

  4. Environment setup

    cp .env.example .env
    # Edit .env with your API keys and configuration

Usage

Build:

forge b

Test:

forge t

Deploy:

forge script script/Deploy.s.sol:Deploy --verify --slow --legacy --etherscan-api-key $KEY --rpc-url $RPC_URL --broadcast

Code Style

Format and lint code with ruff:

# Format Vyper code
mamushi . --line-length 120

# Format Solidity code
forge fmt .

About

A fixed-rate lending market inspired by Liquity V2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published