{"id":18056946,"url":"https://github.com/shivankk26/efficient-bridge-estimator-api","last_synced_at":"2026-04-10T11:32:19.950Z","repository":{"id":260166224,"uuid":"880494042","full_name":"ShivankK26/Efficient-Bridge-Estimator-API","owner":"ShivankK26","description":"A user wants X USDC on lets say polygon. He has funds spread across many other chains. Now the API is to be designed to return the most efficient route/s to source X USDC from other chains. This can be done by bridging from one or more chains.","archived":false,"fork":false,"pushed_at":"2024-11-02T18:41:26.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T10:22:52.801Z","etag":null,"topics":["api","axios","backend","bridge","bun","elysia","git","github","nodejs","postman","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ShivankK26.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":"2024-10-29T20:34:04.000Z","updated_at":"2024-11-06T20:17:28.000Z","dependencies_parsed_at":"2025-02-10T21:10:23.399Z","dependency_job_id":null,"html_url":"https://github.com/ShivankK26/Efficient-Bridge-Estimator-API","commit_stats":null,"previous_names":["shivankk26/efficient-bridge-estimator-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShivankK26/Efficient-Bridge-Estimator-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FEfficient-Bridge-Estimator-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FEfficient-Bridge-Estimator-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FEfficient-Bridge-Estimator-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FEfficient-Bridge-Estimator-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShivankK26","download_url":"https://codeload.github.com/ShivankK26/Efficient-Bridge-Estimator-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShivankK26%2FEfficient-Bridge-Estimator-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274783042,"owners_count":25348893,"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-09-12T02:00:09.324Z","response_time":60,"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":["api","axios","backend","bridge","bun","elysia","git","github","nodejs","postman","typescript"],"created_at":"2024-10-31T02:05:31.866Z","updated_at":"2026-04-10T11:32:19.916Z","avatar_url":"https://github.com/ShivankK26.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Efficient-Bridge-Estimator-API\n\n**Problem Statement:** A user wants X USDC on lets say polygon. He has funds spread across many other chains. Now the API is to be designed to return the most efficient route/s to source X USDC from other chains. This can be done by bridging from one or more chains.\n\n## Tech Stack\n\nThe Tech Stack for Building this Project is - \n\n- TypeScript\n- Elysia and BunJS (for building the backend server)\n- axios (for API fetching)\n- ioredis (for caching using redis)\n\nI used the APIs of Socket Protocol (Bungee Exchange) for Building this Project and the Link for the same is as follows - \n\n- [Balance across all Chains](https://docs.bungee.exchange/socket-api-reference/balances-controller-get-balances)\n- [Bridge Fess across all Chains](https://docs.bungee.exchange/socket-api-reference/quote-controller-get-quote/)\n\n## Basics of Bun\n\nTo install dependencies:\n\n```bash\nbun install\n```\n\nTo run:\n\n```bash\nbun run dev\n```\n\nTo do caching using redis:\n\n```bash\nredis-server\n```\n\nThis project was created using `bun init` in bun v1.1.33. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.\n\n## `localhost` API URL\n\nBelow is the Link for the localhost API URL which anyone can try in their Machine. The average response time of the Socket Protocol APIs is around 5-7 secs, so this is the time which is being used.\n\n```\nhttp://localhost:3000/api/bridge-route?amount=100\u0026fromChainId=1\u0026fromTokenAddress=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\u0026toChainId=56\u0026toTokenAddress=0x7F5c764cBc14f9669B88837ca1490cCa17c31607\u0026fromAmount=100000000\u0026userAddress=0xC50A08633e285C096828532701E2Ba24A9AeF30E\u0026uniqueRoutesPerBridge=true\u0026sort=output\n```\n\n## Bridge Service Function\n\n\n\n## API Response Example\n\n```\n{\n    \"bestRoute\": [\n        {\n            \"fromChainId\": 1,\n            \"toChainId\": 137,\n            \"routeId\": \"f43a689f-225a-44ab-9193-41aba57653b0\",\n            \"fromAmount\": 0.00005,\n            \"toAmount\": 148509521.112748,\n            \"bridgeName\": \"polygon-bridge\",\n            \"totalGasFeesInUsd\": 8.960276516779464\n        }\n    ],\n    \"totalFee\": 8.960276516779464,\n    \"totalBridged\": 148509521.112748\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivankk26%2Fefficient-bridge-estimator-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivankk26%2Fefficient-bridge-estimator-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivankk26%2Fefficient-bridge-estimator-api/lists"}