Merging troops is a specials server feature available since 2017 special, Fire and Sand. It allows you to combine troops from different villages into one large army, but it comes with a cost in resources or Gold. Troops that are merged are subsequently treated exactly as if they were trained in their new home village; this includes the upgrades in the Smithy.
You need to do the following:
The merging costs depend on the army that is being merged. The costs are equal to twice the cost of recruiting that army. You can use Gold instead; the cost is calculated by dividing the resource costs by 40,000 and rounding the result up.
Example: You want to merge 1,000 Clubswingers. 1 unit cost 95 75 40 40 to recruit. Altogether, it is 250 resources. The total merging cost will be 250 x 1,000 x 2 = 500,000 ( 190,000, 150,000, 80,000, 80,000). You may pay in Gold instead, which will cost: 500,000 / 40,000 = 13 Gold.
Gold Usage for troop merge is restricted to 50 gold per village per day.
Merging troops with resources remains unrestricted. The gold limit threshold is reset daily at the same time as the daily quest reset.