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
+WjKdyhAlGtu5DDY1V974tINwBLW0uvKn26RyTuXchg=
Received
01.05.2021 11:21:02
Confirmation delay (full node)
23 minutes 50 seconds
Authors
QF3NOVWHY2ZBVZZ2QHCUW7IPYXKLGIGG
Children
62CmVlrbxv1/O42+9afJeE8H5K4bmdWRmbUMTNGKdxU=
Parents
85YvWL43aHwy3OjoKsXu7w/bwkHdNJh15z7/YeLQFn8=
Messages
Definition
Address:
MFOHNSFGMNEBB36DIYVQ7OVSTJTNHBNW
Definition:
[ "autonomous agent", { "doc_url": "https://raw.githubusercontent.com/jldevelops/stabloswap/main/description.json", "getters": "{ $get_growth_factor = ($curve) => { $interest_rate = var[$curve]['interest_rate']; $term = (timestamp - var[$curve]['rate_update_ts']) / (360 * 24 * 3600); // in years $growth_factor = var[$curve]['growth_factor'] * (1 + $interest_rate)^$term; $growth_factor }; $pool_addr = => params.pool; $asset0_stable_addr = => params.stable0; $asset1_stable_addr = => params.stable1; $get_stable0_bal = () => { $curve = definition[$asset0_stable_addr()][1].params.curve_aa; $gr = $get_growth_factor($curve); return balance[$pool_addr()][var[$curve]['asset2']]*$gr; }; $get_stable1_bal = () => { $curve = definition[$asset1_stable_addr()][1].params.curve_aa; $gr = $get_growth_factor($curve); return balance[$pool_addr()][var[$curve]['asset2']]*$gr; }; }", "init": "{ if(trigger.output[[asset!=base]].asset != 'none'){ $asset = trigger.output[[asset!=base]].asset; if($asset and $asset == 'ambiguous') bounce('Only 1 asset per tx'); } else bounce('no stable token'); $oswapBaseAddr = 'GS23D3GQNNMNJ5TL4Z5PINZ5626WASMA'; $curveBaseAddr = '3DGWRKKWWSC6SV4ZQDWEHYFRYB4TGPKX'; $defAddr = definition[$pool_addr()][1]; if($defAddr.base_aa != $oswapBaseAddr) bounce('not a oswap pool'); $asset0def = asset[$defAddr.params.asset0].definer_address; $asset1def = asset[$defAddr.params.asset1].definer_address; $asset0isI = $asset0def AND is_aa($asset0def) AND definition[$asset0def][1].base_aa == $curveBaseAddr; $asset1isI = $asset1def AND is_aa($asset1def) AND definition[$asset1def][1].base_aa == $curveBaseAddr; if(!$asset0isI OR !$asset1isI) bounce('both pool assets must be interest tokens'); }", "messages": { "cases": [ { "if": "{trigger.address == trigger.initial_address}", "init": "{ $asset0stable = var[$asset0_stable_addr()]['asset'] == $asset; $asset1stable = var[$asset1_stable_addr()]['asset'] == $asset; if(!$asset0stable AND !$asset1stable) bounce('wrong stable token'); if($asset0stable) $sendaddr = $asset0_stable_addr(); else $sendaddr = $asset1_stable_addr(); }", "messages": [ { "app": "payment", "payload": { "asset": "{$asset}", "outputs": [ { "address": "{$sendaddr}" } ] } }, { "app": "state", "state": "{ if($asset0stable) var['sendto'] = $asset1_stable_addr(); else var['sendto'] = $asset0_stable_addr(); }" } ] }, { "if": "{trigger.address == $asset0_stable_addr() OR trigger.address == $asset1_stable_addr()}", "messages": [ { "app": "payment", "payload": { "asset": "{$asset}", "outputs": [ { "address": "{$pool_addr()}" } ] } } ] }, { "if": "{trigger.address == $pool_addr()}", "messages": [ { "app": "payment", "payload": { "asset": "{$asset}", "outputs": [ { "address": "{var['sendto']}" } ] } }, { "app": "data", "payload": { "to": "{trigger.initial_address}" } }, { "app": "state", "state": "{ var['sendto'] = false; }" } ] } ] } } ]
Witnesses
2TO6NYBGX3NF5QS24MQLFR7KXYAMCIE5
4GDZSXHEFVFMHCUCSHZVXBVF5T2LJHMU
APABTE2IBKOIHLS2UNK6SAR4T5WRGH2J
DXYWHSZ72ZDNDZ7WYZXKWBBH425C6WZN
FAB6TH7IRAVHDLK2AAWY5YBE6CEBUACF
FOPUBEUPBC6YLIQDLKL6EW775BMV7YOH
GFK3RDAPQLLNCMQEVGGD2KCPZTLSG3HN
I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT
JMFXY26FN76GWJJG7N36UI2LNONOGZJV
JPQKPRI5FMTQRJF4ZZMYZYDQVRD55OTC
TKT4UESIKTTRALRRLWS4SENSTJX6ODCW
UE25S4GRWZOLNXZKY4VWFHNJZWUSYCQC
Technical information
Fees:
4,228
bytes
(451 headers, 3777 payload)
Level:
7625710
Witnessed level:
7625701
Last ball unit:
6GDPdcEU8n2QvzYtIXddn6WoW+CsmvlFQ27FA0Ej0z4=
Main chain index:
7311634
Latest included mc index:
7311633
Status:
stable/confirmed/final