Skip to content

finn79426/DeFiLabs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeFiLabs

In-progress.

This repo aim to learn DeFi projects; how the functionality works, on-chain testing, bug finding, fuzzing, CI, etc.

Getting Started

  • Follow the instructions to install Foundry.

  • Clone and install dependencies:git submodule update --init --recursive

  • To see function signatures you shoul add --etherscan-api-key YOURAPIKEY at the end of the forge test, you coul get an API key on https://etherscan.io/myapikey

FlashLoan Testing

UniSwapV2 FlashSwap Testing

forge test --contracts ./src/test/Uniswapv2_flashswap.sol -vv

DODO FlashLoan Testing

forge test --contracts ./src/test/DODO_flashloan.sol -vv

AAVE FlashLoan Testing

forge test --contracts ./src/test/Aave_flashloan.sol -vv

Balancer FlashLoan Testing

forge test --contracts ./src/test/Balancer_flashloan.sol -vv

Pancakeswap FlashSwap Testing

forge test --contracts ./src/test/Pancakeswap_flashswap.sol -vv

Biswap FlashSwap Testing

forge test --contracts ./src/test/Biswap_flashloan.sol -vv

ChainLink Testing

getLatestPrice | more tests in-progress

forge test --contracts ./src/test/Chainlink.sol -vv

Compound Testing

ERC20 - cToken Supply/Redeem/Borrow/Repay | more tests in-progress

forge test --contracts ./src/test/Compound.sol -vv

Goverance - submit proposal | more tests in-progress

forge test --contracts ./src/test/Compound-dao.sol -vv

UniswapV3 Testing

Get Time Widget Avarge Tick | more tests in-progress

forge test --contracts ./src/test/Uniswapv3_twap.sol -vv

UniswapV2 Testing

Swap | more tests in-progress

forge test --contracts ./src/test/Uniswapv2.sol -vv

Curve Testing

Swap | more tests in-progress

forge test --contracts ./src/test/Curve.sol -vv

MakerDAO Testing

Balancer Testing

About

On-chain test DeFi using Foundry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 100.0%