How are Clash of Clans multiplayer battles determined

Solution 1:

Matchmaking is based entirely on your Trophies.

Your level, Townhall level, and experience does not matter.

Source

Solution 2:

Trophies, not to mention that it's mainly determined by league such as bronze vs bronze but it can be any bronze from 1-3