I was thinking about it, I think I've already seen a lottery, but I don't think its smart contract based