A loco swap is between a miner and a refinery and they swap the gold or silver they have without physically shipping it. The two companies agree to swap a precious metal with one another in a different location.
To get a 99.5% pure 400 oz gold bar from a dore bar that is received from the miner, it has to go through a chlorine refining process known as the Miller process. The Miller process bubbles chlorine gas through the melted dore metal. This allows the gold to react with the chlorine to form gold chloride that then forms a slag on top of the molten precious metal. This process produces gold to a purity of 99.5% and is cast into 400 oz bars for the wholesale market.