Giter Club home page Giter Club logo

dao-lpstaking's Introduction

Meta Pool DAO

NEAR Blockchain Implementation

Overview

What is Meta-Pool and other non-Technical Documentation

Audits

Technical Documentation

Repositories

This is the Smart Contract repository. The Web App UI is at https://github.com/Narwallets/metastaking-webapp

Change Log

2.0.0 - Dec 2022

  • Added active rebalance, to supoprt vote.metapool.app

1.2.1 - May 2022

  • NEAR gas computation will change, fix gas computation on dao upgrade instruction

1.2.0 - March 2022

  • All audit recommendations implemented
  • set all staking pools weights in a single call

1.1.0 - Dec 2021

  • new fn Realize_meta_massive to auto farm $META

1.0.0 - Apr 2021

0.1.0 - Nov 2020

  • Initial version based on core-contracts/lockup and core-contracts/staking-pool
  • Deposit, withdraw
  • Distributed stake/unstake
  • NEAR/stNEAR liquidity pool, Add/Remove liquidity
  • META Minting with rewards

TO DO & Help needed

Smart Contract

  • Deposit/withdraw
  • Buy stNEAR/Stake
  • Sell stNEAR/immediate unstake
  • Classic unstake-wait-finish-unstake
  • User trip-meter, measure rewards
  • distribute staking/unstaking
  • retrieve unstaked and ready
  • NEAR/stNEAR Liquidity Pool, Add/Remove liquidity
  • clearing mechanism on stake to restore liquidity in the NSLP
  • act as a NEP-xxx MULTI-FUN-TOK (multi-token contract). Implement for NEAR, stNEAR and META
  • Dividends-pool stNEAR/META
  • Staking-loans to whitelisted validators
  • Emergency Staking (from the nslp) to whitelisted validators

Test

  • Simulation tests
  • Fuzzy Testing

Staking pool list

  • List selected staking pools, getting weight, staked & unstaked
  • add a staking pool, set weight

Governing

  • Mint and distribute META with rewards
  • Phase II - Governing DAO

Infrastructure

  • External cron to call distribute()
  • compute remaining epoch time
  • whitelist pools before adding them

Expansions

  • USDNEAR MVP: Create a collateral-based stablecoin similar to Compound's DAI, using NEAR & stNEAR as collateral

Testing

All tests are are performed in a separate project with an ad-hoc fuzzy test for metapool.

The test generates random operations. We have a list of "invariants" the contract must satisfy to guarantee the internal accounting is consistent. We use a seeded random generator to create "operations" against the metapool (deposit, liquid-unstake, delayed-unstake, add-liquidity, remove-liquidity, compute-rewards, retrieve-funds-from-pools, rebalance) in any order and amount. After each successful operation we check the contract invariants again. This is our way to tests unprepared operations combinations and make sure the internal accounting remains consistent

The tests are located in the folder metapool/test

dao-lpstaking's People

Contributors

luciotato avatar hardworking-toptal-dev avatar the-preem-palver avatar htafolla avatar al-dyor-al avatar lau-bin avatar fercargo 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.