Double Spending

This is my submission for Swift Student Challenge – WWDC2021. This playgrounds aims to teach you basics of Double Spending Attack. This submission was selected as a winner.

Swift XCode Pods Swift Swift Moya


It’s been 38 years since David Chaum first introduced the idea of digital currency but even today, a lot of people find its working mysterious. The first cryptocurrency, Bitcoin was introduced in 2009 (just a little more than a decade ago). This year, a greater interest has been seen in cryptocurrencies due to their rising evaluation. Hence, this playground aims to teach about one major challenge all digital currencies face, i.e. the Double Spending Attack. We examine this using the concept of Goofy and Scrooge Coins. I had recently studied this concept as a part of my university curriculum and this concept was easy to grasp yet had a large impact on my understanding of cryptocurrencies. Hence, I built this playground to share my love for Disney, Cryptocurrencies and Coding.

Steps to Run

  1. Download the Swift Playgrounds App for macOS 11.2.3
  2. Clone this repository
  3. Open the playground using Swift Playgrounds

About this Playground

This is an informative playground that tries to teach you about Double Spending Attack and the need for P2P networks in cryptocurrencies. Some screenshots from the playground:

Goofy Coins

Introduction to Goofy Coins Goofy2 Goofy3

Paying with Goofy Coins

Scrooge Coins

Introduction to Scrooge Coins

Screenshot 2021-06-02 at 2 29 41 AM


Checkout the license here


Checkout the credits here