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.
-
Clone the repository
git clone https://github.com/johnnyonline/Flex.git cd Flex -
Set up virtual environment
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate deactivate # To deactivate the venv
-
Install dependencies
# Install all dependencies uv syncNote: This project uses uv for faster dependency installation. If you don't have uv installed, you can install it with
pip install uvor follow the installation instructions. -
Environment setup
cp .env.example .env # Edit .env with your API keys and configuration
Build:
forge bTest:
forge tDeploy:
forge script script/Deploy.s.sol:Deploy --verify --slow --legacy --etherscan-api-key $KEY --rpc-url $RPC_URL --broadcastFormat and lint code with ruff:
# Format Vyper code
mamushi . --line-length 120
# Format Solidity code
forge fmt .