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
5K50ffWWu9/JV46HXvetIz15ZRYG3KE4udrFnA91HJ4=
Received
01.05.2021 15:15:21
Confirmation delay (full node)
25 minutes 0 seconds
Authors
QF3NOVWHY2ZBVZZ2QHCUW7IPYXKLGIGG
Children
zN8CDMwYPo5pyhnXPy2nQYrXtFv9Zr29Cly0ux+izOk=
Parents
ENgYM3bBtut4XDdQ3PfsVzbasI5mjuIoe8zYrrNHCSI=
Messages
Definition
Address:
DZ277J5FQMZI2HXNK7EVRHLPJCIQD35H
Definition:
[ "autonomous agent", { "doc_url": "https://raw.githubusercontent.com/jldevelops/ostabloswap/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": "data", "payload": { "to": "{this_address}" } }, { "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,259
bytes
(451 headers, 3808 payload)
Level:
7626231
Witnessed level:
7626212
Last ball unit:
9uUg8Ir8BpE8/u0H6i1uQhqFOuft4mK1eEaxsFfx2ng=
Main chain index:
7312155
Latest included mc index:
7312154
Status:
stable/confirmed/final