Submitted by BondiPestControl, also found by 0xf15ers, berndartmueller, cccz, csanuragjain, dipp, GimelSec, hake, horsefacts, IllIllI, jayjonah8, m9800, MadWookie, MiloTruck, pedroais, Ruhum, throttle, and VAD37
It is possible for a user purchasing an option to accidentally overpay the premium during buyOption().
Any excess funds paid for in excess of the premium will be transferred to the vault creator.
The premium is fixed at the time the vault is first created by vault.premiumIndex. Hence there is no need to allow users to overpay since there will be no benefit.
buyOption() allows msg.value > premium
Consider modifying the check such that the msg.value is exactly equal to the premuim. e.g.
outdoteth (Cally) confirmed and resolved:
HardlyDifficult (judge) commented:
HickupHH3 (warden) commented:
