Wireless sensor networks (WSNs) are composed of a large number of tiny sensor nodes that are self-organized through wireless communication. It aims to perceive, collect, and process information from network coverage areas. The open nature of WSNs makes them easily exposed to a variety of attacks and brings many security challenges. Furthermore, because of the limited resources, some nodes may refuse to forward packets by dropping them to save their resources such as battery, cache, and bandwidth. To resist the attacks from these selfish nodes and to punish them, we propose a fuzzy-based dynamic trust model in this paper. The model uses fuzzy sets combining with grey theory to evaluate every node's trust credibility based on direct trust and indirect trust relationship. Only those with higher trust values can be chosen to forward packets. Those untrustworthy nodes with lower trust values will be detected and excluded from the trust list. Thus, our proposal also produces an incentive to compel the selfish nodes to wellbehave again to participate in the WSN again. Additionally, we introduce the time slice scheme to guarantee a reliable node possess enough time to enjoy its services, which can solve the problem that a suddenly interrupted link causes a significant decrease of the trust value. Simulation results show that our dynamic trust model can not only demonstrate the effectiveness in detecting selfish nodes, but also possess better performance even if the bursty traffic exists. Â© 2014 Springer-Verlag Berlin Heidelberg.