The Internet of Things (IoT) system is a concept that binds together multiple deployments of heterogenous distributed and decentralized systems. In such systems it is very hard to keep track of user data, enforce complex privacy policies, ensure safe data storage and sharing, as well as employ an efficient mechanism for process and resource management. Blockchain is a technology that emerged in 2008 with Bitcoin, and has proven to be effective in solving these problems. IoT applications are distributed by nature. Hence, distributed ledger technology (DLT) such as blockchain has the potential to play a significant role in how devices communicate in IoT. This paper will address these issues by introducing the high-level concept of blockchain as a service or BCaaS - a blockchain-based framework for internal and external collaboration throughout the IoT ecosystem. It will also discuss current problems with IoT and blockchain technologies integration, as well as how to overcome them.