{"id":22938879,"url":"https://github.com/hardworking-toptal-dev/dao-lpstaking","last_synced_at":"2025-04-01T19:44:51.310Z","repository":{"id":239257032,"uuid":"785335223","full_name":"hardworking-toptal-dev/DAO-lpstaking","owner":"hardworking-toptal-dev","description":"DAO-liquild staking contract(NEAR)","archived":false,"fork":false,"pushed_at":"2024-08-12T05:52:33.000Z","size":1301,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T15:50:02.271Z","etag":null,"topics":["dao","liquid-staking","near-protocol"],"latest_commit_sha":null,"homepage":"https://www.metapool.app","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardworking-toptal-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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-04-11T17:20:24.000Z","updated_at":"2024-09-10T13:26:29.000Z","dependencies_parsed_at":"2024-05-11T03:25:26.694Z","dependency_job_id":"d8f4a628-c818-4e0d-b696-4c22874915a8","html_url":"https://github.com/hardworking-toptal-dev/DAO-lpstaking","commit_stats":null,"previous_names":["hardworking-toptal-dev/dao-lpstaking"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FDAO-lpstaking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FDAO-lpstaking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FDAO-lpstaking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FDAO-lpstaking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardworking-toptal-dev","download_url":"https://codeload.github.com/hardworking-toptal-dev/DAO-lpstaking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246704701,"owners_count":20820608,"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":["dao","liquid-staking","near-protocol"],"created_at":"2024-12-14T12:28:49.492Z","updated_at":"2025-04-01T19:44:51.293Z","avatar_url":"https://github.com/hardworking-toptal-dev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meta Pool DAO\n# NEAR Blockchain Implementation\n\n## Overview\nWhat is Meta-Pool and other non-Technical Documentation\n\n* [Meta Pool Docs](https://docs.metapool.app)\n\n## Audits\n* [BlockSec Audit v1.1, March 1th, 2022](https://www.metapool.app/MetaPool_BlockSec_Audit_signed_v1.1.pdf)\n* [BlockSec Audit, staking wNEAR with Meta Pool on Aurora, March 20th, 2022](https://370551154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkhZe3MGAhTcvTLTzJF-887967055%2Fuploads%2FXE1zBF4pyaWCoR1zlKwW%2Fmain_signed.pdf?alt=media\u0026token=5068e60d-2905-4d4f-a1cb-9d5fa4c607a3)\n\n## Technical Documentation\n* [Technical Notes](https://narwallets.github.io/meta-pool/technical-notes)\n\n* [NEAR Live Contract Review (video)](https://www.youtube.com/watch?v=4gB-6yoas74)\n\n### Change Log\n\n#### `2.0.0` - Dec 2022\n\n- Added active rebalance, to supoprt vote.metapool.app\n\n#### `1.2.1` - May 2022\n\n- NEAR gas computation will change, fix gas computation on dao upgrade instruction\n\n#### `1.2.0` - March 2022\n\n- All audit recommendations implemented\n- set all staking pools weights in a single call\n\n#### `1.1.0` - Dec 2021\n- new fn Realize_meta_massive to auto farm $META\n\n#### `1.0.0` - Apr 2021\n\n- Full functionality\n- Simplified user flow \n- Desk check testing https://github.com/Narwallets/sc-desk-check-parser\n\n#### `0.1.0` - Nov 2020\n\n- Initial version based on core-contracts/lockup and core-contracts/staking-pool\n- Deposit, withdraw\n- Distributed stake/unstake\n- NEAR/stNEAR liquidity pool, Add/Remove liquidity\n- META Minting with rewards\n\n### TO DO \u0026 Help needed\n\n\n#### Smart Contract  \n - [x] Deposit/withdraw\n - [x] Buy stNEAR/Stake\n - [x] Sell stNEAR/immediate unstake\n - [x] Classic unstake-wait-finish-unstake\n - [x] User trip-meter, measure rewards\n - [x] distribute staking/unstaking\n - [x] retrieve unstaked and ready\n - [x] NEAR/stNEAR Liquidity Pool, Add/Remove liquidity\n - [x] clearing mechanism on stake to restore liquidity in the NSLP\n - [x] act as a NEP-xxx MULTI-FUN-TOK (multi-token contract). Implement for NEAR, stNEAR and META\n - [ ] Dividends-pool stNEAR/META\n - [x] Staking-loans to whitelisted validators\n - [ ] Emergency Staking (from the nslp) to whitelisted validators\n\n#### Test\n - [x] Simulation tests\n - [x] Fuzzy Testing\n\n#### Staking pool list\n - [x] List selected staking pools, getting weight, staked \u0026 unstaked\n - [x] add a staking pool, set weight\n\n#### Governing\n - [x] Mint and distribute META with rewards\n - [x] Phase II - Governing DAO\n\n#### Infrastructure\n- [x] External cron to call distribute()\n- [x] compute remaining epoch time\n- [x] whitelist pools before adding them\n\n#### Expansions\n\n- [x] USDNEAR MVP: Create a collateral-based stablecoin similar to Compound's DAI, using NEAR \u0026 stNEAR as collateral\n\n\n## Testing\n\nAll tests are are performed in a separate project with an ad-hoc fuzzy test for metapool.\n\nThe test generates random operations. We have a list of \"invariants\" the contract must satisfy to guarantee the internal accounting is consistent. We use a seeded random generator to create \"operations\" against the metapool (deposit, liquid-unstake, delayed-unstake, add-liquidity, remove-liquidity, compute-rewards, retrieve-funds-from-pools, rebalance) in any order and amount. After each successful operation we check the contract invariants again. This is our way to tests unprepared operations combinations and make sure the internal accounting remains consistent\n\nThe tests are located in the folder metapool/test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Fdao-lpstaking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardworking-toptal-dev%2Fdao-lpstaking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Fdao-lpstaking/lists"}