Closed tranbert78 closed 2 years ago
The gas fees are paid from the wallet in .env file. The contract doesn't need to pay transaction fees because they are paid by the user executing the transaction.
The gas issue error message just means the transaction will fail or revert.
This is usually caused because of a bad router address or token contract address. Check the checksums (capitalisation) of these addresses and put them in a block explorer to double check it's right for the network you want to work on.
Hi James Thanks you so much for providing this video for everyone, it's as if I've gained 12 months of experience in just 3 nights, thanks to this particular video ! I haven't made any changes to the code, but I agree to close the issue. it's up to each person to individually solve the potential remaining defects, to deserve the bps, and to keep the opportunity worth something...
Thanks for the feedback.
There are some past issues here that might help too.
https://github.com/jamesbachini/DEX-Arbitrage/issues/20
Hi James Thanks for this feedback. I can confirm that gas can be taken from my account, so there is no need to supply FTM (gas) by depositing WFTM to the contract.
Dual trades are systematically blocked on Fantom with a gas issue message (cf. attachement)
Workarround proposals: 1)I suspect it could be because of current fund.js : 100% WFTM are transferred to arbContract to be used Wrapped, however we should try to to unwrap some of them through a deposit to arbContract (not a transfer) to serve as gas fee directly from the arbContract, to try to prevent dual trade being blocked... I did not have the time to read this thorrowly https://ethereum.stackexchange.com/questions/131545/wftm-swap-transaction-always-fails, but it seems to answer the same issue and to propose a detailed solution to 1)
2)If the assumption given in 1) is wrong the alternative is to split the funds 50/50 between the wallet and the arbContract and to temporarily perform all trades directly from the wallet the time to solve the dual trade failure, while keeping everything else performed on arbContract (route search and trade estimates). Once the dual trade failure is solved we can perform everything back from the arbContract. Making dualTradeErrorShort.txt