April 27, 2022

We are glad to announce that we finished big research on major yield farm protocols!

Based on found ideas and conceptions, we made two prototypes of the smart contract protocol!

We tested a few approaches to the realization of vaults, to observe the pros and cons of popular implementations of farms.

More info


πŸ§ͺ Research

  1. Two concepts underpin all farms: equity fund and lender (more of that in our prototype description). Usually, both conceptions are mixed. That's why the majority of protocols are complex and error-prone πŸ€”
  2. All farms move temporal losses and fees of invested smart contracts to the user 😀 This hurts newcomers: β€” They withdraw money too soon, as they don't trust the new tool yet. And commissions eat up all the profit. β€” They are not patient enough to wait out temporal losses.
  3. All farms should calculate the exchange rates of tokens and shares of the vault. The rate depends on oracles or smart contracts. If someone finds a way to manipulate invested smart contract or oracle rates, he will be able to clear out the whole vault 😱 There are exceptions, e.g. Yearn Finance solved the problem of possible hacks and manipulations of the vault exchange rates.
  4. Some protocols don’t use rounding calculation to prevent losses of the tokens during calculations. Long living vaults make big amount calculations, and each of them can lose a small fraction of the tokens
  5. Most farming protocols will lose user money in case of assets are locked in the invested protocol. But for example, Yearn Finance takes care of such tokens and keeps user shares in case the money becomes available for withdrawal.

πŸš€ Prototypes

https://github.com/LeoVS09/simple-yield-farm

https://github.com/solovev/eonian-vault

We developed prototypes with extensibility in mind. Architecture is mostly influenced by Harvest Finance, Yearn Finance, Pickle Finance. But we made many improvements and simplified the main vault smart contract. The prototypes show how to split business logic parts, test them separately and update them without unexpected bugs.

Several prototypes show us that the calculations of temporal losses can be done in different ways and how to approach the reinvestment cycle inside the vault contract. Some variants lead to the simpler calculation but do not track losses at all, others track them but do not try to minimize losses that go on the user side.