Unfortunately this smart contract seems not be useful and it's function is very limited. It can be used to bet if the results are come from the Bitcoin blockchain aka internal data, you can't bet if the results are from external data like betting on sports etc.
This is incorrect. The BTC/USD price I mentioned in my example is not an on-chain element, but would be extracted from the data of an exchange.
Basically the "bets" can involve any data two parties agree on 1) the data source (in our example, it may be Binance or Kraken for example) and 2) the Oracle. So it can also be sports, election results and any other data. The Oracle of course must support the type of data and the source the parties use. So the challenge is to find a suitable and trustable Oracle.
Regarding
usefulness, the DLCFD (Discreet Log Contract-for-difference) is useful, for example, if you have:
1) one party that needs to ensure the value of an amount of
BTC doesn't go lower than a certain price - they want their Bitcoin investment to stay stable at least. This can be a person who wants to ensure that at least a part of their Bitcoins holds their value. The use case is similar to a put option.
2) one party wanting to leverage a long position, i.e. profit in a higher proportion from a price increase.
The DLCFD allows the parties (let's again go with Alice and Bob) to agree on a contract where each party contribute 1 BTC when the value is at $60000, and Alice (it could be called a "conservative short" position) always receives the value of $60000, in Bitcoin, while Bob (the "leveraged long" position) receives the rest. The outcome is then as following:
1) If the price goes above $60000 at the deadline of the contract, then Alice receives less than 1 BTC but always the value of $60000, while Bob receives more than 1 BTC (and thus more than 60000), which means he's making profit.
2) If the price goes below $60000 at the deadline, then Alice receives more than 1 BTC but still always the value of $60000, while Bob receives less than 1 BTC, and thus is at loss.
3) If the price goes to $30000, Alice receives the whole value of the contract (because 2 BTC are now worth 60000), and Bob doesn't get nothing.
4) If the price goes below $30000, Alice receives the whole value of the contract, but it's now worth less than 60000. This is an additional risk for the short position in DLCFDs, in comparison to "normal" CFDs, where Bob would have to provide always $60000 for Alice. However, normally this outcome is unlikely, at least for contracts over short timeframes.
DLCFDs of course could also be done involving stablecoins, although there seem to be currently few stablecoins on the Bitcoin blockchain, and on Ethereum other contracts are more useful for this use case.
As DLCFDs are more risky for the long position (Bob), who can lose everything (cases 3/4 above) Bob could probably in most market situations demand the payment of a premium as it occurs with put options.
For people who care about the fee they pays will not use this since the transaction will be made automatically even though the mempool is congested.
DLCs can also be entered and settled via Lightning Network, so the fees are not necessarily an issue.
Here's the original whitepaper of DLCs:
https://adiabat.github.io/dlc.pdf