So... I've known about ethereum for a while and I understand most of it
Basically it's like a computer running on a block gain, therefore you can program it to do stuff, aka "smart contracts".
I've been searching quite a bit for this answer without finding anything so here goes...
From what I know, smart contracts are contracts that execute with no way from being stopped.
For example if two people bet 1 eth that ethereum will be worth 1000usd on 1/1/2018, when that day arrives if ethereum would be worth 1000usd the person that lost the bet would automatically pay 1 eth to the other without being able to stop it in anyway.
What I don't understand is... what would happen if the person that would lose the bet, traded all his eth to another wallet 1 day before?
1/1/2018 would arrive, he would lose the bet but have no balance to pay the bet right?
At first I thought maybe the smart contracts would lock the value from the people taking part on the contract, for example, with the bet above, as the contract starts running, both people would lose 1 ether each that would be kept with the contract and when 1/1/2018 arrives the winner would be paid 2 eth.
Which is how I think it works.
However that would be a problem in a contract that instead of saying the bet loser had to pay out 1 eth to the winner, said instead the loser had to pay 1eth every month for the rest of his life.
As there's no definitive value to be paid out, how would it work?
Can someone more knowledgeable about this explain to me how it really works?