Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 10 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
# Flash Loan Provider Example
# Flash Loan Sample

## IFlashLoanProvider.sol
This repository contains a simple implementation of a flash loan provider and flash loan user using a Fake USDT ERC20 token. It provides example Solidity contracts and tests demonstrating how flash loans work.

This is an interface for the flash loan provider.
## Contracts

## IFlashLoanUser.sol

This is an interface for the flash loan user.

## FlashLoanProvider.sol

This is a concrete implementation of a flash loan provider. We use the FakeUSDT ERC20 token to provide an initial balance for testing.

## FlashLoanUser.sol

This is a concrete implementation of a flash loan user.

## FakeUSDT.sol

This contract is used to provide a balance to the flash loan provider.
- `IFlashLoanProvider.sol`: Interface for the flash loan provider.
- `IFlashLoanUser.sol`: Interface for the flash loan user.
- `FlashLoanProvider.sol`: Concrete implementation of a flash loan provider. Uses the FakeUSDT ERC20 token to provide an initial balance for testing.
- `FlashLoanUser.sol`: Concrete implementation of a flash loan user.
- `FakeUSDT.sol`: ERC20 token used to provide a balance to the flash loan provider.

## Test

In the test folder, you can can find a test file (TestFlashLoan.js) which shows the usage of the flash loan provider from a flash loan user.
In the `test` folder, you can find a test file (`TestFlashLoan.js`) which shows how the flash loan provider is used by a flash loan user.

## Requirements

- Truffle
- OpenZeppelin Contracts
- Blockchain Environment - Eg: Ganache