This week, we continued working on our smart contracts and app. We have now implemented the ability to pay back loans and added automatic refreshing. We plan to demo this next week. We would like to focus on our smart contract progress in this blog post.

First, we have added the ability for lenders to cancel loan requests. This is a small feature but makes sense because lenders should be able to reject requests. Additionally, we have now made holding periods optional, allowing each borrower-lender pair to specify whether they wish to mine after a loan is repaid. For large loans, mining will be useful, but for small day to day payments holding periods might not be desirable.

In addition, we modified our converter to communicate directly with the main contract. The main contract restricts the total supply of tokens. Currently in the MVP contract, if X Elixir are converted to the new token at a conversion ratio — producing Y new tokens, Y tokens can be mined. This places an upper limit on the supply of the next token. The conversion ratio will scale the supply down. There will also be vested developer tokens available to fund development, exchanges and marketing. These tokens will be issued over intervals by the converter. We’re also looking into the logistics of setting up exchange-like features within the app, and we’ve added forward compatibility into the token manager to enable burning of tokens should we choose to take that route.

We’ve also added the ability to specify interest when requesting a loan. When loans are paid back, the smart contracts check whether the principal plus interest have been paid. Larger loans with installments can already be represented by our token manager as multiple smaller loan objects. As an extra feature, borrowers can also pass messages via the blockchain when requesting a loan. This is a feature we’re experimenting with; we may or may not choose to implement this on a blockchain level.

Next, we altered the reward function to give 65% of the mining reward to the lender, and 35% to the borrower. This reflects the fact that lenders take greater risk. In the future, the reward function can be more sophisticated and dependent on factors of each loan within the token manager. We’ve also continually tested our converter contracts and token manager. The below diagram shows how each of the smart contracts interact and are connected: