Matchmaking is not based on trophy also not based on raid defense, but based on best 30 heroes.
- The best 30 heroes in hero roster of each Alliance member opted in for war
- Out of the 30 heroes, the most weight is put on the best five heroes of each Alliance member
- Player count of the Alliance (also subtracting those who have opted out) - they try to get an even number of players on both sides, but it can vary by up to three members.
- The troop strength of the best in each element
- War history (minor impact compared to Hero Power)
Source: