This paper presents DEDA, a distributed algorithm designed for the early detection of topology attacks in Internet of Things (IoT) systems, addressing critical security concerns associated with data integrity in various applications. The algorithm utilizes predictive descriptor tables to effectively analyze and detect attacks, with performance evaluated through simulations in OMNeT++. Results indicate that the proposed method can detect attacks in a timely manner, enhancing the security of IoT networks, particularly against vulnerabilities in Routing Protocol for Low-Power and Lossy Networks (RPL).