This article explores the deal structure of initial coin offering (the "ICO") and the relevant legal issues. It first identifies the four related underlying technologies: public-key cryptography, blockchain, smart contract and cryptocurrency and then analyzes the structure and mechanism of ICO. Based on the above, this articles further discusses whether the tokens issued in the ICO constitute securities that should be subject to securities regulations as well as other legal issues such as how to decide a ICO's governing law, what is the court that has jurisdiction over a ICO, the proper dispute resolution mechanism, the items that should be disclosed in a ICO and the scrutiny of the relevant players, as well as the relationship between the ICO and crowdfunding.