Giter Site home page Giter Site logo

sparklend's Introduction

Spark Lend

This is the repository for Spark Lend deploy scripts and custom code. Primarily this repository acts as an orchestration toolkit for deploying and managing Spark Lend instances across many chains. Apart from the custom code below everything is combined from third party vendors.

Usage

Run tests: make test
Deploy Spark Lend: ETH_RPC_URL=<YOUR RPC ENDPOINT> make deploy
Deploy Config Engine: ETH_RPC_URL=<YOUR RPC ENDPOINT> make deploy-engine
Deploy Spark Lend (Custom Instance): INSTANCE_ID=<Custom Instance Name> ETH_RPC_URL=<YOUR RPC ENDPOINT> make deploy
Deploy Config Engine (Custom Instance): INSTANCE_ID=<Custom Instance Name> ETH_RPC_URL=<YOUR RPC ENDPOINT> make deploy-engine
Deploy Pool Upgrade: ETH_RPC_URL=<YOUR RPC ENDPOINT> make deploy-pool (Please note you need to set the proper POOL_REVISION in Pool.sol)

Verifying Bytecode on Deploys

To Install

  1. Install local instance of sourcify via https://docs.sourcify.dev/docs/run-locally/#running-the-server
  2. Default .env.dev is mostly fine, but update NODE_URL_MAINNET to be a valid rpc endpoint.
  3. Start the server npm run server:start.

To Run

Run ./validate-deploy.sh path/to/broadcast.json (Be sure to forge build with proper settings first)

If you want to delete previously verified contracts then run rm -rf /tmp/sourcify/repository/contracts/*

Custom Code

DaiInterestRateStrategy

A special interest rate strategy is used for the DAI market which anchors to the Dai Savings Rate (DSR). It is a flat rate up to the debt ceiling. If Maker needs to bring back liquidity by lowering the debt ceiling then the interest rate will spike to ensure user deposits and borrow repayments.

You can read more about this here.

SavingsDaiOracle

This is the oracle for sDAI which will take the input of a standard DAI price feed and convert it via the pot.chi factor.

SparkMigrationHelper

Fork of the AaveMigrationHelper which has some extra features like converting from USDC to DAI automatically.

Plug and Play License

This code is open source, but use within a Maker SubDAO requires a 15% revenue share of all income generated by the usage of code inside this repository to the Ethereum address labelled by the ENS domain of sparkprotocol.eth. This Plug and Play revenue share license expires on January 1st, 2026 at 00:00 UTC.

sparklend's People

Contributors

hexonaut avatar lucas-manuel avatar omahs avatar patitonar 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.