{"id":21320542,"url":"https://github.com/metastable-labs/incentives","last_synced_at":"2025-03-15T22:34:47.299Z","repository":{"id":252114687,"uuid":"839375922","full_name":"metastable-labs/incentives","owner":"metastable-labs","description":"Contract for Supermigrate incentives","archived":false,"fork":false,"pushed_at":"2024-08-18T14:38:49.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-22T11:34:27.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","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/metastable-labs.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,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T13:37:52.000Z","updated_at":"2024-08-18T14:38:52.000Z","dependencies_parsed_at":"2024-08-18T15:49:30.808Z","dependency_job_id":null,"html_url":"https://github.com/metastable-labs/incentives","commit_stats":null,"previous_names":["metastable-labs/incentives"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metastable-labs%2Fincentives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metastable-labs%2Fincentives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metastable-labs%2Fincentives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metastable-labs%2Fincentives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metastable-labs","download_url":"https://codeload.github.com/metastable-labs/incentives/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801610,"owners_count":20350105,"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-11-21T19:48:14.729Z","updated_at":"2025-03-15T22:34:47.259Z","avatar_url":"https://github.com/metastable-labs.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supermigrate Incentives\n\n## Overview\n\nThis system manages MIGRATE points, which users earn through various actions, and allows users to claim xpMigrate tokens based on their accumulated points.\n\n## Project Structure\n\nThe project consists of several smart contracts:\n\n- `Points.sol`: Manages the accumulation and tracking of MIGRATE points.\n- `Helper.sol`: Handles multipliers, tier calculations, and bonus mechanisms.\n- `xpMigrate.sol`: Implements the soulbound ERC20 token (non-upgradeable).\n- `Claim.sol`: Manages the claiming process for xpMigrate tokens.\n- Proxy contracts: `PointsProxy.sol`, `HelperProxy.sol`, `ClaimProxy.sol`\n- `SupermigrateProxyAdmin.sol`: Manages proxy contracts for upgrades.\n\n## Key Features\n\n- Upgradeable contract system (except for xpMigrate)\n- Flexible point accumulation with action-specific multipliers\n- Tier-based claiming system with cooldown periods\n- Non-transferrable xpMigrate tokens\n- Backend-only access for certain critical functions\n\n## Prerequisites\n\n- [Foundry](https://github.com/foundry-rs/foundry)\n- Solidity 0.8.x\n\n## Installation\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/your-repo/supermigrate.git\n   cd supermigrate\n   ```\n\n2. Install dependencies:\n   ```sh\n   forge install\n   ```\n\n## Compilation\n\nCompile the smart contracts using Forge:\n\n```sh\nforge build\n```\n\n## Testing\n\nRun the test suite using Forge:\n\n```sh\nforge test\n```\n\nFor more verbose output, use:\n\n```sh\nforge test -vv\n```\n\n## Usage\n\n### For Users\n\nUsers interact primarily with the Claim contract to claim their xpMigrate tokens:\n\n1. Accumulate MIGRATE points through various actions (handled by backend).\n2. Call the `claim` function on the Claim contract to receive xpMigrate tokens.\n\n### For Administrators\n\n1. Use the SupermigrateProxyAdmin contract to manage upgrades.\n2. Update multipliers and tier data through the Helper contract.\n3. Adjust the dynamic multiplier for token claims through the Claim contract.\n\n## Upgrading Contracts\n\nTo upgrade a contract:\n\n1. Deploy a new implementation contract.\n2. Call `upgrade` or `upgradeAndCall` on the SupermigrateProxyAdmin contract, specifying the proxy address and the new implementation address.\n\n## Security Considerations\n\n- Ensure only authorized backends can call restricted functions.\n- Regularly audit the contracts, especially after upgrades.\n- Use multi-sig wallets for admin functions to enhance security.\n- Implement emergency stop mechanisms in case of detected vulnerabilities.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetastable-labs%2Fincentives","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetastable-labs%2Fincentives","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetastable-labs%2Fincentives/lists"}