ebtc-protocol / ebtc-multisig

eBTC's EVM multisig operations.
GNU Affero General Public License v3.0
0 stars 0 forks source link

feat: use a more dynamic approach to calc the upper bound of the bina… #48

Closed petrovska-petro closed 2 months ago

petrovska-petro commented 3 months ago

closes #47

petrovska-petro commented 3 months ago

at current pool state, the new method would return a value around:

max_wbtc_amount=3.30631972

cross-checking against cow ui, a few more increases of .1 will return less $ebtc in the swap

check if you think that is worth to be more aggressive on the upper bound, imo it will not be necessary since the binary tree search will never be too near to the upper bound to bring the pool to theoretical peg