Elix Mobile — Real-Time Notifications

ELIX
3 min readNov 14, 2017

--

In last week’s update, we demonstrated how the mobile application is now linked to the contracts on our testnet blockchain. We’re able to utilize our functions from within the contracts. For this past week, we’ve been working on further integrating the contract’s functionalities and responsiveness into the mobile application. Our latest feature is real-time notifications between peers for any major functionality usages. The example we demonstrate in the video below shows how the lender is instantly notified of a loan request as soon as it has been sent to the blockchain and stored in a block. This update sets up the foundation for including notifications for all events, including: loan requests, loan cancellations, loan activation, loan completion, holding breaks, etc.

We should note that when we integrate the contracts onto the Ethereum mainnet, there will be a longer latency between the time a loan is requested, and the time it takes for a notification to be sent to a lender. This is because a loan is not considered officially requested until it has been placed into a block and can be read off of the blockchain. Therefore, the expected latency time should be somewhere around 10–20 seconds — the average range of time in which a block is mined on the Ethereum blockchain. We still consider this a quick notification time for other users of our app.

Ethereum contracts have the ability to trigger events when certain functions are called from within a given contract. In the Elixir contract, we have many different events that we’ve programmed in, which will allow us to create the many different functionalities necessary to provide a smooth experience for our users. In the demo above, the borrower requests a loan from a lender by providing the info necessary to instantiate a loan request. This information is then submitted to the Ethereum blockchain, and the loan is now stored in a list of loans. Meanwhile, a server is running in the background and watching for any changes to the blockchain, and intercepts the events being outputted by some of the functions in the Elixir contract. After it recognizes what kind of event has been triggered, it sends a response to the other party, informing them of whatever action has been taken. In the case of a loan request, the server will notify the lender of a request, and will also store the loan itself in a database. Saving loan requests into a central database is necessary in this case, so that we may provide the smoothest experience when using the application. For example, it would be possible to pull all the loan data from the blockchain itself, but it would severely impact the load times of the application by as much as 20+ seconds! On the other hand, a database would have that loan data sent to the user’s device before the view has even loaded. We would like to emphasize that this database does not save any data that isn’t already available on the blockchain in the first place. Its primary function is to increase the performance of the application, and provides users with information rapidly.

The core functionalities of Elixir are entirely decentralized. Loan requests, loan processing, reward generation, and loan information storage is all processed by the blockchain. Although there are aspects of the mobile application that rely on central servers to ensure a smooth experience and provide the necessary functionality, it is completely possible to circumvent the application and simply query the blockchain yourself without the assistance of the application’s interface. Elixir focuses on providing a decentralized lending platform, but ensuring an easy and smooth experience when navigating through the mobile application.

Be sure to checkout our website as well as connect to our social media on Reddit, Twitter, Discord, and Telegram. If you have any questions, let us know and we’d be glad to help clear things up!

--

--