Giter Site home page Giter Site logo

via-issuer's Introduction

Via Issuer for cash and zero coupon bond tokens

The objective of this project is to create a reference implementation for issue of the Via stablecoin on ethereum, so that developers can create similar implementations on other blockchain platforms.

This implementation follows the ERC20 standard because we want the Via to be usable across currently used wallets and on crypto exchanges.

How does the Via stablecoin work ?

  1. The Via stablecoin is NOT one cash token but multiple tokens for different fiat currencies (eg, Via-USD for US dollar, Via-EUR for the Euro, etc)

  2. Users can purchase the Via cash tokens using ether and also fiat currencies. Currently, the implementation only allows ether as we need banking integration for paying in of fiat currencies for issue of Via.

  3. Users can also redeem (return) Via cash tokens and they can choose to take ether in return or some other Via cash token in return. Eg, a user can choose to redeem Via-USD and take Via-EUR. Current implementation only redeems Via cash tokens for ether, but we need to change this so that users can redeem one Via cash token for another.

  4. The price of the Via cash tokens are stabilized (so it is a stablecoin) by using a set of interest rates on the Via cash tokens. Interest rates regulate demand and supply and thus price of Via cash tokens. The current implementation supports borrowing and redemption of Via bonds. Bonds are simply loans. However, unlike regular loans that require the borrower to pay an interest at a periodic interval, the Via bonds for different fiat currencies are zero coupon bonds - these are bonds that are issued in such a way that the interest is paid upfront. So, if a user buys (borrows) a zero coupon bond whose face value is USD 100, the user may get a bond (loan) of only USD 80.

  5. Exchange rates between Via cash token pairs and Interest rates on Via bond tokens are calculated externally to this system (the Via oracle). The Via oracle captures events emitted by the issuer (eg, sold, lent, redeemed) and uses them in combination with prevailing interest and exchange rates between fiat currency pairs to price Via cash and bond tokens. This pricing is available to the issuer in turn using an Oracle contract.

Steps

To build and deploy locally:

  1. To compile the project, change to the root of the directory where the project is located:
    cd <the root of the directory where the project is located>

  2. truffle compile

  3. For local testing make sure to have a test blockchain such as Ganache or Ganache Cli installed and running before executing migrate:

If you use Ganache, please directly open the Ganache and create NEW WORKSPACE, and then add the truffle-config.js or truffle.js file to this workspace, note to set the PORT NUMBER.

If you use the Ganache Cli for the test. please open the new terminal window and run the ganache-cli first:
ganache-cli --allowUnlimitedContractSize

  1. truffle migrate

To compile and deploy to the Ropsten testnet:

Note: We have provided an account for test. The account and the mnemonic just for test, please don’t use on mainnet.

  1. Install HDWalletProvider Truffle's HDWalletProvider is a separate npm package. Please install it first:
    npm install @truffle/hdwallet-provider

  2. To compile the project, change to the root of the directory where the project is located:
    cd <the root of the directory where the project is located>

  3. truffle compile

  4. Deploy to the Ropsten network:
    truffle migrate --network ropsten

NOTE: Currently this reference implementation is under development and NOT FOR PRODUCTION.

via-issuer's People

Contributors

kallolborah avatar hsiang-xxs avatar anon-xxs avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.