Giter VIP home page Giter VIP logo

vaderprotocol-contracts's Introduction

Vader Protocol - Incentivised Liquidity, Stablecoin and Lending Protocol.

VADER is a liquidity protocol that combines a collateralized stablecoin with liquidity pools. The stablecoin, USDV, is issued by burning VADER tokens, which is issued by burning VETH tokens. Liquidity pools use both USDV as the settlement asset, as well as VADER in order to send the correct purchasing power of VADER. A daily emission rate of VADER funds liquidity incentives, a protocol interest rate, and impermanent loss protection. Pooled capital can be lent out by borrowers, who lock collateral such as synths, pool share or VADER. The collateral is used to pay an interest rate which is added into the pools to increase returns.

Smart Contracts

VADER (VADER)

  • 1,000,000,000 to VETH holders
  • 2,000,000,000 maxSupply
  • Burn USDV to get VADER
  • Daily Emission Rate

VADER USD (USDV)

  • Burn VADER to get USDV
  • Deposit USDV/SYNTHS to get interest rate
  • Harvest, withdraw
  • Has a reserve for interest payments

ROUTER

  • Add liquidity to Asset or Anchor pools
  • Remove liquidity with 100 Days IL Protection
  • Swap between Asset <> USDV or VADER <> Anchor
  • Get Anchor pricing, replace any Anchor
  • Borrow debt from locked collateral, repay
  • Has a reserve to pay incentives

POOLS

  • Stores funds and member details for the pools

FACTORY

  • Deploys Synthetic Assets

SYNTH

  • ERC20 for Synths

GovernorAlpha

  • Has Governance Ability on the ecosystem, senses Weight in the USDV Contract
  • Anyone can propose, but for a fee of 1000 USDV
  • Anyone can vote, using USDV weighting in the VAULT
  • Only 1 proposal at a time (must be finished)
  • Council can veto For or Against at any time, but still must go thru cool-off period
  • Council is deployer, EoA, or multi-sig
  • DAO can change Council, Council cannot veto
  • Proposals go through:
    • being voted on,
    • finalising (cool off),
    • or finalised (executed after cool off or cancelled)

UTILS

  • Various utility functions

Addresses

Kovan

0xdA9e97139937BaD5e6d1d1aBB4C9Ab937a432B7C vether 0x3CF73D6E97cB3A8EA3aEd66E0AE22e0257CD1100 USDT

Mainnet

0x4Ba6dDd7b89ed838FEd25d208D4f644106E34279 vether

Helpers

1000000000000000000 // 10**18
1000000000000000000000000 //1m
0x0000000000000000000000000000000000000000 /0x0

Testing - Hardhat

npx hardhat compile

Execute all at once:

npx hardhat test

Or execute individually:

npx hardhat test test/1_vader

Depoly - Hardhat

Deploy and Verify contracts:

npx hardhat run --network NETWORK_NAME scripts/deploy.js

CI Pipeline

Github Actions are used to perform a number of automated code quality checks.

Executing/Debugging the Pipeline Locally

These checks can be run locally by installing the act utility. The default suggested image (medium) supplied with act does not contain the necessary dependencies to run Vader's pipeline. Instead, use the larger (18GB~) image using:

act -vP ubuntu-latest=nektos/act-environments-ubuntu:18.04

This will download a more complete image with the required dependencies, and run the pipeline as defined in .github/workflows/build.yml.

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.