Tariff
A tariff is called an optimal tariff if it's set to maximize the welfare of the country imposing the tariff. It is a tariff derived by the intersection between the "trade indifference curve" of that country and the offer curve of another country. In this case, the welfare of the other country grows worse simultaneously, thus the policy is a kind of "beggar thy neighbor policy". If the offer curve of the other country is a line through the origin point, the original country is in the "condition of a small country", so any tariff worsens the welfare of the original country.
Tariff
Trade deficits mean that consumers buy too much foreign goods and too few domestic products. According to Keynesian theory, trade deficits are harmful. Countries that import more than they export weaken their economies. As the trade deficit increases, unemployment or poverty increases and GDP slows down. And surplus countries getting richer at the expense of deficit countries. They destroy the production of their trading partners. John Maynard Keynes thought that surplus countries should be taxed to avoid trade imbalances. The tariff is used to equalize the trade balance in order to protect domestic workers. Peter Temin explain that "a tariff is an expansionary policy, like a devaluation as it diverts demand from foreign to home producers".