Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction is not fully success #1

Open
tigermumu opened this issue Sep 20, 2020 · 3 comments
Open

Transaction is not fully success #1

tigermumu opened this issue Sep 20, 2020 · 3 comments

Comments

@tigermumu
Copy link

I copy this code and deployed it as your instruction. But transaction is not performed complete successfully, Tx information as this link : https://ropsten.etherscan.io/tx/0xdaf800d40de5a469f07f16f030a04c194f7aca099e7422876ea388580aed9aac

Why is it happened? Could you help me to make it clear ?

Thanks you.

@fifikobayashi
Copy link
Owner

fifikobayashi commented Sep 21, 2020

This means the arbitrage logic has failed in between acquiring and repaying the flashloan. Could be anything ranging from what you used as the Sushiswap Router02 address to the ERC20 you're using in this trade, or flashamount was less than amountToTrade...erc

To keep things simple try a fresh deployment to ropsten, with the following parameters:

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

  2. Send 0.2 ETH to your contract

  3. On execution:
    _flashAsset: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
    _flashAmount: 1000000000000000000
    _daiTokenAddress: 0xf80A32A835F79D7787E8a8ee5721D0fEaFd78108
    _amountToTrade: 1000000000000000000
    _tokensOut: 1

I tried it out just then and it worked fine.
https://ropsten.etherscan.io/tx/0x4c63d2230995782e006d3ca9dc9f011134c04a5c773387f8a603b8f23dd9b3a4

@tigermumu
Copy link
Author

tigermumu commented Sep 21, 2020

Yes, I redeployed a contract , repeat your process. It shows interesting result: 5 transactions , 3 are reverted, 2 are all success...
https://ropsten.etherscan.io/address/0x002951299cbd9a373cc9f8e96661858031d332b6

I think contract of uniswap or sushi in ropsten net might be not working reliably

I have deployed a contract again. https://ropsten.etherscan.io/address/0x5c10db9cba048620c10c1bc224e8f476fd706bd7. It is worked normally at first and second transact.
I found the new deployed contract could be worked completely twice. After that, it will shows reverted. May be it is effected by balance of contract ?

May be not....
I have been withdraw all balance in contract , and resend 0.2eth in this contract. But still not work.... Why it is just worked fine twice??

@StayFoolisj
Copy link

StayFoolisj commented Nov 18, 2020

I had a transaction "Success" but 2 executions were reverted. I followed @fifikobayashi instructions above precisely. I'm not finding any hints in the transaction log on etherscan nor the remix logs. The contract still have plenty of ether left. Tried 2 times with same result:

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

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

Mind having a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants