{"id":15926402,"url":"https://github.com/zemse/pure-pos-solidity","last_synced_at":"2026-01-20T07:32:54.492Z","repository":{"id":119196512,"uuid":"267059423","full_name":"zemse/pure-PoS-solidity","owner":"zemse","description":"PoS in Solidity","archived":false,"fork":false,"pushed_at":"2025-06-24T08:55:15.000Z","size":437,"stargazers_count":1,"open_issues_count":13,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-27T23:47:28.078Z","etag":null,"topics":["pos","solidity","stake"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zemse.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-26T14:05:04.000Z","updated_at":"2022-04-06T18:56:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e3f9eb0-0d91-4f1c-b563-f7bf8fe8f3a1","html_url":"https://github.com/zemse/pure-PoS-solidity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zemse/pure-PoS-solidity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fpure-PoS-solidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fpure-PoS-solidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fpure-PoS-solidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fpure-PoS-solidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zemse","download_url":"https://codeload.github.com/zemse/pure-PoS-solidity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fpure-PoS-solidity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["pos","solidity","stake"],"created_at":"2024-10-06T22:40:38.712Z","updated_at":"2026-01-20T07:32:54.477Z","avatar_url":"https://github.com/zemse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pure PoS Solidity\n\nThis is an experimental smart contract logic that governs the selection of new validators based on Proof of Stake (PoS) for OpenEthereum's AuRa. Also, to discourage pools with extremely high stake and encourage split into more nodes, a quadratic power adjustment is to be used ([#7](https://github.com/zemse/pure-PoS-solidity/issues/7)).\n\n\u003e Note: This experiment is a work in progress and it is advised to not use these logics in production without a reliable audit.\n\nOngoing research work on this experiment is carried out in this repository's [issues](https://github.com/zemse/pure-PoS-solidity/issues). Suggestions, contributions and importantly, critics are greatly welcomed.\n\n## Test Results in Brief\n\nThese tests can be used to better judge the PoS performance of the smart contract logic.\n\nSituations in this test case:\n\n- `10` ganache wallets are used\n- Validator set of length `5`\n- `500` validator sets are generated (`500 x 5 = 2500`)\n- Entropy is dependent on previous block hash (for improvement [#10](https://github.com/zemse/pure-PoS-solidity/issues/10)).\n\n| Wallet     | Staked (`ETH`) | % Stake | Blocks Mined | % Result |\n| ---------- | -------------- | ------- | ------------ | -------- |\n| `0xc5..7D` | 50.0           | 21.7%   | 557          | 22.28%   |\n| `0x45..84` | 50.0           | 21.7%   | 518          | 20.72%   |\n| `0x34..5d` | 25.0           | 10.8%   | 289          | 11.56%   |\n| `0x0F..8d` | 25.0           | 10.8%   | 270          | 10.80%   |\n| `0x02..09` | 20.0           | 8.6%    | 220          | 8.88%    |\n| `0xB5..75` | 20.0           | 8.6%    | 205          | 8.20%    |\n| `0x89..F7` | 10.0           | 4.3%    | 124          | 4.96%    |\n| `0xB5..75` | 10.0           | 4.3%    | 111          | 4.44%    |\n| `0xCa..a9` | 10.0           | 4.3%    | 107          | 4.28%    |\n| `0x13..EB` | 10.0           | 4.3%    | 99           | 3.96%    |\n| `Total`    | `230.0`        | `100%`  | `2500`       | `100%`   |\n\nThis is the result for 2500 blocks. It was observed that when performed smaller tests, it resulted in inaccurate values of `%Result`. Higher the number of blocks, the `%Result` approaches `%Stake`.\n\n## Custom Tests\n\n1. `git clone https://github.com/zemse/pure-PoS-solidity.git`\n2. `cd pure-PoS-solidity`\n3. `npm i`\n4. If you want to flip staking amount values, just flip the numbers in `test/suites/Staking.test.ts` [Line #19](https://github.com/zemse/pure-PoS-solidity/blob/master/test/suites/Staking.test.ts#L17-L28)\n5. `npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fpure-pos-solidity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzemse%2Fpure-pos-solidity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fpure-pos-solidity/lists"}