{"id":15931343,"url":"https://github.com/cfelde/milliondai","last_synced_at":"2026-02-27T00:32:46.798Z","repository":{"id":51522015,"uuid":"259353740","full_name":"cfelde/milliondai","owner":"cfelde","description":"The Million DAI Website repo","archived":false,"fork":false,"pushed_at":"2021-05-11T12:04:41.000Z","size":319,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-10T05:39:06.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfelde.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}},"created_at":"2020-04-27T14:36:19.000Z","updated_at":"2021-06-01T21:00:31.000Z","dependencies_parsed_at":"2022-08-03T07:30:49.925Z","dependency_job_id":null,"html_url":"https://github.com/cfelde/milliondai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cfelde/milliondai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfelde%2Fmilliondai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfelde%2Fmilliondai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfelde%2Fmilliondai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfelde%2Fmilliondai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfelde","download_url":"https://codeload.github.com/cfelde/milliondai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfelde%2Fmilliondai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29879036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-10-07T01:20:32.767Z","updated_at":"2026-02-27T00:32:46.770Z","avatar_url":"https://github.com/cfelde.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Million DAI Website\n\nWelcome to [The Million DAI Website](https://milliondai.website) GitHub repo, where developer friendly information is shared about the website.\n\nAs outlined on [the about section](https://milliondai.website/about), in today's world, with blockchain and DeFi available, we can take the old million dollar homepage idea and make it new again. I hope this reincarnation can inspire people to create some fun and interesting tiles. I consider this a little art experiment, mixing modern technology with human behavior.\n\n## If you're a developer..\n\nEveryone's welcome to use milliondai.website when interacting with the smart contracts, but if you're a developer you might want direct access to content and tools. Below we describe these in more detail:\n\nThe site uses JSON files hosted on [data.milliondai.website](https://data.milliondai.website) to render the tiles. These files are updated every few minutes by the backend, fetching blockchain data as it gets updated. You can of course fetch blockchain data yourself if you'd like. The data.milliondai.website contains two sections, one for [Kovan](https://data.milliondai.website/kovan/index.html), and one for [Mainnet](https://data.milliondai.website/mainnet/index.html).\n\nTwo types of files are available:\n\n* pixels.json, describing the tiles rendered on the site\n* voting.json, describing voting and tile ownership data\n\n### pixels.json structure\n\nThe file contains a map, with the key being the left to right, top to bottom, tile offset. Each entry value contains:\n\n* A tile id, related to the offset\n* Owner, holding the current tile owner address\n* Price, and minNewPrice, holding the price of DAI, using 18 decimals. For example, 200000000000000000000 is equal to 200 DAI.\n* Pixels, a sequence of pixel colors, from left to right, top to bottom. A tile is 10 by 10 pixels big.\n* URI, holding a link to a JSON file with meta data. The JSON meta data file may contain a map of name, description and a URL.\n* Name, description, and URL, as fetched from the URI, might be included.\n\nAll keys are optional, with the exception of id, price, and minNewPrice.\n\n### voting.json structure\n\nThis file contains details about voting intervals, number of votes per tile, tile ownership and last winner details. Individual voting_X.json files are also produced each time a new winner has been selected.\n\nThe keys lowerVotingBlock, upperVotingBlock, and nextWinnerBlock give details about what block range this file includes, and at what block the next winner is selected.\n\nUnder the votes key you'll find a map of tile offset keys, like in pixels.json, with the tile id and total vote count for this tile.\n\nUnder the owners key you'll again find a map of tile offset keys, and the nested blocks key holds a map keyed by the owner address with the number of blocks held by that owner.\n\nFinally some details around the last winner and last update timestamp is given in lastWinnerAddress, lastWinnerBlock, lastWinnerTransaction, and lastUpdate.\n\n## Picking winners\n\nThe process of picking winners is as follows:\n\n* Take the block hash of the nextWinningBlock and use this as a seed\n* Go though the weighted tile votes and select a tile at random\n* Using the selected tile, go through the weighted tile owners, and select an owner at random\n\nThe selected owner is the winner of that round, with the process starting again. The next winner block is 45454 blocks into the future.\n\nYou can find the implementation for this under the picking-a-winner folder.\n\n## Contract source code\n\nWhile we've above focused on the JSON files, if you'd like to interact directly with the contracts you can find them as a truffle project under the milliondai-contract folder. These contracts leverage the [AKA protocol](https://akap.me) for much of their functionality, but you do not need to consider this if you just want to interact with them directly.\n\nThe MillionDAI contract is deployed under these addresses:\n\n* Kovan: 0x26b6739Fc3836A4442A7fC15d28fA0Abe15Dc4e0\n* Mainnet: 0xEe681CD9eD937700e859DA167676e2C730d037db\n\nThe MillionDAI token contract is deployed under these addresses:\n\n* Kovan: 0x4f5A0aF1877A2D4E18B52B7854312db25F5C03c8\n* Mainnet: 0xC5535Fb98315EDD20F6ad1F8C9D0303D0b96f869\n\n## MillionDAI CLI\n\nInteracting with the contracts directly isn't that difficult, but sometimes you just want a simple tool to make the job a bit easier. This is what the MillionDAI CLI allows you to do, and you'll find it under the milliondai-cli folder.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfelde%2Fmilliondai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfelde%2Fmilliondai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfelde%2Fmilliondai/lists"}