In loose terms, a blockchain is a decentralized ledger that records information across a network of computers and aims to preserve its accuracy and integrity without the appeal to a central authority. On the other hand, a smart contract is a self-executing contract with machine-encoded terms of the agreement. Smart contracts run on a blockchain network, utilizing its framework to execute and record contractual actions without the need for a central authority. This paper is an exploration of the functional and security aspects of blockchains, and more specifically, smart contracts. I wrote this as part of a project assigment.