Some codes, such as older Nokia and BlackBerry codes, can be calculated using an algorithm so those codes are very cheap; typically $1.00. Other codes are obtained by paying people that work inside various carriers, manufacturers, etc. who have access to the IMEI/Unlock Code databases to basically steal the codes. It is technically an unauthorized access and occasionally people get fired, but for the most part they are looking up so many legitimate codes anyway, they can slip in the requests for the unlockers and get away with it. Other databases, usually older but sometimes current data as well, the unlockers (wholesalers) have obtained the entire database through gray channels. When they have the database, codes are typically obtained instantaneously and that is why eBay sellers (resellers who buy codes from the wholesalers) can respond within one working hour of your purchasing the code. The cost of obtaining the code through their various channels determines the price you pay as a consumer. For example, AT&T codes are cheaper than T-Mobile codes, and LG codes are relatively cheap. While Sony Ericsson codes take up to a week or longer and are far more expensive than other codes. I got my G2X code for $2.99 off eBay and I am now using my phone in Thailand with no problems. I have purchased over ten unlock codes from various eBay resellers and they have worked every time, the first time I have entered them (I enter them very carefully to make sure I don't make a mistake). If you have a Galaxy S phone, the code can actually be obtained free by reading a file from the phone and extracting the unlock code from it.