Secure digital payments are essential for e-commerce and cybersecurity. Cryptocurrencies, which are virtual currencies designed using cryptographic principles, are well suited for digital payments but face several hurdles to adoption for legitimate e-commerce. The hurdles include (1) poor software security that has led to very high rates of theft and closures of services, (2) users may be deanonymized, negating the putative privacy benefits and (3) there are concerns over long-term stability, either due to inherent flaws in the mechanism used to incentivize participants or due to the ability of adversaries to subvert this mechanism. This project designs and implements security and anonymity improvements for existing cryptocurrencies that are immediately and incrementally deployable, and develops a framework to analyze the behavior of participants of cryptocurrencies. This framework will be used both to understand and predict the behavior of the current system as well as to explore alternative, more resilient designs. The main challenge for research on cryptocurrencies is that these systems rely on an intricate interplay of three main components: cryptography, distributed systems, and incentive driven behavior. Accordingly, the project develops tools and techniques in all three categories and seek to find novel ways to unify and apply these tools in combination. Successful completion of the project will lead to a cryptocurrency that is robust against adversaries, paving the way for a secure, private, and stable payment system, which has long been a research goal in computer science.