Nowadays, we are witnessing an increasing trend towards interconnected devices. This process of connecting devices instead of people is called the Internet of Things (IoT). The main concept of IoT is to connect heterogeneous objects separately and centrally in different places using standard protocols. The general idea is to create an independent world using intelligent objects that have the ability to exchange information and make decisions. Connected objects allow users to monitor and track remotely and in real-time. IoT relies on the development of a low-power, high-throughput network to support communication between objects and their connection to the Internet. These networks are characterized by limited resources in terms of energy, memory, and processing. In the true sense of the Internet of Things, networks called 6LoWPAN were created, and a new routing protocol compatible with these networks, called RPL, was introduced. Due to the limited nature of RPL-based networks, they may be exposed to a variety of internal attacks. Neighbor attacks and DIS are specific attacks in this protocol. This study proposes a trust-based RPL routing protocol which deals with blackhole threats. Besides, it is shown that while our recommended system is secure against blackhole attacks, it doesn’t incur any unwanted expenses in terms of network traffic.