BasketSwap
{"title": "BasketSwap", "logoImg": "bafkreiciyz4kecs7weipyy5dvya5e3bjrfn4fk7rvtydurr5rqqiwg7oo4", "website": "https://basketswap.xyz", "bannerImg": "bafkreiapppcqkq6g3ak3ix7jl2qgle4kch6g7alp5gmwzba2t6fgvijrxu", "createdAt": 1723204422584, "userGithub": "teeeeeo9/basket-swap-stylus", "credentials": {}, "description": "# Summary\nBasketSwap is a Dapp that is under development on Arbitrum with Stylus that enables users to easily exchange a basket of tokens for a basket of other tokens in a single, optimized transaction.Think of a tool that would allow you to easily convert your crypto holdings into stablecoins at the best prices at an urgent moment - that's BasketSwap.\n\nBasketSwap was initially created to explore the possibilities of Stylus upon its release on Sepolia testnet. We believe that supporting this project would benefit the Arbitrum ecosystem since it bounds existing apps and provides a more convenient and efficient way to interact with liquidity pools, which might drive user adoption. Besides, the team is excited to build BasketSwap as its core functionality was not possible to implement before Stylus due to EVM memory limitations.\n\nGrant funding will be used to build BasketSwap's smart contracts and UI.\n\n ![alt text](https://github.com/teeeeeo9/basket-swap-stylus/blob/main/overview.png?raw=true)\n\n\n \n\n# About the project\nWhy build and use BasketSwap?\n\nA few potential use cases including:\n\n- exit specific stablecoin and swap into other crypto assets \n\n- exit all non-stable assets and swap into stablecoins\n\n- exit specific long-tail crypto holding and swap into other crypto assets \n\n- exchange all crypto assets into either top-tier crypto assets or stablecoins\n\n- exchange all stablecoins into top-tier crypto assets\n\n- etc\n\nAll above is executed entirely on-chain and can be used ad-hoc or as a building block for personal or community money management.\n\n \n\n \n\nThe user simply needs to specify their desired input and output tokens along with the quantities of the input tokens. BasketSwap takes care of the rest:\n\n1)  determines the pools, the routes and execution prices  based on pools liquidity data\n\n2) determines such allocation of basket that minimizes user's losses due to price impact\n\n3) performs all swaps\n\n \n\n# How it works\nThe smart contract solves an optimization problem - turns a single BasketSwap call into a series of atomic swaps across different pools and finds  routes and amounts for each swap to maximize the value of the returned token basket for the user. \n\nThe search for the best allocation is built using adaptive grid search algorithm.  It incorporates a diversification strategy to avoid local optima and dynamically adjusts the step size for efficient convergence. This approach is adaptable to various objective functions and works even when the underlying pricing functions are complex.\n\nThis algorithm requires a lot more memory than the EVM allows and it's now possible to implement though the use of Stylus.\n\n \n![alt text](https://github.com/teeeeeo9/basket-swap-stylus/blob/main/image.png?raw=true)\n\n \n\n# Current status\nWhile BasketSwap is not yet live, a proof of concept has been established. There is 1 person working on it and your support means the world to me.\n\n \n\n# The goal\nDeploy an MVP on Arbitrum initially integrating with Uniswap V3 pools. If funding permits, expand compatibility to include other DEXes on the network.\n\n ", "logoImgData": {}, "bannerImgData": {}, "projectGithub": "-", "projectTwitter": "-"}