China had long used silver ingots as a medium of exchange, along with the cast copper-alloy cash. The use of silver ingots can be traced back as far as the Han dynasty (206 BC–220 AD). But prior to the Song dynasty (960–1279), those silver ingots were used mainly for hoarding wealth. During the Song dynasty, for the first time in history the government became the sole issuer of paper currency after 1024, but cast coins and silver ingots were still used as a medium of exchange. In the Shanyuan Treaty, signed with the state of Liao in 1004, Song China agreed to pay an annual indemnity or tribute of 100,000 tael of silver and 200,000 bolts of silk. This was the first time bulk silver in tael (Chinese: 銀兩) was used as indemnity in a treaty with a foreign power. Silver ingots had a shape similar to a boat or a Chinese shoe during the Yuan dynasty (1279–1368). This became an ordinary shape for silver ingots during the following centuries.