Uniswap / routing-api
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing Uniswap/routing-api in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewUniswap Routing API This repository contains routing API for the Uniswap V3 protocol. It deploys an API to AWS that uses @uniswap/smart-order-router to search for the most efficient way to swap token A for token B. Development To develop on the Routing API you must have an AWS account where you can deploy your API for testing. Deploying the API The best way to develop and test the API is to deploy your own instance to AWS. • Install and configure AWS CLI and AWS CDK V1. • Create .env file in the root directory of the project with : • Install and build the package • To deploy the API run: This will deploy to the default account your AWS CLI is configured for. Once complete it will output something like: You can then try it out: Tenderly Simulation • To get a more accurate estimate of the transaction's gas cost, request a tenderly simulation along with the swap. This is done by setting the optional query param "simulateFromAddress". For example: • Tenderly simulates the transaction and returns to us the simulated gasLimit as 'gasUseEstimate'. We use this gasLimit to update all our gas estimate heuristics. In the response body, the fields will be updated/calculated using tenderly gasLimit estimate. These fields are already present even without Tenderly simulation, however in that case they are simply heuristics. The Tenderly gas estimates will be more accurate. • If the simulation fails, there will be one more field present in the response body: 'simulationError'. If this field is set and it is set to true, that means the Tenderly Simulation failed. The fields will still be included, however they will be heuristics rather then Tenderly estimates. These heuristic values are not reliable for sending transactions on chain. Testing Unit Tests Unit tests are invoked by running in the root directory. A 'watch' mode is also supported by running . Integration Tests Integration tests run against a local DynamoDB node deployed using dynamodb-local. Note that JDK 8 is a dependency of this package. Invoke the integration tests by running in the root directory. End-to-end Tests The end-to-end tests fetch quotes from your deployed API, then execute the swaps on a Hardhat mainnet fork. • First deploy your test API using the instructions above. Then update your file with the URL of the API, and the RPC URL of an archive node: • Run the tests with: