Proposal: Fixing Rewards Selector Compound Oracle


It has come to the Discord community’s attention that the oracle contract, which is meant to allocate yEarn assets to lending protocols with the highest yield (supply intertest rate + any incentive), is currently not calculating rewards correctly. For example, for Dai, Compound is paying the best interest + COMP rewards. Instead, yEarn assets are stuck in Aave right now (everybody noticed the jump in their TVL). This means that we are harvesting only a small fraction of the yield we could be.


Voting for:

The fix to the oracle contract would replace the current:

return Compound(token).supplyRatePerBlock().mul(blocksPerYear);

With something like:

return Compound(token).supplyRatePerBlock().mul(blocksPerYear) + Comptroller(COMPTROLLER).compSpeeds(token).div(21024);

(Needs a Comptroller interface up with the interfaces, of course. And defining the address. And checking that it’s not horribly wrong.)

voting against

no change to the current rewards calculation


Investigation was primarily conducted by Discord member:

  • Justwanttoknowathing

With assistance from:

  • Robert#5432 (of Compound Labs)

  • psybull | YFI-maxi | AGAINST 0

  • zai | YFI-maxi

  • Mushroom sells Kidneys for YFI

  • edenau | AGAINST 0 for now

the conversation begins here

TL;DR in screenshots below (memes preserved for posterity):




Comp is centralized.
Don’t allocate fund there.


  1. Centralized Oracle can stole all of our funds by manipulating margin call Price.

And the most important thing is Yearn used less than a week to decentralized the admin key.

But Comp had been live for more than years , the Oracle is still centralized in unknown way.

  1. [quote=“aeto, post:8, topic:203, full:true”]
    Andre published a post about a solution to the “big TVL” problem a while back: (h/t zai)

The TVL is an order of magnitude larger now however, so other considerations may be needed.

FYI, due to farming, Dai tvl amount in Comp is a faked one via Flashloan, liquidity is not good .

So one thing to note about the public rebalance() function is that it just allocates everything to whatever has the highest APR. Currently need the admin key to do partial rebalancing.

That seems a bit more problematic now that yearn has such a big TVL.

Maybe having a 20/25% TVL cap for rebalance(). Now the public function would always do partial rebalances. That’s one way so that you can end up with 75/25 or 80/20 compound/aave.

I suppose the question is how decentralized do protocols need to be for iearn to allocate to? Compound does scare me though with their centralized oracle

i agree, plus we use USDC in our pool, thats centralized, where are we drawing the line?

I would rather collect more fees + COMP to incentivize users in yEarn, than have inflation.

Its crazy that Compound isnt being mined. The rates are the best in the base layer lending protocols, the COMP is another bunch of percent on top.

Their oracle might be centralized, but its never had an issue, and its the only part remaining thats centralized–dydx and Aave and the other places that ytokens go have so many other ways they could “steal” all the money. All week, Y is 100% centralized (but we solved that).

Turn it back on and let the free market decide!


Andre published a post about a solution to the “big TVL” problem a while back: (h/t zai)

The TVL is an order of magnitude larger now however, so other considerations may be needed.

Would somebody be able to create more thorough risk assessment for this? I, for one, am unsure of the mechanism by which and by whom value could be drawn out of the yearn ecosystem by the centralization of the Compound oracle. Learning how that mechanism would be enacted would allow for better judgement of risk versus reward.

If you want to go down the “is this risky” rabbit hole, there should be a look at risk of EVERY project involved in the process of getting to returns:

  • Admin keys of every project (which ones can steal all your money with this - dydx, aave, yearn, curve, balancer)
  • Oracle risk (dydx, aave, compound)
  • Smart contract risk (dydx, aave, compound, yearn, curve, balancer) etc plus all the staking contracts

The marines clearly hate Compound, but you know chainlink is equally risky or worse right? the chainlink team is the admin of all the smart contracts, which is just as centralized, and it previously led to losses at other places like synthetix. You can pick on compound, but there’s never been an issue. And here we are using fully unaudited code of a brand new project, and not concerned over the bigger risks.

1 Like

While I appreciate Leshner stopping by to share this with the community, he’s likely just driving his agenda and is peeved that the funds aren’t on Compound right now, especially as Compound is getting crushed by Aave as of late. There is possibly another reason for using Aave that we are not yet aware of.


“We recommend the use of Aave assets, as they allow you to enjoy the interest generated by the asset itself, while the underlying AMM gains fees.”

Don’t get sold a bridge by the contractor getting paid to build it. Dig deeper.

Agreed, and that’s why we brought it here, becuase we wanted to get it in front of more eyes so that we could have this debate.

Personally, I want to earn the most revenue for the pool, and I think that without the counter-points, that a lot of other people would agree with that as well.

If it’s purely centralization of the COMP oracle, then that’s one thing, but if there are other risks and reasons and such, I’m interested in hearing the explanations!

As yield farmer, do we really care about his agenda as long as we can earn the most yield for our capital? Compound is a clear winner here because of $COMP price.

1 Like

If there is one truth to YFI it is YIELD FARM INFINITE. We maximize returns here and leave LEND/COMP faction drama at the door. A lot of bagholders of both will shill their team - we care about yield farming. Anyone who is for one and not the other doesn’t belong here.

1 Like

… and apparently nobody even cares that we are losing money. Everybody in the forum must be rich already.

You’re not. The yV2 tokens can’t claim COMP, and even though Compound’s on-chain APR reports higher (in the moment), Aave’s is higher in aggregate. I realized that Aave reports monthly APY (a very accurate stat), Compound reports the current APR (highly volatile). Which is why I’m still working on new Oracles to normalize the two, so they both report the same metric.

yearns job is always highest returns and have gone through many different iterations since early Jan. I’ve been posting all the decisions trees on medium if you would be interested to read more, there is a lot more nuance than what’s being claimed.

If COMP was claimable (which it is not anymore since I burned my keys), then I would have agreed though. But v4 will take care of that :wink:


Optional path to explore for other oracles for V4, V6 , and V8 (the best imo).
It can be modified with the mechanism as follows:
With an epoch length of one hour, the modified the Treasury’s related operations to use a new oracle instead of a TWAP oracle.

But cautiously, if it is not broken and works well, everybody is happy that—no need to change or improve.
We keep rock in chairs.

1 Like

Safety first @andre.cronje , last events was significant:

UMA # Band Protocol (BAND) # API3 (API3) integration

are IMO currently the best pick,
but dont listen to me, do your things, as usual.

1 Like