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
4D1L9CUqi6/WRK7po8HqY1spXTpjb8U5UBclFYkXHJA=
Received
24.08.2021 04:52:25
Confirmation delay (full node)
10 minutes 49 seconds
Confirmation delay (light node)
11 minutes 43 seconds
Authors
CGM242MYMMVKHXLPDNYI5NNIAHZRHKPI
Children
DkvrX3fWjVoxplRw7J7IjDmQGt32Pli8f7bQBtCBnnM=
Parents
KEWWcAt8bGWWC2SoXUBcccaBm9psBNzT+5eMIE99VMM=
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
2TO6NYBGX3NF5QS24MQLFR7KXYAMCIE5
4GDZSXHEFVFMHCUCSHZVXBVF5T2LJHMU
APABTE2IBKOIHLS2UNK6SAR4T5WRGH2J
DXYWHSZ72ZDNDZ7WYZXKWBBH425C6WZN
FAB6TH7IRAVHDLK2AAWY5YBE6CEBUACF
FOPUBEUPBC6YLIQDLKL6EW775BMV7YOH
GFK3RDAPQLLNCMQEVGGD2KCPZTLSG3HN
I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT
JMFXY26FN76GWJJG7N36UI2LNONOGZJV
JPQKPRI5FMTQRJF4ZZMYZYDQVRD55OTC
TKT4UESIKTTRALRRLWS4SENSTJX6ODCW
UE25S4GRWZOLNXZKY4VWFHNJZWUSYCQC
Technical information
Fees:
2,554
bytes
(451 headers, 2103 payload)
Level:
8047537
Witnessed level:
8047528
Last ball unit:
Jyx3F4/HOTSjUxhhXDVvIAxFfjHitgw4bgvf5CnEWh0=
Main chain index:
7728338
Latest included mc index:
7728337
Status:
stable/confirmed/final