Coder Social home page Coder Social logo

fifikobayashi / flash-arb-trader Goto Github PK

View Code? Open in Web Editor NEW
316.0 316.0 116.0 84 KB

Smart contract that flash borrows from Aave and uses the flash liquidity for arbitrage between Sushiswap and UniswapV2 within the same transaction

License: MIT License

Solidity 100.00%

flash-arb-trader's People

Contributors

fifikobayashi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flash-arb-trader's Issues

Best amount to trade

Hi, thank for your repository !
In your example trade with 1ETH, i'm finding the way to calculate the best amount to trade between 2 pool. Do you have any idea or some tutorial to solve this. Thank you very much

Fail with error 'UniswapV2Library: ZERO_ADDRESS'

I have tried various methods but not sure if this is the gas fees issue. Tried several times and successful but unable to complete the transaction after 'execute arbitrage' operation. Can anyone show some light? Thanks. Fail with error 'UniswapV2Library: ZERO_ADDRESS'

https://ropsten.etherscan.io/tx/0xed0129e15af3cbca228281505c2f9255b3f2b0f57d289bcbbbfe6d72f0f2ec31

I saw this 2 errors in the compiler (potential issue)?

browser/FlashArbitrageTrader.sol:129:9: Warning: Return value of low-level calls not used. msg.sender.call{ value: address(this).balance }(""); ^-------------------------------------------------^
browser/FlashArbitrageTrader.sol:63:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning. bytes calldata _params ^--------------------^

I tried exactly this parameters:

On deployment:
_AAVELENDINGPOOL: 0x1c8756FD2B28e9426CDBDcC7E3c4d64fa9A54728
_UNISWAPV2ROUTER: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
_SUSHISWAPV2ROUTER: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D

Send 0.1 ETH to the deployed contract.

On 'execution arbitrage':
_flashAsset: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
_flashAmount: 1000000000000000000
_daiTokenAddress: 0xf80A32A835F79D7787E8a8ee5721D0fEaFd78108
_amountToTrade: 1000000000000000000
_tokensOut: 1

Gas estimation errored with the following message (see below).

Hey

on remix when i try the "flashloan" function i get a :

Gas estimation failed
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
gas required exceeds allowance (8000029) or always failing transaction

what should i do ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.