Bank

Overview
Banks are extremely useful because they allow you to exchange at much higher rate then the '/resident exchange' command. The level of the bank governs the rate of exchange. Banks can be upgraded 10 times to reach the max exchange rate of 200% actual ore value. The Starting town Bank is level 1 and will exchange at a 40% rate. So if you were to exchange 1 gold ingot you would receive 80 Coins because 40% of the gold ingot's value(200 Coins) is 80 coins.
Player created town banks are costly town improvements that can be upgraded, but if you are not a member of that town the bank will require a minimum of 5% non membership fee. For example if you were to exchange 1 gold ingot at a Level 1 player created town bank that you were not a member of, you would only get 70 coins due to the 5% non member ship fee, however if you were a member you would receive the full 40% exchange rate. All Bank fees collected go directly to that banks town treasury. Because of this being mayor of a town with a high level bank can be very profitable.
Player created town banks can be affected by certain Trade Good buffs  specifically Greed and Barter. Obtaining this resource can be a boon both early on and late game.
Functions
Exchange
The bank has the ability to exchange iron, gold, and diamonds for coins. To use the bank, simply click on the sign you wish to use. The base exchange rate at which your items are exchanged are dependent on the bank's level and any non town member resident fees that may apply.
Bank Level  Iron  Gold  Diamond  Emerald  Upgrade Cost  Tech Required 

1 40%  8 coins  80 coins  160 coins  200 coins  Free  Religion 
2 50%  10 coins  100 coins  200 coins  250 coins  4,000 coins  Code of Laws 
3 60%  12 coins  120 coins  240 coins  300 coins  6,000 coins  Writing 
4 70%  14 coins  140 coins  280 coins  350 coins  12,000 coins  Monarchy 
5 80%  16 coins  160 coins  320 coins  400 coins  14,000 coins  Currency 
6 90%  18 coins  180 coins  360 coins  450 coins  16,000 coins  Economics 
7 100%  20 coins  200 coins  400 coins  500 coins  18,000 coins  Nationalism 
8 120%  24 coins  240 coins  480 coins  600 coins  20,000 coins  Construction 
9 150%  30 coins  300 coins  600 coins  750 coins  22,000 coins  Innovation 
10 200%  40 coins  400 coins  800 coins  1000 coins  24,000 coins  Scientific Method 
Note that the Barter trade good buff increases your exchange rate by 5% of the base rate, and that Barter is stackable. In other words, if your normal exchange rate is 80% and your town has one trade good with Barter, your exchange rate will actually be 85%. If you have two trade goods with barter, your exchange rate will be 90%!
The modified exchange rate is calculated as follows:
Exchange rate = Base Exchange Rate * [ 1 + (0.05* (# of Barter buffs)) ]
Some towns appear to have their bank signs changed when Barter buffs are applied; other towns may not see the modified exchange rate, but they will receive the additional funds whenever items are exchanged. Be sure to test for yourself that Barter is working as expected for your town, especially if the modified exchange rate is not displayed on the bank signs.
Bank Commands
Upgrade your bank with  /town upgrade buy Bank level (x)
Upgrade you bank interest level with  /town upgrade buy Bank Interest level (x)
Change bank tax charged to nonresidents  /town set bankfee (%)
Interest Mechanics
In addition to upgrades for the bank exchange rate, a different set of upgrades is available that will grant your town interest every 24 hours on the coins held in the town treasury. These upgrades are available in four increments:
Bank Interest Level  Cost  Daily Interest Rate  Tech Required 

1 (Bank does NOT start with the upgrade)  2,000 coins  0.75%  Writing 
2  4,000 coins  1%  Currency 
3  8,000 coins  1.5%  Nationalism 
4  16,000 coins  2.5%  Innovation 
The interest earned daily is calculated based on the "Principal" amount listed in town info. It is simple interest, compounded daily.
Interest Earned = Principal * Rate
Your town's principal is determined by the smallest amount of coins in the town treasury over the previous 24 hours. In essence, when upkeep ticks, your town will be granted interest based on the smallest principal since upkeep ticked the previous day.
This is an important concept, because delaying a series of big purchases or an expensive research project until after the current day's upkeep tick will net you a larger interest payout!