Skip to content

The smart contracts for the ether.fi cash product

Notifications You must be signed in to change notification settings

etherfi-protocol/cash-contracts

Repository files navigation

ether.fi Cash Smart Contracts

Welcome to the ether.fi Cash Smart Contracts repository! This project powers the ether.fi Cash product, providing seamless debit and credit functionalities for users.

Overview

ether.fi Cash allows users to manage their funds through two primary mechanisms:

  • Debit: Users spend their own funds via the ether.fi card, with transactions flowing directly from their UserSafe contracts to the Settlement Dispatcher contract.
  • Credit: Users can borrow funds from the ether.fi Debt Manager by holding collateral with their UserSafe. These funds are available for spending with the ether.fi card, much like a traditional credit card, but backed by the user's collateral.

Key Contracts

The project comprises several smart contracts that ensure secure and efficient handling of user funds, collateral, and borrowing. Some of the main components include:

  • UserSafe: Manages user-owned assets and permissions.
  • L2DebtManager: Handles debt management for credit flows.
  • PriceProvider: Supplies price data for collateral valuation.

Get Started

To deploy and interact with these smart contracts, clone the repository and follow the build and test instructions provided below.

Clone the repository

git clone https://github.com/etherfi-protocol/cash-contracts

Install dependencies

yarn

Build the repo

yarn build

Test

yarn test

Security

The contracts are designed with security in mind, incorporating features like spending limits, delayed withdrawals, and recovery mechanisms.

About

The smart contracts for the ether.fi cash product

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published