Skip to content

gg2001/flashloans

Repository files navigation

Flash loan examples

CI

Implementations of Aave, dYdX and Uniswap flash loans.

Tests

Aave

WETH 291618.07178644277661004 (fee: 262.456264607798498949)
USDC 44717206.41467 (fee: 40245.485773)
DAI 21602903.717869620560047272 (fee: 19442.613346082658504042)

dYdX

WETH 120695.19440535901869926 (fee: 0.000000000000000002)
USDC 14646088.247365 (fee: 0.000000000000000002)
DAI 8115907.878251847787692695 (fee: 0.000000000000000002)

Gas usage

···························|···························|·············|·····························
|  Methods                 ·              100 gwei/gas               ·      2008.42 usd/eth       │
·············|·············|·············|·············|·············|··············|··············
|  Contract  ·  Method     ·  Min        ·  Max        ·  Avg        ·  # calls     ·  usd (avg)  │
·············|·············|·············|·············|·············|··············|··············
|  Aave      ·  flashLoan  ·     189505  ·     209340  ·     196480  ·           3  ·      39.46  │
·············|·············|·············|·············|·············|··············|··············
|  DYDX      ·  flashLoan  ·     208084  ·     223325  ·     214171  ·           3  ·      43.01  │
·············|·············|·············|·············|·············|··············|··············
|  Uniswap   ·  flashLoan  ·      78499  ·     101776  ·      87878  ·           4  ·      17.65  │
·············|·············|·············|·············|·············|··············|··············
|  Deployments             ·                                         ·  % of limit  ·             │
···························|·············|·············|·············|··············|··············
|  Aave                    ·          -  ·          -  ·     507102  ·       5.3 %  ·     101.85  │
···························|·············|·············|·············|··············|··············
|  DYDX                    ·          -  ·          -  ·     779953  ·       8.2 %  ·     156.65  │
···························|·············|·············|·············|··············|··············
|  Uniswap                 ·          -  ·          -  ·     525210  ·       5.5 %  ·     105.48  │
·--------------------------|-------------|-------------|-------------|--------------|-------------·