{"id":27874757,"url":"https://github.com/camerodev/nft-yield-farming-contract","last_synced_at":"2025-10-31T05:38:45.216Z","repository":{"id":227921295,"uuid":"771806828","full_name":"camerodev/NFT-Yield-Farming-Contract","owner":"camerodev","description":"This is a smart contract that enable a user to farm yield by staking LP tokens (BEP20) into a NFT pool.","archived":false,"fork":false,"pushed_at":"2024-03-15T19:12:37.000Z","size":211,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T16:43:27.634Z","etag":null,"topics":["binance","blockchain","bsc","defi","nft","smart-contract","truffle","web3","yield-farming"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/camerodev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-14T01:33:56.000Z","updated_at":"2024-03-29T17:35:37.000Z","dependencies_parsed_at":"2024-03-15T20:28:26.028Z","dependency_job_id":"aec9a48e-bc5d-445d-b062-d90b798ab1bd","html_url":"https://github.com/camerodev/NFT-Yield-Farming-Contract","commit_stats":null,"previous_names":["slickcharmer/nft-yield-farming-contract","camerodev/nft-yield-farming-contract"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2FNFT-Yield-Farming-Contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2FNFT-Yield-Farming-Contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2FNFT-Yield-Farming-Contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2FNFT-Yield-Farming-Contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/camerodev","download_url":"https://codeload.github.com/camerodev/NFT-Yield-Farming-Contract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252424939,"owners_count":21745835,"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":["binance","blockchain","bsc","defi","nft","smart-contract","truffle","web3","yield-farming"],"created_at":"2025-05-05T01:38:06.517Z","updated_at":"2025-10-31T05:38:45.127Z","avatar_url":"https://github.com/camerodev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NFT Yield Farming on BSC\n\n***\n## 【Introduction of the NFT Yield Farming on BSC】\n- This is a smart contract that enable a user to farm yield by staking LP tokens (BEP20) into a NFT pool.\n  - Once a user stake LP tokens into a NFT pool, reward token (Governance Token) are mined every block.\n  - User who staked can receive the Governance Tokens as rewards (as farmed-yield) when that user un-stake.\n- This smart contract works on BSC (Binance Smart Chain).\n\n\u0026nbsp;\n\n***\n\n## 【Workflow】\n- Diagram / Workflow  \n![【Diagram】NFT Yield Farming on BSC](https://user-images.githubusercontent.com/19357502/108629603-1888a900-74a4-11eb-9337-581f757d7b4c.jpg)\n\n\u0026nbsp;\n\n***\n\n## 【Setup】\n### ① Install modules\n- Install npm modules in the root directory\n```\n$ npm install\n```\n\n\u003cbr\u003e\n\n### ② Add `.env` to the root directory.\n- Please copy code of `.env.example` into your `.env` \n  (Then, please input your information of wallets, private keys, etc... by following code of `.env.example` )\nhttps://github.com/supercoolx/NFT-Yield-Faming-Contract/blob/main/.env.example  \n\n\u003cbr\u003e\n\n### ③ Compile contracts (on BSC testnet)\n```\n$ npm run compile:bsc-testnet\n```\n\n\u003cbr\u003e\n\n### ④ Test\n- Execute test of the smart-contracts (on the BSC testnet)\n  - [Note]: Sometime, timeout happen on this test. So I recommend that you try `⑤ Script` below instead of this test.   \n```\n$ npm run test:nft-yield-farming_bsc-testnet\n($ truffle test ./test/test-bsc/NFTYieldFarmingOnBSC.test.js --network bsc_testnet)\n```\n\n\u003cbr\u003e\n\n### ⑤ Script\n- Execute script of the smart-contracts on the BSC testnet (with `truffle exec` command)\n```\n$ npm run script:nft-yield-farming_bsc-testnet\n($ truffle exec ./scripts/script-bsc/NFTYieldFarmingOnBSC.script.js --network bsc_testnet)\n```\n(※ Note: In advance, please check whether your deployer' wallet address on BSC testnet has enough BNB balance or not)\n\n\n\u0026nbsp;\n\n***\n\n## 【Remarks】\n- When 503 Error happen, please select a new `BSC RPC Endpoints` to change by referencing the list below\nhttps://docs.binance.org/smart-chain/developer/rpc.html\n![Screen Shot 2021-02-21 at 08 44 38](https://user-images.githubusercontent.com/19357502/108611369-64463e80-7421-11eb-9e56-166a3321ca22.png)\n↓\n- Then, please replace `BSC RPC Endpoints` for 2 files below.\n  - truffle-config.js\n    https://github.com/supercoolx/NFT-Yield-Faming-Contract/blob/main/truffle-config.js#L9\n  - NFTYieldFarmingOnBSC.script.js\n    https://github.com/supercoolx/NFT-Yield-Faming-Contract/blob/main/scripts/script-bsc/NFTYieldFarmingOnBSC.script.js#L5\n\n\u003cbr\u003e\n\n- Governance Token\n  - At the moment, Governance Token is used as a reward token.\n  - Although it has not implemented yet, I will implement Governance Token for governance strucure (e.g. Governance Token holders can vote, etc...) in the future.\n\n\u003cbr\u003e\n\n- LP tokens\n  - LP token is created by BEP20.\n  - Assuming LP tokens is a pair between the Governance Token and BNB. \n  - But, pool to create this pair (LP tokens) has not been implemented yet. (at the mement)\n\n\u003cbr\u003e\n\n- Version\n  - Solidity (Solc): v0.6.12\n  - Truffle: v5.1.60\n  - web3.js: v1.2.9\n  - openzeppelin-solidity: v3.2.0\n\n\n\u003cbr\u003e  \n\n***\n\n## 【References】\n- BSC\n  - Getting Started with BSC:\n    https://binancex.dev/blog.html?p=making-the-move-from-ethereum-to-bsc\n  - BSC blockchain explorer\nhttps://explorer.binance.org/smart-testnet\n  - BSC testnet faucet\nhttps://testnet.binance.org/faucet-smart\n  - BSC smart contract IDE\nhttp://remix.ethereum.org/#optimize=false\u0026runs=200\u0026evmVersion=null\u0026version=soljson-v0.7.4+commit.3f05b770.js\n  - BSC development ecosystem and tools\nhttps://github.com/binance-chain/bsc-develop-ecosystem/\n  - BSC FAQ\nhttps://docs.google.com/document/d/1JF_P-AokXhSe38bNqLTNhlhKIu0JrcNRVReGdoBA-0o/edit?usp=sharing\n\n\u003cbr\u003e\n\n- BSC\n  - BEP20Token.template: \n    https://github.com/binance-chain/bsc-genesis-contract/blob/master/contracts/bep20_template/BEP20Token.template\n  \n\u003cbr\u003e\n\n- BSC RPC Endpoints:  \n  https://docs.binance.org/smart-chain/developer/rpc.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamerodev%2Fnft-yield-farming-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamerodev%2Fnft-yield-farming-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamerodev%2Fnft-yield-farming-contract/lists"}