On oracle reliability

Terra’s stability mechanism, and indeed the very creation of its eponymous stable-coins, are predicated on bringing real-time, reliable exchange rates of luna with various supported fiat currencies. Currently an oracle rate is “activated” on-chain when in each VotePeriod (approx. 1.2 mins) more than 50% of validating power submits a vote on a particular exchange rate.

Problem is, incentives are not always set up to ensure reliable oracle voting (i.e. less than 50% of oracles may be voting on exchange rates).

  • Given that rewards for voting “correctly” on any given VotePeriod is dependent on the sum of swap spread fees that were paid in the same period, validators may be incentivized to stop submitting oracle price vote transactions (and incurring the attendant fees) if they predict a low volume of swaps. This can come from Terra consistently trading close to the peg, which eliminates on-chain arbitrage opportunities (and thereby reduces incentives to perform swaps).
  • In some sense, tying oracle participation rewards to swap fees produces incentives to vote dishonestly. Swaps increase if Terra arb opportunities arise, which is likely to be produced if Terra’s on-chain rate diverges significantly from its open market rate.
  • Rewarding votes in a tight band around the elected median encourages the formulation of cartels, and centralization of data feeds (in some sense, worse)

To solve the above problems, I propose the following solution:

  • Add a slashing condition for low availability on oracle votes: Validators missing more than 95% of the recent 1000 votes get slashed 0.1% of their stake. Missing here is defined as more than 95% of votes straying outside of the elected median, or no votes submitted.
  • Decouple validator rewards from swap fees: validators get paid swap fees from an average of the previous 1000 voteperiods. More simply put, swap fees from every vote period gets submitted to a global swap fee pool, and 1/1000th of the pool gets doled out as rewards at the end of every voteperiod.

What do you think?

I agree with all of the concerns you raise here @dokwon. I see significant risk in rewarding oracle voting with swap fees. Also agree with your first suggestion – penalizing low oracle participation is a good idea. A couple of thoughts about using the spread as a reward in general though:

  1. I think that rewarding validators with the swap spread can create perverse incentives (like the ones you mention above) regardless of whether or not the reward is tied to oracle participation. Insofar as validators get rewarded more for a bigger spread, I think there will be situations where it will be profitable to misreport prices, manipulate the spread or otherwise act adversarially.
  2. On a more basic level, spread rewards could be seen as a form of inflation that dilutes non-validators, which may be (arguably) an undesirable outcome. The primary reason for introducing a spread is to reduce exposure of Luna holders to Terra price fluctuations. For example, when the protocol buys Terra 5% below the peg Luna suffers less dilution, which in a scenario of plummeting demand may be a crucial defense measure. Therefore the spread by default benefits all Luna holders. Paying it explicitly in the form of a fee to validators (instead of burning it) penalizes non-validators/delegators with dilution. At times of plummeting demand I think this can be dangerous and may adversely affect Luna’s market price, especially if people are reluctant to give up liquidity by staking.


I agree

Yeah, in retrospect using swap fees to reward oracles is likely not optimal and can have rather strange side-effects. I do think that burning tokens has a much indirect impact on Luna holders compared to increasing staking rewards.

Oracle rewards must motivate validators to submit votes honestly and reliably. Think to some extent slashing dishonesty and downtime can ensure both, but don’t think we are at this level of validator participation yet. Can we think of an incentive mechanism that can hold us out on the interim?

Taking away carrots is never fun. I agree that direct rewards have a greater immediate impact, partly for psychological reasons. Crypto markets seem not nearly efficient enough to price in dilution (most evident in inflation-based PoS coins), so indeed non-validators will likely not mind in the short term. That said, I see no feasible reward scheme that depends on swaps – that link immediately creates perverse incentives. Something that would would work is rewarding successful oracle voting with seigniorage (as was originally planned).

Wouldnt the perverse incentives persist to create more seigniorage? I.e. burn luna for Terra? I can see the motivation to price Luna higher to create arb incentives for burn

Hmmm need to think more about this. This attack could work short-term, curious if it would be sustainable though, i.e. issued Terra from Luna burning would then flood the market, bringing prices down and kicking off the opposite cycle i.e. Luna issuance. If seigniorage is distributed immediately this is certainly a problem. If it is distributed with sufficient time lag it may require continuous manipulation for the attack to work.

The key difference between seigniorage and swaps is that seigniorage pays for net growth (if distributed correctly), while swaps pay no matter what the economy is doing. This makes swap rewards much easier to manipulate.

Fair. I worry though that EVERY VALIDATOR may have the motivation to create a small premium in the oracle price for luna; this is further beneficial to the validator as the onchain market would suck out liquidity from the open market and lessen the liquidity + overall supply of Luna.

Whoever is defending the Terra peg would have to absorb all the costs.

Yes, I see the risk. Dynamics are complicated, e.g. Luna market price should close the gap, so constantly misreporting may be unsustainable, and it is not clear what the market impact of excess Terra supply will be. Certainly a risk how this would play out. Perhaps the safest solution is to pay oracles a cut of transaction fees? Sounds like the hardest to manipulate.