{"id":15695899,"url":"https://github.com/vectorized/qdes","last_synced_at":"2025-10-17T07:49:05.453Z","repository":{"id":74718802,"uuid":"487489491","full_name":"Vectorized/QDES","owner":"Vectorized","description":"Quadratic Decay Exponential Surge","archived":false,"fork":false,"pushed_at":"2022-08-22T12:09:22.000Z","size":55,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-04T04:59:03.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Vectorized.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}},"created_at":"2022-05-01T08:57:36.000Z","updated_at":"2024-07-17T02:15:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"42b17eec-af09-4d3c-8cd0-d2b98dbfc321","html_url":"https://github.com/Vectorized/QDES","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.06666666666666665,"last_synced_commit":"94292a4fb93cb6af521e22d70aa213e8cbebf109"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Vectorized/QDES","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FQDES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FQDES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FQDES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FQDES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vectorized","download_url":"https://codeload.github.com/Vectorized/QDES/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FQDES/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279304886,"owners_count":26144142,"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-17T02:00:07.504Z","response_time":56,"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":"2024-10-03T19:05:19.294Z","updated_at":"2025-10-17T07:49:05.414Z","avatar_url":"https://github.com/Vectorized.png","language":"Solidity","readme":"# QDES\n\nQuadratic Decay Exponential Surge (QDES), is a simple adaptive price mechanism for selling NFTs.\n\nWhen the demand is high, the price of each NFT increases.\n\nWhen the demand is low, the price of each NFT decreases.\n\nIt is an approximate version of [Constant Rate Issuance Sales Protocol (CRISP)](https://www.paradigm.xyz/2022/01/constant-rate-issuance-sales-protocol).\n\n## Benefits\n\n- Generalizable to projects. \n\n  - All popularity levels. \n  - All mint periods, be it an hour to years.\n  - All EVM compatible blockchains, as it uses `block.timestamp` instead of `block.number`.\n\n- Enable price discovery.\n\n- FUD resistant. \n\n  - Dutch Auctions starting at high prices are prone to FUD.\n  - QDES allows market to decide.\n\n- Minimal gas fees.\n\n  - Only one `SLOAD` and `SSTORE` overhead per tx.\n\n- Simple.\n\n  - One transaction. No need for separate push or pull refund step.\n\n- Flexible.\n\n  - Function overloading API allows you to replace constants with functions.\n\n## Usage\n\n```solidity\n\npragma solidity ^0.8.4;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport \"erc721a/contracts/ERC721A.sol\";\nimport \"./QDES.sol\";\n\ncontract Something is ERC721A, Ownable, QDES {\n    constructor() ERC721A(\"Something\", \"SMTH\") {}\n\n    function startSale() external onlyOwner {\n    \t_qdesStart();\n    }\n\n    function mint(uint256 quantity) external payable {\n        _safeMint(msg.sender, quantity);\n        \n        // This will automatically charge payment, refund excess, \n        // and re-adjust prices.\n        _qdesPurchase(quantity);\n    }\n}\n```\n\n## Recommendations\n\nBecause the price can fluctuate upwards, your UI must include an extra field to allow users to specify the maximum price per token (e.g. 2x the currentPrice).\n\n## Contributing\n\n1. Fork the Project\n2. Create your Feature Branch (git checkout -b feature/AmazingFeature)\n3. Commit your Changes (git commit -m 'Add some AmazingFeature')\n4. Push to the Branch (git push origin feature/AmazingFeature)\n5. Open a Pull Request\n\n### Running tests locally\n\nThis repo uses [Foundry](https://github.com/gakonst/foundry).\n\n- `forge install`\n- `forge test`\n\n## Roadmap\n\n- Create Python simulation (preferably agent based).\n- Create a writeup on the logic behind it.\n- Make a sample NFT contract that uses it.\n- Make a sample frontend UI to demonstrate how to implement it.\n- Make ERC20 version.\n\nFeel free to help on any of the points. \n\n## Disclaimer\n\nThis is **experimental software** and is provided on an \"as is\" and \"as available\" basis.\n\nThe code is still under heavy development and testing, and is not audited.  \n\nThe author(s) will not be liable for any damages or losses.\n\n## License\n\nMIT","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorized%2Fqdes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorized%2Fqdes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorized%2Fqdes/lists"}