Abstract—In-network storage of data in wireless sensor networks contributes to reduce the communications inside the network and to favor data aggregation. In this paper, we consider the use of erasure codes in combination to in-network storage. de an abstract model of in-network storage to show how erasure codes can be used, and we discuss how this can be achieved in two cases of study. We also define a model aimed at evaluating the probability of correct data encoding and decoding, and we exploit this model and simulations to show how the parameters of the erasure code and the network should be configured in order to achieve correct data coding and decoding with high probability even in presence of sensors faults.