Transfers view
UTXO view
Obyte.org
Unit Legend
- not on main chain, not stable
- main chain, not stable
- bad unit
- not on main chain, stable/confirmed/final
- main chain, stable/confirmed/final
- not on main chain, selected
- main chain, selected
Close
Close
Unit ID
lDXsMeLFduHMUOhFgVZkkiLPmLabSyYYRd1CgtjFI0s=
Received
22.08.2021 21:01:10
Confirmation delay (full node)
3 minutes 4 seconds
Confirmation delay (light node)
5 minutes 0 seconds
Authors
DPYEPM34AUBLZFLCJKKGSJ3R34373IUA
Children
hoO6SYWIroUIZB8OShyV5sodwA9cO9n4xciPc0sKo90=
Parents
nRgOu2+ahb628l5zj1v9gYIQ67nAN++HfKHg6OZw4jc=
Messages
Definition
Address:
GHZL7TY2KJOIJK3K2OQWH6F45Q6JMLVY
Definition:
[ "autonomous agent", { "init": "{ $pool_aa = params.pool_aa; $fee = 2000; $pool_params = definition[$pool_aa][1].params; $asset0 = $pool_params.asset0; $asset1 = $pool_params.asset1; $amount0 = trigger.output[[asset=$asset0]] - ($asset0 == 'base' ? $fee : 0); $amount1 = trigger.output[[asset=$asset1]] - ($asset1 == 'base' ? $fee : 0); if ($amount0 <= 0) bounce("amount0 = " || $amount0); if ($amount1 <= 0) bounce("amount1 = " || $amount1); $reserve0 = balance[$pool_aa][$asset0]; $reserve1 = balance[$pool_aa][$asset1]; $ratio = $reserve1 / $reserve0; $expectedAmount1 = round($ratio * $amount0); if ($amount1 > $expectedAmount1){ $change0 = 0; $change1 = $amount1 - $expectedAmount1; } else if ($amount1 < $expectedAmount1){ // amount0 is too large $used_amount0 = floor($amount1 / $ratio); if ($used_amount0 > $amount0) bounce("BUG: " || $used_amount0 || " > " || $amount0); $newExpectedAmount1 = round($ratio * $used_amount0); if ($amount1 < $newExpectedAmount1) bounce("rounding issue: adjusted amount0 from " || $amount0 || " to " || $used_amount0 || " but amount1 " || $amount1 || " is still less than the new expected amount1 " || $newExpectedAmount1); $change0 = $amount0 - $used_amount0; $change1 = $amount1 - $newExpectedAmount1; } else{ $change0 = 0; $change1 = 0; } }", "messages": [ { "app": "payment", "payload": { "asset": "{$asset0}", "outputs": [ { "address": "{$pool_aa}", "amount": "{$amount0 - $change0}" }, { "address": "{trigger.address}", "amount": "{$change0}" } ] } }, { "app": "payment", "payload": { "asset": "{$asset1}", "outputs": [ { "address": "{$pool_aa}", "amount": "{$amount1 - $change1}" }, { "address": "{trigger.address}", "amount": "{$change1}" } ] } }, { "if": "{$asset0 != 'base' AND $asset1 != 'base'}", "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$pool_aa}" } ] } } ] } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
2,633
bytes
(452 headers, 2181 payload)
Level:
2250407
Witnessed level:
2250400
Last ball unit:
o4qYInl6Xq/kD568DFuLoNlPVf4qZfs84re6Isv4CmQ=
Main chain index:
2239283
Latest included mc index:
2239282
Status:
stable/confirmed/final