## Verifying the key_images set

In Monero, double-spending is prevented by not allowing the same key_image to be spent twice and by verifying that every key_image belongs to the prime subgroup. Therefore, the set of spendable outputs has to have unique members verifying the equation $Ki * Scalar(l) = 0$, where $Ki$ is the key_image and $l$ is the prime number $l = 2^{252} + 27742317777372353535851937790883648493 $ which represents the order of the curve.

Up to now, I have not found any doubled key_image and all of them are in the prime subgroup. Therefore, Monero is perfectly doing what it is supposed to do. You can find the source codes in Python to run this check yourself in the Resources section.

However, Monero has room for a lot of improvements still. One example is this discussion here.