A significant use of Ethereum that has captured public attention involves financial agreements and derivatives. Even though financial derivatives have gained notoriety as a perilous and destabilizing tool primarily aimed at enriching speculators, the core idea has several valid applications, some of which assist individuals in safeguarding against fluctuations in financial markets.
The central concept is referred to as “hedging,” which is best described through the example of Bitcoin, where typical enterprises and individuals, who wish to avoid substantial risks, often find themselves compelled to interact with significant amounts of a volatile asset (BTC). The process of hedging operates as follows. Imagine Jane, a business owner receiving Bitcoin as payment and utilizing it to compensate her staff. On average, she anticipates needing to retain 100 BTC at all times. At times, this quantity may fluctuate; it could be 20 BTC or it could rise to 160 BTC. However, she is certainly not pleased with the idea of witnessing her BTC plunge by 23% in value in a single day, resulting in the loss of several months’ worth of wages. Presently, the typical solution entails Jane configuring her business to receive payments through BitPay or Coinbase, incurring a 1% fee to instantly convert the bitcoins into cash in her bank account. When she wishes to disburse BTC, she must repurchase the bitcoins and transfer them out, incurring another 1% fee (or even more).
Hedging offers an alternative solution. Rather than perpetually trading BTC back and forth, Jane sets up an account on a derivatives trading platform and enters into a contract for difference. Within this CFD, Jane consents to invest 4500 regarding her bitcoins, while gaining $4500 in the CFD. Naturally, the funds do not appear from thin air; on the opposite end of the agreement is a speculator, wagering that the BTC price will rise. If it does, Jane will see a gain in her BTC valuation but will incur a loss in the CFD, whilst the speculator would profit from the CFD. 100 per dollar. Consequently, ifthe worth of a single bitcoin dwindles by 20000 plus
With this basic element in mind, Jane has three approaches to manage risk:
- She can maintain the CFD at $100 to $1 indefinitely, and should her exposure deviate, she can accept that reduced risk.
- Jane can utilize a bot to consistently adjust the CFD according to her available BTC, incurring some expenses for this but significantly less than with Bitpay and Coinbase.
- Owing to the unique nature of Ethereum contracts, she can create a CFD that autonomously monitors her account balance and readjusts itself to her balance, compelling the speculator to bear whatever exposure she requires (within certain limits), while the speculator participates in numerous such contracts to balance their exposure.
So how do we execute CFDs? In Ethereum, it’s straightforward; simply draft a contract to fulfill your needs. Here, I present a tailored variant of a CFD that I am referring to as a “hedging contract”, which serves as a pure self-sufficient store of value: you deposit 1000 ether and receive the equivalent USD value of ether in return (unless the ether value declines significantly, rendering the entire contract insufficient to protect you, in which case you acquire the right to withdraw everything immediately and enter a new hedging contract):
if contract.storage[1000] == 0:
if tx.value storage(D)[I]
contract.storage[1002] = block.timestamp + 30 * 86400
contract.storage[1003] = tx.sender
else:
ethervalue = contract.storage[1001] / block.contractstorage(D)[I]
if ethervalue >= 5000:
mktx(contract.storage[1003],5000 * 10^18,0,0)
else if block.timestamp > contract.storage[1002]:
mktx(contract.storage[1003],ethervalue _ 10^18,0,0)
mktx(A,(5000 – ethervalue) _ 10^18,0,0)
If you grasp ETH-HLL, you can decipher that sample, and if it’s beyond your comprehension, it essentially performs as described (the speculator initiates the contract with 4000 ETH, the counterparty invests 1000 ETH into it, and there’s an expiration date 30 days later during which anyone may “ping” the contract to retrieve $x worth of ETH for the counterparty and the remainder to the speculator). We will soon provide enhanced ETH-HLL tutorials, but for now, detailed comprehension of the contract’s intricacies isn’t essential.
Nonetheless, all of this constitutes a dilemma: it necessitates a trusted source to retrieve the ETH/USD price. This issue is far less critical than the alternative method, which involves relying on trust to create USD-pegged cryptographic assets since it demands substantially less infrastructure and the motive to deceive is considerably reduced, yet from a cryptographic purist viewpoint, it isn’t flawless. The core issue is this: cryptography alone cannot ascertain much about the external world. You can understand some aspects of computational prowess through proof of work, and attain some market information between one crypto-asset and another through an on-chain market, but ultimately there is no variable in mathematical formulas for something as simple as the temperature in Berlin. There’s no inherent capability in cryptography to inform you whether the accurate measurement is 11′C, 17′C, or 2725′C; human judgement is required for that (or thermometers, but then you need human discretion to assess which thermometers are reliable).
Schelling time
Here, I introduce a system that enables you to establish a decentralized data feed. The economic principles of it are not ideal, and if large-scale collusions are feasible, it might falter, but it’s likely the most effective solution we can achieve. In this scenario, we will consider the ETH/USD price as an example; other metrics like the temperature in Berlin, global GDP, or outcomes from computations lacking efficient verifiability can also be used.
The system is built on a concept known as Schelling points. Its operation is as follows: imagine you and another prisoner are confined in separate cells, and the guards provide you both with two identical slips of paper containing a handful of numbers. If both of you select the same number, you will be freed; otherwise, due to the disregard for human rights in the realm of game theory, you will be sentenced to solitary confinement for the rest of your lives. The numbers presented are:
14237 59049 76241 81259 90215 100000 132156 157604
Which number will you choose? In theory, these are random figures, and selecting perhaps one will give you a 1/8 probability of both choosing the same one and escaping incarceration. However, in reality, the odds are considerably higher since the majority of people opt for 100000. Why 100000? Because each prisoner thinks that the number 100000 is in some way “special”, and believes that the other prisoner shares this belief, and this reasoning continues infinitely in a recursive manner – a case ofcommon knowledge. Thus, every prisoner, presuming the other will likely select 100000, will choose 100000 for themselves. Clearly, this is an endlessly recursive logic chain with no ultimate “foundation” except itself, but cryptocurrency participants engaging with this article should be comfortably very familiarwith depending on such principles.
This system is how SchellingCoin operates. The fundamental protocol is outlined as follows:
-
In an even-numbered block, all participants are permitted to submit a hash of the ETH/USD price along with their Ethereum address
-
In the subsequent block, users can submit the value for which they provided the hash in the prior block.
-
Designate the “correctly submitted values” as all values N where H(N+ADDR) was provided in the first block and N was presented in the second block, with both messages being signed/sent by the account with address ADDR, and ADDR is among the permitted participants in the network.
-
Organize the correctly submitted values (if multiple values are identical, apply a secondary sort by H(N+PREVHASH+ADDR) where PREVHASH is the hash of the last block)
-
Any user who submitted a correctly submitted value between the 25th and 75th percentile receives a reward of N tokens (which we’ll refer to as “schells”)
The protocol does not comprise a dedicated mechanism for thwarting sybil attacks; it assumes that proof of work, proof of stake, or another analogous solution will be applied.
So, what is the rationale behind its effectiveness? In essence, it mirrors why the previous prisoner scenario functioned; the truth is arguably the most substantial Schelling point available. Individuals are inclined to provide the accurate answer since they anticipate that everyone else will do the same, and the protocol motivates everyone to conform to what others submit. Law enforcement agencies have utilized SchellingCoin for generations, placing detainees in separate rooms and requesting their accounts of a specified incident, relying on the notion that it’s simple to be consistent with many others if you speak the truth, yet nearly impossible to collude on any particular falsehood.
Challenges and Constraints
What are the weaknesses? In general, collusion attempts. Most straightforwardly, if any party commands over 50% of all votes, they can essentially unilaterally establish the median to whatever they desire. Conversely, if there exists an almost infinite number of discrete non-communicating entities, then each singular entity has virtually no influence on the outcome; realistically, numerous entities will report the exact same value, so there won’t even be an opportunity to slightly modify the result by voting incorrectly.
Nevertheless, the situation becomes ambiguous in between. If a single entity controls 49% of the votes, they can all pre-announce that they will cast their vote for a false value, leading others to align with that value out of fear that everyone else will, and if they do not, they may be left out. Yet, here’s the intriguing aspect: even if one entity commands just 1% of the votes, if that entity pre-announces a false value they intend to vote for and declares that they will provide 0.00001 schells to anyone who votes for that value, we now have two Schelling points: the truth and the entity’s value. However, the entity’s value incorporates an incentive to vote for it, making that Schelling point theoretically superior and compelling everyone to pursue it instead.
In practice, though, this is evidently nonsensical, akin to the well-known outcome in a prisoner’s dilemma, where with a predetermined finite number of rounds, the optimal strategy is to cheat in every round; the rationale is that in the final round, there’s no scope to punish cheating, so the incentive is to cheat, and in the second to last round, both players recognize that the other will cheat in the next round for that reason, leading to a recursive incentive to cheat from the first round onwards. In reality, individuals are not capable of processing recursion of arbitrary depth, and in this scenario, there exists a significant coordination challenge in dethroning the dominant Schelling point, which is exacerbated by the fact that everyone benefiting from SchellingCoin has a motive to suppress any attempts to disrupt it. Consequently, a 49% coalition is likely to be able to breach SchellingCoin, while a 1% coalition will not. Where lies the compromise? Perhaps only time will reveal that.
Another potential issue is micro-cheating. If the underlying datum is a value that frequently experiences minor fluctuations, as is the case with prices, then if most participants in the SchellingCoin are concurrently involved in a system utilizing that SchellingCoin, they may be incentivized to slightly adjust their answers in one direction, aiming to stay within the 25/75 boundary while also nudging the median up (or down) marginally for their gain. Other users will anticipate micro-disruption and will consequently adjust their answers in that direction to try to remain within the median. Thus, if individuals believe micro-cheating is feasible, it may well be possible, and if they do not, then it won’t be – a commonplace outcome in Schelling point frameworks.
There are two approaches to tackling this issue. Firstly, we can endeavor to define the value very clearly – for instance, “the last ask price of ETH/USD on exchange XYZ at a specific time HH:MM:00,” ensuring that a significant portion of responses are identical, thereby eliminating the possibility of adjusting the median through micro-cheating. However, this leads to centralization in the definition, necessitating careful management. An alternative is to maintain a coarse granularity, defining “the price of ETH/USD rounded to two significant digits.” Secondly, we can simply exert effort to ensure the underlying system for selecting users is bias-resistant, prioritizing decentralization (i.e., proof-of-stake over proof-of-work) and including users who are likely to have opposing incentives.
Therefore, if we merge SchellingCoin with contracts for difference, we create a cryptographic asset that I have previously recognized as a holy grail of cryptocurrency: an asset that maintains a stable value while being simultaneously trust-free. Trust-free is undoubtedly a comparative term; given the contemporary distribution of mining pools, Bitcoin’s “trust-free” voting is far from entirely devoid of any trust, yet the challenge lies in ensuring the protocol is as decentralized and resilient to future risks as possible. Numerous such “holy grails” may never be achieved perfectly; even those we presume we have attained often remain out of reach (e.g., decentralized resistance to sybil attacks), but each step toward the ultimate aim matters.
Mining for Schells
What makes SchellingCoin fascinating is its applicability beyond mere price feeds. SchellingCoin can provide the temperature in Berlin, the global GDP, or, most notably, the outcome of a computation. Certain computations can be verified efficiently; for instance, if I sought a number N such that the lasttwelve digits of 3N are 737543007707, which is challenging to calculate, but once you submit the value, it’s quite straightforward for a contract or mining algorithm to validate it and automatically dispense a reward. Conversely, other calculations cannot be efficiently authenticated, and a majority of practical computations belong to this latter group. SchellingCoin offers a method of utilizing the network as a genuine distributed cloud computing framework by distributing the workload among N participants instead of every machine in the network and rewarding solely those who deliver the most prevalent outcome.
To enhance efficiency, a more complex multi-step procedure can enable one node to perform the computation and utilize SchellingCoin to “spot-check” just a random 1% of the tasks, potentially resulting in less than 2x cryptographic overhead. A deposit mandate and stringent consequences for providing an answer that ultimately fails to withstand review can be employed to curtail fraud, and another choice is to allow anyone to redo the task and “suggest” a verification index to the network to invoke SchellingCoin if they identify any discrepancies.
The protocol outlined above is not an original concept; as I previously stated, it is merely an expansion of a historical criminal investigation technique, and indeed Bitcoin’s mining algorithm essentially functions as a SchellingCoin in terms of transactions. However, the concept can potentially be developed much further, as long as the issues are proved to be manageable. SchellingCoin for ETH/USD can be utilized to create a decentralized dollar; SchellingCoin for computations can be employed to deliver distributed AWS (albeit without privacy, but we can wait for effective obfuscation for that).
Acknowledgements:
- Neal Koblitz, for proposing the idea of using a spot checking repeated computation method to provide a “valuable proof of work”
- David Friedman, for familiarizing me with the notion of Schelling points in his “positive account of property rights”
- Thomas Schelling, for originating the idea in the first place
- An individual I consulted two months prior whose identity I regrettably forgot for suggesting the incorporation of Schelling schemes into Ethereum