Panda swap provides Panda token rewards for users who stakes in Uniswap liquidity pools. For users to gain Panda rewards, they simply need to stake their LP tokens which prove their share in the liquidity pool.
Note that the current scope of this repo is limited to the back end implementation of the supply and distribution of Panda tokens.
The front end of this project reference SushiSwap and demos the process of LP token staking, Panda rewards distribution and withdrawal.
View Demo · Report Bug · Request Feature
Table of Contents
- Solidity
- Javascript
- React Js
- Ether Js
- Hardhat
Below is a list of prerequisite:
$ npm install
Create a .env file and update the following values. Note LP_TOKEN_ADDRESS
is the Uniswap LP Token address for DAI/ETH pool on Goerli testnet. ALLOCATION_POINT
is the weight of a DAI/ETH pool of all liquidity pools. TOKENS_PER_BLOCK
is the amount of Panda tokens minted per block in ether. START_BLOCK
and BONUS_END_BLOCK
determines the start block number of Panda token minting and the end block of bonus reward period, which need to referenced by the latest block number of Goerli testnet.
ETHERSCAN_API_KEY=""
ALCHEMY_API_KEY=""
DEV_ADDRESS=""
PRIVATE_KEYS=""
LP_TOKEN_ADDRESS=""
ALLOCATION_POINT=
TOKENS_PER_BLOCK=
START_BLOCK=
BONUS_END_BLOCK=
$ npx hardhat test
$ npx hardhat deploy --network goerli
Since the front end part of this project is in a separate repo, to interact with the deployed contract, remix IDE can be used to fetch deployed contract user interface.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
bzpassersby - @bzpassersby - [email protected]