{"id":31764137,"url":"https://github.com/tydev01/staking-contract","last_synced_at":"2025-10-09T23:45:55.948Z","repository":{"id":313898306,"uuid":"1053338556","full_name":"TYDev01/Staking-Contract","owner":"TYDev01","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-09T10:10:02.000Z","size":4611,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-09T13:33:22.455Z","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/TYDev01.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T10:05:13.000Z","updated_at":"2025-09-09T10:10:08.000Z","dependencies_parsed_at":"2025-09-09T13:43:45.750Z","dependency_job_id":null,"html_url":"https://github.com/TYDev01/Staking-Contract","commit_stats":null,"previous_names":["tydev01/staking-contract"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TYDev01/Staking-Contract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYDev01%2FStaking-Contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYDev01%2FStaking-Contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYDev01%2FStaking-Contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYDev01%2FStaking-Contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TYDev01","download_url":"https://codeload.github.com/TYDev01/Staking-Contract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYDev01%2FStaking-Contract/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002316,"owners_count":26083342,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-09T23:45:54.753Z","updated_at":"2025-10-09T23:45:55.940Z","avatar_url":"https://github.com/TYDev01.png","language":"Solidity","readme":"# Dynamic APR Staking Contract\n\nA Solidity smart contract for staking tokens with a dynamic APR system that adjusts based on total value locked (TVL).\n\n## Features\n\n- Initial 250% APR that reduces as TVL increases\n- Per-minute reward calculations\n- Minimum 1-day staking period\n- Emergency withdrawal with 50% penalty\n- Dynamic reward rate adjustment\n- Subgraph-friendly events\n- Comprehensive view functions\n\n## Contract Details\n\n- Initial APR: 250%\n- APR Reduction: 0.5% per 1000 tokens staked\n- Minimum Lock Duration: 1 day\n- Emergency Withdrawal Penalty: 50%\n- Reward Calculation: Per minute\n- Minimum APR: 10%\n\n## Development\n\nThis project uses [Foundry](https://book.getfoundry.sh/) for development and testing.\n\n### Prerequisites\n\n```bash\ncurl -L https://foundry.paradigm.xyz | bash\nfoundryup\n```\n\n### Installation\n\n```bash\nforge install\n```\n\n### Build\n\n```bash\nforge build\n```\n\n### Test\n\n```bash\nforge test\n```\n\n### Test Coverage\n\n```bash\nforge coverage\n```\n\n## Security Features\n\n- Reentrancy protection\n- Pausable functionality\n- Owner controls\n- Emergency withdrawal system\n- Token recovery for wrong tokens\n- Arithmetic overflow protection\n\n## View Functions\n\n- `getUserDetails`: Get comprehensive user staking information\n- `getPendingRewards`: Calculate pending rewards\n- `getTimeUntilUnlock`: Check remaining lock time\n- `getTotalRewards`: Get total rewards in contract\n\n## Events\n\nAll events include timestamps and relevant state changes for easy tracking and subgraph integration.\n\n## License\n\nMIT\n# Staking-Contract\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftydev01%2Fstaking-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftydev01%2Fstaking-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftydev01%2Fstaking-contract/lists"}