Giter Site home page Giter Site logo

panda_contract's Introduction

PandaDAO-VeToken

PandaDAO VeToken smart contracts

Introduction

  1. The sources of voting power for DAO governance include: token holders, veToken holders, work group, leader. Work group voting weight is 15%, leader is 5%, and the remaining 80% is allocated according to the number of token or veToken held.
  2. Exchange rate is stable(veToken:locked token = 1:1) and token holders are able to stake or claim at any time. It's temporarily decided that dividends are shared out once a year. Multi-signer can decide whether to share out the dividend in advance.
  3. Dividend weights emission is at certain ratio. The minimum emission time period is one block.

Roles:

  • Owner: accessible to gnosis safe contract who has admin role
  • Staker: accessible to public who is able to stake Panda token for voting power as well as earn dividends from DAO treasury.

Main Operations:

  • Owner:
  1. Emergency Operations: Turn on or off claiming or staking function
  2. Claim other mistaken tokens from other systems
  • Staker:
  1. Deposit Panda token for a certain address which could in turn get same amount of veToken
  2. Withdraw Panda token for burning same amount of veToken

Development

1.Install hardhat

npm install --save-dev hardhat

2.Install hardhat-waffle and hardhat-ethers

npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers

3.Install dependency

npm install --save-dev ts-node typescript
npm install --save-dev chai @types/node @types/mocha @types/chai
npm install --save-dev mocha
npm install --save-dev dotenv
npm install --save-dev hardhat-preprocessor
npm install --save-dev hardhat-contract-sizer
npm install --save-dev hardhat-deploy
npm install --save-dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
npm install --save-dev solidity-coverage
npm install --save-dev @tenderly/hardhat-tenderly
npm install --save-dev @uniswap/v2-core
npm install --save-dev @uniswap/v2-periphery
npm install --save-dev @openzeppelin/contracts

4.Compile

npx hardhat compile

5.Deploy

npx hardhat deploy

6.Test

npx hardhat test

License

MIT

panda_contract's People

Contributors

duloti53 avatar buidler3 avatar mobius3-3 avatar

Stargazers

 avatar

Watchers

Panda avatar  avatar 0xAA avatar

panda_contract's Issues

$PANDA Claim流程方案

方案流程:

PandaClaim

实现要点:

Back-end: 分红周期快到的时候,根据收益模型计算出所有账户的收益MerkleTree模型,并把MerkleRoot给Contract;后面根据Front-end请求返回账户的分红代币数Amount与MerkleProof;收到Front-end发送的ClaimNotify将该账户置位,记录该账户已经领取

Contract:分红周期快到的时候,多签钱包将代币打到Claim合约,合约所有者重新设置MerkleRoot;用户该周期领取奖励之后,合约记录已领取;

Front-end: 提供wallet登录,向Back-end发送Claim请求,向Contract发送Claim调用,Claim完成之后向Back-end发送已Claim请求。

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.