Spies are equipped with iodine. To ensure that a spy is successful, the player must pay his spy more iodine tablets than are available in the target base. If you pay your spy enough iodine tablets, they will be used up. If the spy hasn’t been paid enough, the spy will be caught and the iodine tablets are lost.
If successful, a spy delivers a detailed report on the buildings (incl. upgrades), defensive units (incl. those from other bases), and stored resources. However, a spy will not see any troops currently not in the base, such as those on a mission.
In order to successfully stop a spy from spying on your base, you must have the same or more iodine tablets at the base than the spy has been paid. If this is the case, this amount of iodine tablets will be used up in capturing the spy. If there are not enough iodine tablets in the base, the spy will go undetected and you will not know about it.