Closed Firdausfarul closed 2 years ago
Seems u got additional assets from the profit of YBX trading, 1 YBX got 3Million USDC, congrats
Dang it, this is a problem/misapplication with Horizon API. A new liquidity pool fucks up things. So this is probably what happened.
I speculate that the amount of USDC liquidity provided by the market makers also fetched from Path for Path Payment Strict Send. It only provided liquidity for EURT & USDC - YBX, because the bot thinks that there's enough liquidity for the earlier 2 transaction. There aren't enough liquidity for USDC & EURT because the price is so high that you can't even buy 1 stroop of YBX with it. Remember that during ETH trade, it costs ~150k for 1 YBX, meanwhile both USDC and EURT sent amount are worth less than ~150k USDC.
Since Liquidity pool transaction are interleavable, a weird thing will happen with Horizon Path for Path Payment Strict Send API, it'll return something like this chart
I think SDF need to "Fix" the API or do something with this. Maybe orbitlens was right with his CAP 37 after all. This abnormality mostly doesn't effect most apps, since most app have their Minimum Received amount setted not on 0.0000001 (I know YBX goes with 1 stroop because it's liquidation, it must be sold at all cost.). This problem can be considered very rare edge case though, you need an order exceeding orderbook depth and have near zero minimum received amount.
Good catch on this - we were able to successfully file this with against Horizon - https://github.com/stellar/go/issues/4014
While this isn't technically a bug against our protocol, I still want to award this something.
Discord : Fahrul#7469
Liq Pool Id : d600a004ecf7d07b4b2305ae9a7305e402bed3e0a16375ca948177c25798a65d The weird transaction : https://horizon-testnet.stellar.org/operations/2231858280542227 https://horizon-testnet.stellar.org/operations/2231858280542228