Context initialization
Before starting the arbitrage, the module records the user's initial balances in the PDA account.
Arbitrage execution
All swaps, transfers (tips), flashloans and other instructions are executed. You can take a FlashLoan of even 5000 SOL, set a processor tip of even 1 SOL — you don't need to recalculate the minimum profit each time.
At the end, the balances “before” and “after” are compared.
If the final balance is less than the initial one — the transaction is marked as unsuccessful.