mevcheb/optimal-sandwich
حول
we do a little bit of mathematics to make a little bit of money
العلوم والهندسةالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- +١
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلOptimal sando frontrun amount
Haven’t public code/math for calculating optimal frontrun sandwich amounts (@libevm’s subway and @Supercycled cake_sniper both use binary search) so here’s a thread on how to derive perfect sando amounts:
The problem statement is: given some amountIn and amountMinOut (from a pending tx), what is the worst ratio (price) between the uniswap reserves must be such that the swap still goes through? Once we know the worst ratio, we can calculate exactly how much $ we need to push the pool to this ratio.
We should do this onchain at the time of execution, rather than offchain in a binary search. So that if someone beats us to the frontrun, we won’t get rekt and revert the meat transaction.

استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…