yuichiroaoki / poly-flash

Flashloan on Polygon
https://yuichiroaoki.medium.com/no-flashloan-fee-with-dodo-cc78215d7f93
MIT License
294 stars 174 forks source link

Maximum Flashloan amount on dodo #58

Open dani-s-92 opened 2 years ago

dani-s-92 commented 2 years ago

Hello,

you do not check the maximum flashloan amount you can get from dodo if I read your code correctly. If I am wrong can u tell me where you do that?

If not it would be necessary to do it I think, because now your trade can get reverted because the flashloan you are asking for is bigger than the max available flashloan isn't it?

Best regards

yuichiroaoki commented 1 year ago

Yes, correct. You should check the token balance of the dodo pool you're going to borrow from. However, maybe using balancer flashloan is better than dodo in terms of every aspect like pool size, kinds of tokens available, contract interface, etc.