Code Monkey home page Code Monkey logo

contracts's Introduction

npm version arcxmoney

ARCx Contracts

ARCx Credit is a decentralized liquidity market that offers the safest and most capital-efficient borrowing experience in DeFi through the use of the DeFi Credit Score. Unlike traditional borrowing protocols, ARCx Credit rewards Borrowers who demonstrate effective risk management practices by granting them progressively higher maximum loan-to-value (LTV) ratios on their loans. The primary objective for ARCx Credit is to profitably improve capital efficiency in DeFi lending markets through measuring and rewarding responsible borrowing behavior. Click here to read the official docs.

Architecture

Contracts high-level arch

At a very high level, the ARCx protocol is a credit market that has works in the following manner:

  • Lenders lend their stablecoins to borrowers that meet some minimum credit score requirement, on the SapphirePool contract
  • ARCx observes the borrowing behavior of on-chain addresses and issues a credit score for each of them. These scores are then compiled inside a merkle tree of which root is published on the SapphirePassportScores contract on a daily basis.
  • Borrowers deposit their collateral inside a SapphireCore contract and take a loan while respecting their personal collateral ratio determined by their credit score.
  • When they repay, part of the interest goes back to the lenders, and the other part goes to the protocol.

Warning

This is experimental, beta software and is provided on an "as is" and "as available" basis. We do not give any warranties and will not be liable for any loss, direct or indirect through continued use of this code.

Audits and Bug Bounties

The contracts have not yet been audited, but one is on its way.

We currently have an active bug bounty with Immunefi that can be viewed here. If you have found any critical bug please let us know through the bug bounty program.

Developers

Our contracts were written in Solidity and our tests in TypeScript.

If you want to contribute, familiarity with Hardhat, Ethers, Waffle and TypeChain is needed.

Pre Requisites

Before running any command, make sure to install dependencies:

$ yarn install

Build

Compile the smart contracts with Buidler and generate TypeChain artifacts:

$ yarn build

Lint Solidity

Lint the Solidity code:

$ yarn lint:sol

Test Unit

Run the unit tests:

$ yarn test

Coverage

Generate the code coverage report:

$ yarn coverage

Clean

Delete the smart contract artifacts, the coverage reports and the Buidler cache:

$ yarn clean

Discussion

For any concerns or feedback, open an issue or visit us on Discord to discuss.

contracts's People

Contributors

gtupak avatar kermankohli avatar xitronix avatar classicus-eth avatar alekscp avatar kryptowiz avatar

Stargazers

xialongyun avatar AustinN avatar  avatar Kale Miller avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gacwr

contracts's Issues

Make SapphireCoreV2 contract for ETH deposits

Evidence shows that people want to borrow on Ethereum. For that reason, make a new version of the SapphireCore contract to allow people to directly send ETH as collateral instead of treating it as a token.

Yarn build generates in an error

$ yarn compile && yarn copy:types
$ yarn hardhat compile
$ /Users/gabriel/dev/contracts/node_modules/.bin/hardhat compile
(node:209) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:209) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
(node:209) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
Nothing to compile
Creating Typechain artifacts in directory ./src/typings for target ethers-v5
Successfully generated Typechain artifacts!

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.