Failed arbitrage on local host

I did follow the walkthrough on the video (https://youtu.be/YBm68v6oWXw) as explained. However, I am unable to spot any opportunities of arbitrage via local host. http://127.0.0.1:8000/ noting am logged into avalanche fuji test net.

My main challenge is on what addresses goes where on remix after deploying on below tabs.
Flashloan Demo

  1. Flashloan: Fields: assets address and amounts.
  2. setArbitrageContract: newArbitrageContract
  3. Withdraw: assetAddress

MockArbitrage

  1. Setting Required funds.
  2. Take arbitrage: Asset Address
  3. Transfer Owner : New owner address
  4. Withdraw. Asset address.

I have constantly tried several times but am not able to spot any opportunities of arbitrage under the local host portal.
I will greatly appreciate your assistance on the above.

Regards
Erick.

Did you create the mock arbitrage with the same wallet address as the logged-in wallet?

Yes I did. though I dint get any arbitrage.

I need some more details.
Can you point me at the video timeframe, at which step you are currently at, So I can narrow down to something that is missed.

Apologies for late reply, This is as from time stamp 42.50.

Few thing to double check.

  1. Did you add the correct arbitrage contract address in the logic.js file.
  2. While deploying the mock arbitrage smart contract what value did you enter for requiredFunds. This is important because the mock arbitrage will be successful only if the arbitrage value is greater that requiredFunds.

Response to your two questions above.
1.
i. Const arbitrage tokens: I put the token address provided under Avalanche Fuji for wavax this is under important information.
ii. const flashoanContractAddress. Here I did put my wallet address. (I suspect of been wrong here).
iii. const mockArbitrageAddress. Here I did put my wallet address. (I also suspect of been wrong here).

2
i. I did not have an arbitrage value to guid me on the funds to input as required funds since There was no arbitrage value indicated on the UI.

I hope I did answer you sufficiently, I do seek your guidance.
Thank you in anticipation.

These should be the contract addresses. After deploying the smart contract you will get an address for that smart contract. Those need to be added here in `logic.jsโ€™ file.

Hi. John.

Kindly disregard an inbox I send to you ealier.

Progress made having made changes based on your advise above. I did get to create a mock arbitrage and this was displayed on the UI. However the flashloan dinโ€™t execute having added the flashloan contract address in Logic.js.

The arbitrage amount was 2 WAVAX and a required amount of 15. However, the flashloan of 15 dinโ€™t execute even after putting the required funds of 15000000000000000000 gwei under required funds tab in mockarbitrage in remix.

While deploying flashloan contract did you add addressProvider and arbitrageContract details.

Yes I did add the two addresses.

after adding the required funds to 15000000000000000000, did it get updated on the UI?

after this step, did you deposit avax in the liquidity pool to get liquidity.

There should be no problem if you followed the video, the instructor deposited 15 test tokens because he didnโ€™t have much in his wallet and also adjusted the required token in remix. But my question is how do one integrate this tutorial to a real life scenario?

Hey John.

I did manage to create the mock arbitrage and take arbitrage. Thanks alot for your guidance.

1 Like

@ Bigdans, am thinking, you would have to put in moralis mainnet details into Logic.js alongside flashloan contract and mockarbitrage contract.

Do you mind replying with your logic.js code? Thank you.