Skip to content

lendroidproject/protocol.1.0

Repository files navigation

Reloanr package with Lendroid protocol v1.0

The Reloanr package comprises the following tools. Please feel free to use them (in any combination) to deploy your own fixed-interest, p2p lending ecosystem.

Smart contracts

Lendroid Protocol version 1.0

This project is built using the Truffle Framework. The smart contracts, originally written in Solidity, have been migrated to Vyper. The Vyper contracts have been tested using Truper.

Javascript library

Nodejs implementation for user interface to interact with the smart contracts.

UI template

A base template of the user interface.

Kernel server

An API server implementation on Google Cloud (Python) for shared off-chain (lend / borrow) loan offers

Wrangler API server

An API server implementation on Google Cloud (Python) for a simple wrangler

How to use this repo

Installation and setup

  • Clone this repository

    git clone <repo>

  • cd into the cloned repo

    cd protocol.1.0

  • Install dependencies via npm

    npm install

  • Install Vyper. Refer to Vyper's installation instructions for further reference

    • Python 3.6+ is a pre-requisite, and can be installed from here

    • Install virtualenv from pip

      pip install virtualenv or pip3 install virtualenv

    • Create a virtual environment

      virtualenv -p python3.6 --no-site-packages ~/vyper-venv

Test and development

  • Open a new terminal (Terminal 1) and run the Ganache CLI here

    ganache-cli

  • Open a second terminal (Terminal 2) and activate Vyper's virtual environment

    source ~/vyper-venv/bin/activate

  • On Terminal 2, run the truper commmand to compile Vyper contracts. Refer truper's github to know more about the Truper tool

    (vyper-venv) $ truper

  • Open a third terminal (Terminal 3) and run the tests using Truffle test suite

    truffle test

  • To run tests using the Python test suite

    pip install -r requirements.txt

    pytest

Note: When the development / testing session ends, deactivate the virtualenv on Terminal 2: (vyper-venv) $ deactivate