{"id":26270892,"url":"https://github.com/peopay/peopay-core","last_synced_at":"2025-05-01T13:20:36.251Z","repository":{"id":267563513,"uuid":"901640078","full_name":"PeoPay/PeoPay-Core","owner":"PeoPay","description":"PeoPay-Core is the foundational codebase of the PeoPay ecosystem, providing smart contracts for the PeoCoin (PEO) token, staking, governance, crypto-to-mobile conversion, and Dynamic Contribution Scoring (DCS), ensuring secure, transparent, and extensible decentralized functionality.","archived":false,"fork":false,"pushed_at":"2024-12-30T12:04:25.000Z","size":2144,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-30T21:22:52.414Z","etag":null,"topics":["defi","evm-chains","mobile-money","p2p","polygon","solidity","stacking","web3"],"latest_commit_sha":null,"homepage":"https://peopay.io/","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/PeoPay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audits/SELF-AUDIT.md","citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T03:24:41.000Z","updated_at":"2024-12-30T12:33:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0a7ec53-0532-4d8d-9c83-af074cfc9811","html_url":"https://github.com/PeoPay/PeoPay-Core","commit_stats":null,"previous_names":["peopay/peopay-core"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeoPay%2FPeoPay-Core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeoPay%2FPeoPay-Core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeoPay%2FPeoPay-Core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeoPay%2FPeoPay-Core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeoPay","download_url":"https://codeload.github.com/PeoPay/PeoPay-Core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251879541,"owners_count":21658767,"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","evm-chains","mobile-money","p2p","polygon","solidity","stacking","web3"],"created_at":"2025-03-14T06:17:42.857Z","updated_at":"2025-05-01T13:20:36.231Z","avatar_url":"https://github.com/PeoPay.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PeoPay-Core\n[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Docs](https://img.shields.io/badge/docs-peopay.io-informational)](https://docs.peopay.io/)\n[![Website](https://img.shields.io/badge/website-peopay.io-blue)](https://peopay.io/)\n[![Network: Polygon](https://img.shields.io/badge/network-polygon-8247E5?logo=polygon)](https://polygon.technology/)\n[![ERC-20 Standard](https://img.shields.io/badge/ERC-20-blue.svg)](https://eips.ethereum.org/EIPS/eip-20)\n[![Made with Foundry](https://img.shields.io/badge/made%20with-foundry-blueviolet.svg)](https://book.getfoundry.sh/)\n[![Uses OpenZeppelin Contracts](https://img.shields.io/badge/OpenZeppelin-Contracts-brightgreen.svg)](https://openzeppelin.com/contracts/)\n[![Verified on Polygonscan](https://img.shields.io/badge/verified%20on-polygonscan-blue.svg)](https://polygonscan.com/)\n\n## Amoy Testnet Contracts\n\n| Contract   | Address                                    | Description                                                        |\n|------------|--------------------------------------------|--------------------------------------------------------------------|\n| PeoCoin    | [0x7d66d92a1cba3d8775890a6815eb17f45efdb2e1](https://www.oklink.com/amoy/token/0x7d66d92a1cba3d8775890a6815eb17f45efdb2e1) | Test deployment of PEO token on the Amoy Testnet.                  |\n| Staking    | [0x122B9bE8de0e9288C1c8201378086D04b4FFD265](0x122B9bE8de0e9288C1c8201378086D04b4FFD265) | Test deployment of Staking contract on the Amoy Testnet.           |\n| DCS        | [0x26EeB0c59277D00df23204b86A9C5beE4E9c3DA7](https://www.oklink.com/amoy/address/0x26eeb0c59277d00df23204b86a9c5bee4e9c3da7) | Test deployment of Dynamic Contribution Scoring on the Amoy Testnet. |\n\n**PeoPay-Core** is the foundational repository for the [PeoPay](https://peopay.io/) ecosystem. It contains the core smart contracts and logic for the PeoCoin token (PEO), staking, governance, conversion (crypto-to-mobile), and the Dynamic Contribution Scoring (DCS) system. These contracts form a decentralized infrastructure that supports staking rewards, governance proposals, transaction conversions, and a flexible scoring mechanism to reward active contributors.\n\nFor a detailed technical overview and developer guides, refer to the official [PeoPay Documentation](https://docs.peopay.io/).\n\n---\n\n## Overview\n\n- **PeoCoin (PEO):**  \n  An ERC-20 token serving as the primary utility token in the PeoPay ecosystem. Mintable, burnable, and managed by an owner account.\n\n- **Staking:**  \n  Enables users to stake PEO tokens to earn rewards over time. Includes lock periods, APY calculations, and optional tier multipliers.\n\n- **Governance:**  \n  Empowers PEO holders to propose and vote on ecosystem changes. Voting power is determined by DCS scores to reward active participants.\n\n- **DCS (Dynamic Contribution Scoring):**  \n  Computes a user’s contribution score based on PEO balance, staking duration, governance participation, and other metrics. Scores influence staking rewards and governance voting power.\n\n- **Conversion (Crypto-to-Mobile):**  \n  Facilitates off-chain conversion of PEO to mobile money. Users request conversions, and the backend service confirms them, enabling seamless integration with traditional financial systems.\n\n---\n\n## Repository Structure\n\n```plaintext\nPeoPay-Core/\n├── src/                          # Core contracts\n│   ├── PeoCoin.sol               # PEO ERC-20 token\n│   ├── Staking.sol               # Staking logic and rewards\n│   ├── Governance.sol            # Governance proposals and voting\n│   ├── Conversion.sol            # Crypto-to-mobile conversion logic\n│   ├── DCS.sol                   # Dynamic Contribution Scoring (DCS)\n│   └── interfaces/               # Interface definitions\n│       ├── IPeoCoin.sol\n│       ├── IDCS.sol\n│       └── IStaking.sol\n├── test/                         # Foundry test files\n│   ├── PeoCoin.t.sol\n│   ├── Staking.t.sol\n│   ├── Governance.t.sol\n│   ├── Conversion.t.sol\n│   └── DCS.t.sol\n├── script/                       # Foundry deployment scripts\n│   ├── DeployPeoCoin.s.sol\n│   ├── DeployStaking.s.sol\n│   ├── DeployDCS.s.sol\n│   ├── DeployGovernance.s.sol\n│   └── DeployConversion.s.sol\n├── foundry.toml                  # Foundry configuration\n├── .env.example                  # Example environment variable file\n├── README.md                     # This README\n```\n\n---\n\n## Prerequisites\n\n- **Foundry:** A fast, portable, and modular development framework for Ethereum.  \n  Install Foundry by running:\n  ```bash\n  curl -L https://foundry.paradigm.xyz | bash\n  foundryup\n  ```\n\n- **A Test Network \u0026 Provider:** Use [Infura](https://infura.io/) or [Alchemy](https://www.alchemy.com/) for RPC endpoints.\n\n---\n\n## Environment Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/PeoPay/PeoPay-Core.git\n   cd PeoPay-Core\n   ```\n\n2. Install dependencies:\n   ```bash\n   forge install\n   ```\n\n3. Configure the `.env` file for deployment:\n   ```bash\n   cp .env.example .env\n   ```\n   Fill in the following fields:\n   - `PRIVATE_KEY`: Your wallet's private key.\n   - `RPC_URL`: The RPC endpoint for your desired network.\n   - `ETHERSCAN_API_KEY`: API key for contract verification (optional).\n\n---\n\n## Compilation \u0026 Testing\n\n### Compile Contracts\nRun the following command to compile the contracts:\n```bash\nforge build\n```\n\n### Run Tests\nRun the provided test suite using Foundry:\n```bash\nforge test\n```\n\n### Advanced Testing\n- **Gas Usage Analysis**:\n  ```bash\n  forge test --gas-report\n  ```\n- **Verbose Output**:\n  ```bash\n  forge test -vvv\n  ```\n\n---\n\n## Deployment\n\nDeploy contracts using Foundry scripts. Update `script/*.s.sol` files with deployment parameters and run:\n\n```bash\nforge script script/DeployPeoCoin.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast\n```\n\nTo verify the deployed contracts on Etherscan:\n```bash\nforge verify-contract --chain-id \u003cchain_id\u003e --compiler-version \u003csolc_version\u003e \u003ccontract_address\u003e \u003ccontract_path\u003e --etherscan-api-key $ETHERSCAN_API_KEY\n```\n\n---\n\n## Code Coverage\n\nGenerate a coverage report using `forge coverage`:\n```bash\nforge coverage\n```\n\n---\n\n## Security \u0026 Audits\n\nBefore deploying to mainnet:\n- Conduct a third-party audit.\n- Use tools like `slither` and `mythril` for static analysis.\n- Launch a bug bounty program.\n\n---\n\n## Contributing\n\n1. Fork the repository and create a feature branch.\n2. Write tests for new features or fixes.\n3. Submit a pull request with a detailed description.\n\n---\n\n## Additional Resources\n\n- **Website:** [peopay.io](https://peopay.io/)\n- **Documentation:** [docs.peopay.io](https://docs.peopay.io/)\n\n---\n\n## Contact \u0026 \n\n- Open an issue for support or feature requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeopay%2Fpeopay-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeopay%2Fpeopay-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeopay%2Fpeopay-core/lists"}