How my Open Source Bot made me a 21.8% Net Annual Return on Mintos (Englisch)

How my Open Source Bot made me a 21.8% Net Annual Return on Mintos (Englisch)

Teaching my computer to make money.

I am a big fan of computer automation. Some might know it from earlier articles of mine such as the one about an auto-localisation tool for designers or the one about a pizza book which I generated via input mask.

This time, I wanted to find out if a bot can earn money for me, too. And the answer is: Yes, it can.

In only two months my self-programmed bot earned more than a hundred euros by trading Peer-to-peer loans on auto-pilot. But let’s start from the beginning.

Wait! What are Peer-to-peer loans?

Peer-to-peer (P2P) loans are the practice of lending money to individuals or businesses through an online service that matches lenders with borrowers. Depending on the borrower’s credit score the loan comes with a certain interest rate.

But unlike banks, individual P2P lenders typically don’t lend the entire amount to the borrower but collectively participate with only small fractions, such as 10€. This way lenders, also called investors, can reduce the risk in case a borrower cannot pay back the debts.

One of the largest P2P lending platforms is Mintos. At Mintos you can invest in loans around the globe. It acts as a marketplace for almost 70 loan originators.

If lenders don’t want to hold their investment til maturity, Mintos also provides the possibility to sell the investment to another investor on a secondary market. The buyer of the investment becomes then the new lender.

On the secondary market, investors can add a discount to exit more quickly or a premium if it is a loan with high potential returns.

The automation opportunity

And here comes the big opportunity. Discounts on the secondary market typically range from 0.1 to 0.5%. It doesn’t sound like a lot but other than interest payments which are done at the end of the month, discount payments occur immediately after the purchase.

Put different, you make a profit in a few seconds instead of in one month. Now imagine you could make a 0.5% profit every day. 0.5% ⨉ 365 days = 182.5% . Your initial 1,000€ would almost triple within one year.

Too good to be true? Perhaps. The hypothesis assumes that the same 1,000€ can be invested in a discounted loan the next day again.

To find out how realistic this is, I tried the following. I bought a loan worth of 6.37€ with a discount of 0.04€, paying 6.32€. Then I placed the newly purchased loan on the secondary market, while adding discount of 0.01€ — ’cause people love discounts.

As you can see from the screenshot above, I was able to sell it on the same day for 6.36€ and made a theoretical annualised (0.3% ⨉ 365 days) profit of 109.5% – concept approved.

Let the puppets dance

Soo… how do I automate this? JavaScript! And a package called puppeteer. Puppeteer has tons of functions, is very well readable and has the ability to be run without an interface (headless) on my RaspberryPi.

Having my toolset complete, all I needed to do was describing my actions to Puppeteer. I made this by clicking my way through Mintos while inspecting (cmd+alt + i) the elements that I clicked on.

  1. Login to Mintos
  2. Check my current account balance
  3. Search for discounted loans
  4. Buy several loans
  5. Put loans back on the marketplace with a small discount

The results were amazing! While I was sleeping, my bot started to generate between 1 and 3 euros in one night. I was so excited about the results that I started to search for more and more ways to improve my bot even further.

Selling strategy

I discovered that the bot could for example keep a record about my purchases in a CSV file. From that starting point I could build an entire strategy around my trades.

For example I could instruct the bot to sell loans cheaper if interest payments are late between 1 and 30 days and put a bigger profit margin on loans of status current or of status 30 to 60 days late but come with a buyback guarantee at day 60.

Buying strategy

Same was possible on the buying side. Here it was important which loans to buy but even more which not to buy.

As Mintos does just act as a marketplace, many risks can be avoided by selecting the right loan originators. Thus I instructed the bot to only buy loans from originators that run a profitable business and reported a profit greater than 1 million, capital greater than 1 million and an overall exploreP2P-Score greater than 30.

This strategy proved to be beneficial when Aforti Finance announced repayment difficulties in August. Aforti Finance did not match my requirements and by that time my bot had already sold all Aforti loans.

Bypassing Hurdles

Other bot improvements were not homemade. Out of a sudden, Mintos implemented a DDoS protection and shortly after that the famous „I’m not a robot” bot protection.

Seems like Mintos got a lot of unwanted traffic from bots in general. From that on, I set up my bot even more modest but also decided to continue.

Bypassing the DDoS protection was easy, bypassing the bot protection not.

But even that is not unsolvable. What I ended up was verifying myself as a human and then passing the cookies of my successful login session over to the bot. This way my bot never had to verify itself again.

Shutting down the bot

The project demonstrated impressively the power of automation. And the ability to teach a computer certain tasks feels like a super-power!

Nevertheless, I will no longer continue the project.

The reason is simple. In June 2019, Mintos introduced a feature called Invest & Access. It allows investors to access their money at any time without the need of offering their loans on the secondary market.

As a result, discounts above 0.1% became very scarce and profits made by the bot stagnate since end of July (see green line).

Data from 24.06.2019 to 14.10.2019

Little hick-ups in the charts show how I tried several strategies such as the buy high, sell higher (in contrast to the existing buy low, sell high). But no matter which change I tried, this last challenge was not bypass-able.

Closing words

Seems like my automation idea has come a little too late. Yet there is one return that I did not miss out thanks to this little experiment: Knowledge.

Investments in our human capital is something I tend to procrastinate way too often, but this project gave me the motivation to program my first Node.js project. My next project, where I reinvest this new skill is already in the pipeline :)

Don’t miss out the investment opportunity in your human capital.

Look through the code, take it as an inspiration. And bear with me, it is not a beauty.