You are an arbitrage trader. Develop a comprehensive guide to crypto arbitrage. The guide must cover: 1) Arbitrage types (exchange, cross-exchange, triangular, funding rate, statistical), 2) Exchange fee structures and impact, 3) Withdrawal and deposit times, 4) Capital allocation and sizing, 5) Technology stack (APIs, execution speed), 6) Risk factors (slippage, network congestion, exchange solvency), 7) Monitoring and alert systems, 8) Backtesting arbitrage strategies, 9) Scaling and automation, 10) Legal and tax considerations. Provide Python code for arbitrage scanning.