{"id":13651750,"url":"https://github.com/masaun/GLM-stake-pool","last_synced_at":"2025-04-22T22:32:01.380Z","repository":{"id":54961075,"uuid":"322740946","full_name":"masaun/GLM-stake-pool","owner":"masaun","description":"Yield farming opportunity for Golem's GLM token holders. (By staking uniswap-LP tokens that is a pair between GLM and ETH into the stake pool)","archived":false,"fork":false,"pushed_at":"2021-01-19T14:45:19.000Z","size":320,"stargazers_count":11,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T01:59:00.309Z","etag":null,"topics":["defi","golem","solidity","truffle","web3js","yield-farms"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masaun.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}},"created_at":"2020-12-19T01:17:49.000Z","updated_at":"2024-04-22T12:51:40.000Z","dependencies_parsed_at":"2022-08-14T07:30:54.628Z","dependency_job_id":null,"html_url":"https://github.com/masaun/GLM-stake-pool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2FGLM-stake-pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2FGLM-stake-pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2FGLM-stake-pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2FGLM-stake-pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masaun","download_url":"https://codeload.github.com/masaun/GLM-stake-pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250334039,"owners_count":21413496,"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":["defi","golem","solidity","truffle","web3js","yield-farms"],"created_at":"2024-08-02T02:00:52.035Z","updated_at":"2025-04-22T22:32:01.001Z","avatar_url":"https://github.com/masaun.png","language":"Solidity","funding_links":[],"categories":["Apps","Archive"],"sub_categories":["DeFi","Apps"],"readme":"# GLM Stake Pool\n\n***\n## 【Introduction of GLM Stake Pool】\n- This is a smart contract in order to provide the opportunity of yield farming for Golem's GLM token holders. (By staking uniswap-LP tokens that is a pair between GLM and ETH into the stake pool)\n\n\u0026nbsp;\n\n***\n\n## 【Workflow】\n- ① Create UniswapV2-Pool between GLM token and ETH. (Add Liquidity)\n- ② Create UNI-V2 LP tokens (GLM-ETH).\n- ③ Stake UNI-V2 LP tokens (GLM-ETH) into the GLM stake pool contract.\n- ④ Smart contract (the GLM stake pool contract) automatically generate rewards every week.\n  - The `Golem Governance Token (GGC)` is generated as rewards. \n  - Current formula of generating rewards is that:\n    - 10% of staked UNI-V2 LP tokens (GLM-ETH) amount in a week is generated each week. \n    - Staker can receive rewards ( `Golem Governance Token` ) depends on their `share of pool` when they claim rewards.\n- ⑤ Claim rewards and distributes rewards into claimed-staker.\n  (or, Un-Stake UNI-V2 LP tokens. At that time, claiming rewards will be executed at the same time)\n\n\u0026nbsp;\n\n- Diagram of workflow.\n![【Diagram】GLM Stake Pool](https://user-images.githubusercontent.com/19357502/105049591-29fb2180-5ab0-11eb-97e7-2505e70a29db.jpg)\n\n\u0026nbsp;\n\n***\n\n## 【Technical Stack】\n- Solidity (Solc): v0.5.16\n- Truffle: v5.1.60\n- web3.js: v1.2.9\n- Node.js: v11.15.0\n- Libraries\n  - @openzeppelin/contracts: v2.5.1\n    etc,...\n\u0026nbsp;\n\n***\n\n## 【Setup】\n### ① Install modules\n```\n$ npm install\n```\n\n\u003cbr\u003e\n\n### ② Add `.env` to the root directory. \n- Please reference `.env.example` to create `.env` \n\n\n\u003cbr\u003e\n\n### ③ Compile \u0026 migrate contracts (on Rinkeby testnet)\n```\n$ npm run migrate:local\n```\n\n\u003cbr\u003e\n\n### ④ Test (Mainnet-fork approach with Ganache-CLI)\n```\n$ ganache-cli --fork https://mainnet.infura.io/v3/{YOUR INFURA KEY}\n```\n(Ref：https://medium.com/@samajammin/how-to-interact-with-ethereums-mainnet-in-a-development-environment-with-ganache-3d8649df0876 ）  \n(Current block number @ mainnet: https://etherscan.io/blocks )\n\nThen,  \n\n- All of tests\n```\n$ npm run test\n```\n\n- Only test of the Stake Pool contract\n```\n$ npm run test:stake\n```\n\n\u0026nbsp;\n\n***\n\n## 【Remaining tasks and next steps】\n- Replace GLMMockToken contract (GLMMockToken.sol) with official GLM token contract (NewGolemNetworkToken.sol).\n- Additional implementation of GLM stake pool between GLM-ERC20. (Currently, this is in progress)\n- Additional implementation of the Golem Governance Token (GGC) and governance structures (e.g. Community voting function by GLM token holders)\n- Add liquidity pool of the Golem Governance Token (GGC).\n- Implement the front-end (UI).\n\n\n\u0026nbsp;\n\n***\n\n## 【References】\n- Golem  \n  - GLM contract  \n    https://github.com/golemfactory/gnt2/tree/master/gnt2-contracts/src/contracts/GNT2  \n\n  - ERC20 token migration（GNT -\u003e GLM)  \n    https://blog.golemproject.net/glmupdate/  \n  \n  - GLM Migration Tracker  \n    https://glm.golem.network/  \n  \n  - Golem Hackathon resources  \n    https://github.com/golemfactory/hackathons  \n  \n  - Awesome Golem  \n    https://github.com/golemfactory/awesome-golem  \n  \n  - Doc  \n    https://handbook.golem.network/introduction/golem-overview#golem-architecture  \n  \n  - Golem Network Hackathon  \n    https://gitcoin.co/issue/golemfactory/hackathons/4/100024409  \n\n\u003cbr\u003e\n\n- Test (Mainnet-fork approach with Ganache-CLI and Infura)  \nhttps://medium.com/@samajammin/how-to-interact-with-ethereums-mainnet-in-a-development-environment-with-ganache-3d8649df0876  \n(Current block number @ mainnet: https://etherscan.io/blocks )  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasaun%2FGLM-stake-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasaun%2FGLM-stake-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasaun%2FGLM-stake-pool/lists"}