A simple way to optimize your crypto yield farming

In the previous posts [1-2] we considered how to convert an APY to a ROI on a lock-up period and how to estimate risks of losses from investments in DeFi or high APY projects. In this post we consider how to use this information to allocate in the optimal way our investments between risky DeFi or high APY projects and safe wallets/accounts.

Suppose that we decided to participate in a project which promises 50% APY with a probability of a loss per year 10%. If we put all our coins/tokens into this project, we may lose all of them. We do not want this to happen. If we do not invest in this project, we will not receive any ROI. This is also not a desirable result. The way to proceed is to invest a part of our coins/tokens in the risky DeFi or high APY projects and keep the other part in safe places, for example, offline generated on demands (GOD) wallets (see [3]). In the worst case, we lose only the part we invested, but the other part will be safe. In this case many investors hope that accumulated returns from lucky cases over grow losses from unlucky cases and at the end the investors will have some positive profit. The question is: what is the optimal allocation structure (OAS) of coins/tokens between the risky DeFi projects and the safe accounts/wallets, which in the long run give us the maximal ROI?

Such tools, which find answers to this question, are called "optimal assets structure allocators". They are not free, but there are some not expensive tools, for example OAScalc

In our example, we have APY=50%, PrLY=10%, lock-up period (LP) is one month.


Now, we can find the optimal allocation structure (OAS) for our yield farming in DeFi projects, which in the long run gives us the maximal risk adjusted return on investments (RA_ROI).


In our case, the optimal allocation structure (OAS) of our investment portfolio is to put 73.69% into the yield farming DeFi project and to keep 26.31% in a safe crypto wallet. In the long run such OAS give us 1.31% return on investments per month on our investment portfolio. This return is called a risk adjusted return on investments (RA_ROI). The risk adjusted APY is 16.9%. The difference between a ROI and a RA_ROI is that the ROI shows us our return on investments (on the lock-up period) only in the case when there are no loses. The RA_ROI takes into account our losses and shows our return on investments (on the lock-up period) in the long run, taking into consideration that some times we have losses.

Now, we will show that any other allocation (among projects with lower RA_ROI) produces worse results than the optimal allocation. Suppose that we put a part of our risky investments in a second DeFi project with APY=60% and PrLY=15, which has RA_ROI 1,1% (if we invest some of our coins/tokens only in this project). Now, we have three parts: the part one in the first DeFi project, the part two in the second DeFi project and the part three in a safe wallet/account. In this case our investments in the second project have RA_ROI below 1.1% and investments in the third project have RA_ROI below 1.31%. Therefore, our RA_ROI on the whole portfolio is less than 1.31%, which means that in this case we have lower RA_ROI than in the previous case (two parts investments portfolio).

Margin of safety

For those, who have no experience with risks estimations, it will be prudent, initially to concentrate efforts on minimization of loses, instead of maximization of RA_ROI. Imagine that due to errors in risks estimations you lose your investments in the first two projects. The total loss is over 93%. With a small part of 7% (of your initial assets) you will need a long time interval to recover your loses and to reach the maximal RA_ROI. The concept of margin of safety requires us to put at risk less amount of assets than it was planned or recommended, during times when we start, learn, or have a high degree of uncertainty.

Here are some ideas to consider.

1. Look for projects where software was audited multiple times by reputable independent auditors. Software which was audited by three independent reputable auditors is less risky than software audited by one unknown auditor or not audited at all.

2. Look for projects with reputable management teams with established historical records of successful projects.

3. Look for projects where big investors locked-up big amounts of assets on long term periods. By investing in such projects on short term periods your level of risks will be lower than levels of risks for big investors.



1. The OAS of assets between two groups is the following: the first group having the maximal RA_ROI on risky investments in DeFi or/and high APY projects and the second group in secure offline generated on demand (GOD) wallets, gives investors the maximal RA_ROI and RA_APY in the long run.

2. For the reason that always there are limits on amounts to allocate in DeFi projects, big investors can not allocate their investments in the optimal way (with the maximal RA_ROI) and need to allocate their assets among many projects (with RA_ROIs less than the maximal RA_ROI). This gives to small investors some competitive advantage over big investors, under the condition that they have the same DeFi opportunities as big investors. Those investors, who use OASs, also have some advantage over all other investors who allocate their assets among many projects with RA_ROIs lower than the maximal RA_ROI.



In the next post we consider a simple way to test precognition abilities.



[1] A simple way to convert a DeFi project APY to a ROI on a lock up period

[2] A simple way to estimate risks of DeFi projects

[3] A simple way to create a generated on demand (GOD) offline nano wallet




How do you rate this article?



I am curious about science, technologies and their applications to solving real problems.

Simple solutions to complex problems
Simple solutions to complex problems

Each post is devoted to a simple solution to a complex problem.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.