{"id":22416319,"url":"https://github.com/bunsdev/modicostaking","last_synced_at":"2025-08-01T01:31:04.478Z","repository":{"id":107391449,"uuid":"330798958","full_name":"BunsDev/ModicoStaking","owner":"BunsDev","description":"Staking contracts containing an abstract base contract for staking one token for another token reward and a time rate contract for releasing rewards over a period of time. May be reused for multiple rewards periods.","archived":false,"fork":false,"pushed_at":"2021-01-22T09:00:14.000Z","size":63621,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-20T18:36:57.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BunsDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-18T22:11:30.000Z","updated_at":"2023-10-20T18:37:23.627Z","dependencies_parsed_at":"2023-10-20T18:37:01.571Z","dependency_job_id":null,"html_url":"https://github.com/BunsDev/ModicoStaking","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BunsDev%2FModicoStaking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BunsDev%2FModicoStaking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BunsDev%2FModicoStaking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BunsDev%2FModicoStaking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BunsDev","download_url":"https://codeload.github.com/BunsDev/ModicoStaking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228321225,"owners_count":17901604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T15:15:44.481Z","updated_at":"2024-12-05T15:15:45.180Z","avatar_url":"https://github.com/BunsDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ModicoStaking\n\nModular Solidity Smart Contracts to Reward SAStakers.\n\nIncorporates:\n\n* Abstract base contract for staking one token and rewarding another.\n* Timed rate contract for releasing rewards over a period of time. May be reused for multiple rewards periods.\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n\t- [Deploy](#deploy)\n\t- [.env Variables](#env-variables)\n\t- [Available Networks](#available-networks)\n\t- [Contract Tags](#contract-tags)\n\t\t- [yLandWETHUNIV2Pool](#ylandwethuniv2pool)\n- [Out in the Wild](#out-in-the-wild)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Install\n\nThis repository requires some knowledge of:\n\n* [Solidity](https://solidity.readthedocs.io/en/latest/)\n* [npm](https://docs.npmjs.com/)\n* [TypeScript](https://www.typescriptlang.org/) (for tests)\n* [buidler](https://buidler.dev/)\n\n1. Install npm and [pnpm](https://pnpm.js.org/), preferably using\n[nvm](https://github.com/nvm-sh/nvm) or\n[nvm-windows](https://github.com/coreybutler/nvm-windows).\n\n\t```bash\n\tnvm install 12.19.0\n\tnvm use 12.19.0\n\tnpm i -g pnpm\n\t# Check installation\n\tnode --version\n\tnpm --version\n\tpnpm --version\n\t```\n\n2. Install dependencies\n\n\t```bash\n\tpnpm install\n\t```\n\n## Usage\n\n```bash\n# Lint\nnpm run lint\n# Compile contracts\nnpm run compile\n# Generate TypeScript contract interfaces from ABI's (required for tests)\nnpm run gen-types\n# Run tests\nnpm run test\n# Deploy to buidler evm\nnpm run deploy\n# Verify on Etherscan\nnpm run verify -- --network mainnet\n# Export ABI and addresses for deployed contracts to build/abi.json.\nnpm run export -- --network mainnet\n# Export ABI and addresses for deployed contracts across all networks to build/abi.json.\nnpm run export:all\n# Flatten a file\nnpx truffle-flattener \u003cfile\u003e \u003e flattened/\u003cfile\u003e\n```\n\n### Deploy\n\nAfter installing dependencies, you may deploy specific contracts by specifying tags.\n\nCopy [.env.example](.env.example) to `.env` and replace the fields with your credentials. See the section on [.env Variables](#env-variables) for a description of each variable.\n\nCurrently, you may deploy contracts using either a local node or [Infura](https://infura.io/).\n\n```bash\n# Install dependencies\npnpm install\n# Deploy all contracts to buidlerevm\nnpx run deploy\n```\n\n### .env Variables\n\n| Variable | Type | Description | Default |\n| --- | --- | --- | --- |\n| MNEMONIC | string | The mnemonic for your wallet needed to deploy from your account. The default is always used for the buidlerevm network. Ganache does not require this either. | `system disease spend wreck student immune domain mind wish body same glove` |\n| INFURA_TOKEN | string | The [Infura](https://infura.io/) Project ID needed to use Infura. | |\n| ETHERSCAN_API_KEY | string | Your API key for verifying contracts on [Etherscan](https://etherscan.io/apis). | |\n| DEPLOYER_ACCOUNT_INDEX | int | The index in your wallet of the account you would like to use for deploying contracts. | `0` |\n| TESTER_ACCOUNT_INDEX | int | The index in your wallet of an account you would like to use when running `npm run test`. | `1` |\n\n### Available Networks\n\nThe deploy process currently supports the following named networks. More can be added\neasily in [buidler.config.ts](buidler.config.ts).\n\n```bash\nnpx buidler deploy --network http://127.0.0.1:8545\n```\n\n| Network | URL | Description |\n| --- | --- | --- |\n| buidlerevm | N/A | The default network and EVM made by Buidler. Ideal for testing. |\n| localhost | `http://127.0.0.1:8545` | A local node for testing. DO NOT use for live networks. |\n| ganache | `http://127.0.0.1:7545` | The default ganache port. |\n| production | `http://127.0.0.1:8545` | A local node running a live network |\n| goerli_infura | `https://goerli.infura.io/v3/${INFURA_TOKEN}` | Infura project endpoint for the Görli testnet. |\n| kovan_infura | `https://kovan.infura.io/v3/${INFURA_TOKEN}` | Infura project endpoint for the Kovan testnet. |\n| rinkeby_infura | `https://rinkeby.infura.io/v3/${INFURA_TOKEN}` | Infura project endpoint for the Rinkeby testnet. |\n| ropsten_infura | `https://ropsten.infura.io/v3/${INFURA_TOKEN}` | Infura project endpoint for the Ropsten testnet. |\n| mainnet_infura | `https://mainnet.infura.io/v3/${INFURA_TOKEN}` | Infura project endpoint for the Ethereum mainnet. |\n\n### Contract Tags\n\n#### yLandWETHUNIV2Pool\n\ncontract: [StakedRewardsPoolTimedRate.sol](contracts/StakedRewardsPoolTimedRate.sol)\n\n```bash\n# Deploy using a local node\nnpx buidler deploy --network production --tags yLandWETHUNIV2Pool\n# Deploy to ropsten using Infura\nnpx buidler deploy --network ropsten_infura --tags yLandWETHUNIV2Pool\n# Deploy to mainnet using Infura\nnpx buidler deploy --network mainnet_infura --tags yLandWETHUNIV2Pool\n```\n\n## Out in the Wild\n\n_Disclaimer: This document does not serve to endorse or promote any project referenced below, whether expressly, by implication, estoppel or otherwise. This document does not serve as permission to use the name of the copyright holder nor the names of its contributors to endorse or promote any projects referenced below._\n\n### yLand Liquidity Farming\nAs of October 16th, 2020, Yearn Land is using `StakingRewardsPoolTimedRate` (the `yLandWETHUNIV2Pool` deployment tag) to offer farming yLand by staking a Uniswap liquidity pair. It is a rewards pool for staking yLand-WETH UNI-V2 pair tokens and earning yLand as a reward over a defined period of time. Once yLand is deposited to the contract, an administrator may update the contract to increase the reward schedule for the current or future staking period.\n\n## Contributing\n\n1. [Fork it](https://github.com/CryptoUnico/ModicoStaking/fork)\n2. Create your feature or fix branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request (PR)\n\n## License\n\n`ModicoStaking` is licensed under the terms of the\n[MIT License](https://opensource.org/licenses/MIT). See\n[LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunsdev%2Fmodicostaking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbunsdev%2Fmodicostaking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunsdev%2Fmodicostaking/lists"}