{"id":27650445,"url":"https://github.com/kenken64/merlioncoin","last_synced_at":"2026-04-30T13:34:11.855Z","repository":{"id":100861674,"uuid":"141250709","full_name":"kenken64/MerlionCoin","owner":"kenken64","description":"Simple Blockchain written in Javascript","archived":false,"fork":false,"pushed_at":"2018-07-31T04:27:28.000Z","size":9089,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T03:39:30.254Z","etag":null,"topics":["nodejs","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/kenken64.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}},"created_at":"2018-07-17T07:41:05.000Z","updated_at":"2018-07-31T04:27:29.000Z","dependencies_parsed_at":"2023-06-02T05:30:26.412Z","dependency_job_id":null,"html_url":"https://github.com/kenken64/MerlionCoin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kenken64/MerlionCoin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FMerlionCoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FMerlionCoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FMerlionCoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FMerlionCoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenken64","download_url":"https://codeload.github.com/kenken64/MerlionCoin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenken64%2FMerlionCoin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32466333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"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":["nodejs","websocket"],"created_at":"2025-04-24T03:39:19.813Z","updated_at":"2026-04-30T13:34:11.844Z","avatar_url":"https://github.com/kenken64.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## The Merlion Stable Coin\n\n```\nnpm i nodemon --save-dev\nnpm i jest --save-dev\n```\n\nRuntime libraries\n```\nnpm i crypto-js --save\nnpm i express --save\n```\n## Node 1\n```\nnpm run dev\n```\n## Node 2\n```\nHTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev\n```\n## Node 3\n```\nHTTP_PORT=3003 P2P_PORT=5003 PEERS=ws://localhost:5001,ws://localhost:5002 npm run dev\n```\n\n## Proof of work\n(PoW) system (or protocol, or function) is an economic measure to deter denial of service attacks and other service abuses such as spam on a network by requiring some work from the service requester, usually meaning processing time by a computer.\n\n* Any peer can replace the chain\n* POW makes it expensive to generate corrupt chains\n* Is quite manageable to submit one block rather than the entire chain.\n\nBitcoin POW uses hashcash created since 1997 it is used to prevent for email spamming\nDifficulty = 6 \nHash = 000000haxi2910jasdfsjfd\n\nGenerate the hash until all the leading zeroes macthes.\nA nonce value adjust new hash is generated\n\nThe computation work is 'mining'\n\nThe difficulty sets a rate of mining \n\nBitcoin sets the rate to new block approximately around every 10 minutes.\n\n## 51% attack \n\n* Dishonest miner owns the 51% of the network power\n* A 51% attack for bitcoin would be more than $6 billion \n\nDynamic Block adjust difficulty\n* lastBlock timestamp + mine rate \u003e currentTime then we know is too easy increase difficulty\n +1 else -1\n\n ## Wallets, Keys and transaction\n\n ### What is a wallet?\n * Have a balance field\n * Store keys (Private Keys and Public Keys) Everyone sees the Public Keys\n Private Key - used to generate signatures\n Public Key - used to verify the signatures and also public account address\n\n ### Transactions\n * Input of the transaction details\n ** timestamp,balance and public key\n\n * Output chain as transactions\n\n ### Digital Signatures\n * Create wallet\n * Elliptic-curve cryptography (ECC) is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. ECC requires smaller keys compared to non-ECC cryptography (based on plain Galois fields) to provide equivalent security.\n * Install npm i elliptic --save \n\nMid 1980s \n\n y^{2}=x^{3}+ax+b,\\,\n\n https://www.youtube.com/watch?v=dCvB-mhkT0w\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenken64%2Fmerlioncoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenken64%2Fmerlioncoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenken64%2Fmerlioncoin/lists"}