Open stefangabos opened 2 years ago
Me too
For Balancer or Curve, it's quite complicated to solve for the best solution. Suggest to trying calculate it off-chain by using tools such as scipy or you can use an off-chain binary searching for an optimized borrow amount.
For Uniswap V3, I only suggest using binary searching for an optimized borrow amount.
@stefangabos @yoongyy how much? I have a formulation that I'm using in my bots, that I'm willing to sell, depending on price and use case. Also have optimal amounts for triangular arbitrages.
@stefangabos @yoongyy how much? I have a formulation that I'm using in my bots, that I'm willing to sell, depending on price and use case. Also have optimal amounts for triangular arbitrages.
The important part is not the formula, but Balancer/Curve is Vault, so it is not like normal pool like WBNB/BUSD in PancakeSwap. I need the script to calculate the borrow amount from Vault and selling amount on Dex or from Dex to Vault, off chain and on chain (if possible).
@paco0x Would you mind explaining a bit further the way you would implement the binary search for the optimized borrow amount? I'm trying to code my flashswap contract from scratch bit I'm struggling with this part
@mtyou pm me on twitter @samlafer
i am willing to pay for it