Coder Social home page Coder Social logo

cryptobridge's Introduction

CryptoBridge

Introducton

This is a starter project to automate the savings account functionality of a bank. Basically, when we keep our money in the savings account, interest gets credited to our account at the end of each day. Here, the user is depositing USDC in his account and the interest he earns (at a fixed rate) is in the bankToken (token used by CryptoBridge).

Assumption

Here we have taken 1:1 peg for USDC and bankToken. In future, when bankToken is listed on DeFi exchanges, we can pull the real-time price using ChainLink Oracle and use it to compute interest.

Workflow

The workflow is illustarted by taking user1 as the account holder in the CryptoBridge. There are two unstaking options (withdrawal) for user1: a. Partial withdrawal: Where he can withdraw requested amount of USDC only from the principal. b. Complete withdrawal: Where he withdraws the complete principal and the accumulated intreest bankToken is also transferred to him.

The contract is Keeper Compatible. Hence, the calculateInterest() function is called at an interval of 24 hours by the Keeper node calculating the interest accumulated in all the users’ account.

1

2

3

Contract Address

The contract is deployed on Rinkeby testnet at 0x560779519569d88Fdf0044fC41c75c741546b4b7

cryptobridge's People

Contributors

shivamagarwal-code avatar

Watchers

 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.