Skip to content

Smart contract used for the VAIOT's payback program.

Notifications You must be signed in to change notification settings

VAIOT/payback-contract

Repository files navigation

VAIOT Logo


Payback Staking Smart Contract

Welcome to the official repository for the Payback Staking Smart Contract utilized in the VAIOT's Payback program. This repository houses the development and maintenance of the staking contract designed for Ethereum-based tokens, utilizing the solidity programming language and the Hardhat development environment.

Installation

To get started with the Payback Staking Contract:

git clone https://github.com/VAIOT/payback-contract.git
cd payback-contract
npm install

Configuration

To properly configure the project, create a .env file in the root directory and include the following required variables:

MUMBAI_RPC_URL= # RPC URL for the Mumbai testnet
GOERLI_RPC_URL= # RPC URL for the Goerli testnet
PRIVATE_KEY= # Private key for contract deployment
COINMARKETCAP_API_KEY= # CoinMarketCap API key
POLYGONSCAN_API_KEY= # PolygonScan API key
REPORT_GAS= # true or false
ETHERSCAN_API_KEY= # Etherscan API key

Smart Contract Overview

The PaybackStaking contract allows for the staking of ERC20 tokens, with unique features:

  • Staking initiated only by the owner, offering controlled participation.
  • Non-reentrant for secure user withdrawal transactions.
  • Fixed APY for predictable reward calculations.
  • Handling of inactive accounts with an inactivity limit.

For full functionality and method descriptions, refer to the source code.

Deployment

Deploy the smart contract either locally or on a testnet using the Hardhat tool.

Local Deployment

npx hardhat deploy

Mumbai Testnet Deployment

npx hardhat deploy --network mumbai

Testing

Run the unit tests to ensure code reliability:

npx hardhat test

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

About

Smart contract used for the VAIOT's payback program.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published