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
x3huKXqh3EWrRyFlIvZ7nRNy1tiMXDIBeMdSIDmWj9k=
Received
19.11.2021 00:44:37
Confirmation delay (full node)
3 minutes 3 seconds
Confirmation delay (light node)
7 minutes 33 seconds
Authors
DPYEPM34AUBLZFLCJKKGSJ3R34373IUA
Children
4uBHfRBHqfMW2sSenyd5tuo7FtswzPam5Mq+sGKg1uU=
Parents
wJaCnssLgZOhtGp0VK6z4+1GoRaZ8yWmso4EdVegHx4=
Messages
Definition
Address:
4JF7ZEH3UAX6TPR2NX5LANEDNWKYP6YT
Definition:
[ "autonomous agent", { "bounce_fees": { "base": 10000 }, "init": "{ $POOL_BASE_AA = "5DNICJLNOBPANH536Y7YVBN5ZDBLQ4LE"; $asset = trigger.output[[asset!="base"]].asset == "none" ? "base" : trigger.output[[asset!="base"]].asset; if (NOT trigger.data["_fwto"]) bounce("_fwto field is mandatory"); if (NOT is_valid_address(trigger.data["_fwto"])) bounce("_fwto field is not a valid address"); if (trigger.output[[asset!="base"]].asset == "ambiguous") bounce("AAs cannot handle payments with multiple assets"); if (NOT trigger.data["_opr"]) bounce("_opr field is mandatory"); if (NOT is_valid_amount(trigger.data["_opr"])) bounce("_opr must be a positive amount"); if (NOT trigger.data["_pl"]) bounce("_pl field is mandatory"); if (NOT is_aa(trigger.data["_pl"])) bounce("_pl is not a valid oswap pool"); $definition = definition[trigger.data["_pl"]][1]; if ($definition["base_aa"] != $POOL_BASE_AA) bounce("That pool version is unsupported"); $getAmount = ($outputAmount, $outputReserve, $inputReserve, $fee)=>{ $swapNoFee = 1e11 - $fee; $numerator = $outputAmount * $inputReserve * 1e11; $denominator = ($outputReserve - $outputAmount) * $swapNoFee; return ceil($numerator / $denominator, 0); }; $calculateNeededAmount = ()=>{ $asset0 = $definition["params"]["asset0"]; $asset1 = $definition["params"]["asset1"]; $fee = $definition["params"]["swap_fee"]; $reserve0 = balance[trigger.data["_pl"]][$asset0]; $reserve1 = balance[trigger.data["_pl"]][$asset1]; if ($asset == $asset0) return $getAmount(trigger.data["_opr"], $reserve1, $reserve0, $fee); return $getAmount(trigger.data["_opr"], $reserve0, $reserve1, $fee); }; $price = $calculateNeededAmount(); if ($price > ($asset=="base" ? trigger.output[[asset="base"]].amount - 5000 : trigger.output[[asset=$asset]].amount)){ $BOUNCE = true; $remaining = $asset == "base" ? trigger.output[[asset="base"]].amount - 5000 : trigger.output[[asset=$asset]].amount; } else $remaining = $asset=="base" ? trigger.output[[asset="base"]].amount - $price - 5000 : trigger.output[[asset=$asset]].amount - $price; }", "messages": [ { "app": "payment", "payload": { "asset": "{$asset}", "outputs": [ { "address": "{trigger.data["_loa"] OTHERWISE trigger.initial_address}", "amount": "{$remaining}" }, { "if": "{NOT $BOUNCE}", "address": "{trigger.data["_pl"]}", "amount": "{$price}" } ] } }, { "app": "data", "payload": { "to": "{trigger.data["_fwto"]}" } } ] } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
3,545
bytes
(452 headers, 3093 payload)
Level:
2482746
Witnessed level:
2482737
Last ball unit:
kdr98v+Yk16Qcw0tiKhnFk3yfzKypxa87ZJR8tw9yJs=
Main chain index:
2463656
Latest included mc index:
2463655
Status:
stable/confirmed/final