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.
Bundeszollverwaltung
The Customs Service, as part of the "Finanzverwaltung" (fiscal administration), ensures the flow of revenue from federal trade tariffs and taxes (excise taxes—Branntwein taxes, electricity taxes, tobacco taxes, energy taxes, etc., including the beer tax, the revenues from which go to the German states), as well as revenues of the European Union (75% of all tariff income goes to the EU, 25% are retained to cover expenses and go to the federal government).