{"id":15822939,"url":"https://github.com/sambacha/swap-compare","last_synced_at":"2026-01-08T09:51:42.365Z","repository":{"id":103232936,"uuid":"395629530","full_name":"sambacha/swap-compare","owner":"sambacha","description":"Solidity/Ethereum knowledge test: trade/swap implementation assessment ","archived":false,"fork":false,"pushed_at":"2024-02-23T08:42:20.000Z","size":1773,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T23:44:45.961Z","etag":null,"topics":["ethereum","flashbots","mev","skill-test","skill-tests","solidity","sushiswap","uniswap"],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/sambacha.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":"2021-08-13T11:30:25.000Z","updated_at":"2024-02-23T08:42:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"274c1d9a-bb74-4959-841e-aeb5d767b743","html_url":"https://github.com/sambacha/swap-compare","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.33333333333333337","last_synced_commit":"9393520782be354422ca1844da8b80798e15ac61"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fswap-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fswap-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fswap-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fswap-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sambacha","download_url":"https://codeload.github.com/sambacha/swap-compare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246710011,"owners_count":20821315,"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":["ethereum","flashbots","mev","skill-test","skill-tests","solidity","sushiswap","uniswap"],"created_at":"2024-10-05T08:01:50.678Z","updated_at":"2026-01-08T09:51:42.318Z","avatar_url":"https://github.com/sambacha.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwapMeHarder\n\n\n\u003e [!IMPORTANT]\n\u003e This is an example showing the usage difference between case/switch vs. If/else \n\nCompare the implementation of the two different  functions in `contracts/SwapMeHarder.sol`. \nThey are suppose to implement a swap functionality for trading. They achieve the same* results, but from slightly different ways.\n\n\u003e [!WARNING]\n\u003e *same* is, well, you will see.\n\n\u003cbr\u003e\n\n\n## Objectives\n\ncalculate: transaction cost \u003cbr\u003e\ncalculate: execution cost \u003cbr\u003e\ndetermine best implementation for general use case \u003cbr\u003e\ndetermine best implementation for bespoke/specific use case \u003cbr\u003e\n\n## Brownie points: \nAny defects or anti-patterns? \u003cbr\u003e\nAny additional optimizations? *(Yul versions do not count!)*\n\n## Key Results\nDecided which one to use, and any additional caveats \u003cbr\u003e\nWhat further enhancements could be made?  \u003cbr\u003e\n\n## Summary \n\nWhich implementation is gas minimizing? \u003cbr\u003e\nWhich implementation is `better`? Does the answer depend on pairs/markets/etc? \u003cbr\u003e\n\n\u003cbr\u003e\n\n\n## License \n\nMIT\n\n## Notice\n\n![](.github/iu.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambacha%2Fswap-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsambacha%2Fswap-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambacha%2Fswap-compare/lists"}