Skip to content


Repository files navigation

Hifi Coverage Status Yarn Styled with Prettier Commitizen Friendly license: BUSL1.1

Monorepo implementing the Hifi fixed-rate, fixed-term lending protocol. In-depth documentation is available at


The Hifi monorepo is maintained with yarn workspaces. Check out the README associated to each package for detailed usage instructions.


Package Description
@hifi/amm Dedicated AMM for market-making hTokens
@hifi/flash-swap Flash swap implementations for liquidating underwater accounts
@hifi/protocol The core Hifi fixed-rate, fixed-term lending protocol
@hifi/proxy-target DSProxy target contract with stateless scripts


Package Description
@hifi/constants Constants shared across Hifi packages
@hifi/errors Errors emitted in the Hifi protocol
@hifi/helpers Helper functions shared across Hifi packages


Feel free to dive in! Open an issue, start a discussion or submit a PR. For any concerns or feedback, join us on Discord.

Pre Requisites

You will need the following software on your machine:

In addition, familiarity with Solidity, TypeScript and Hardhat is requisite.

Set Up

Set the version of Node to use:

$ nvm use

Install the dependencies:

$ yarn install

Build the packages:

$ yarn build

Create a .env file and follow the .env.example file to add the requisite environment variables, then run the watcher:

$ yarn watch:ts

Now you can start making changes.


For security concerns, please email This repository is subject to the Hifi bug bounty program, per the terms defined here.


BUSL v1.1 © Mainframe Group Inc.