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
2NALdnHnqSLVn4Yy1LjzL6wZrdhT4KbyuvdGKfZwROM=
Received
01.12.2023 11:42:30
Confirmation delay (full node)
11 minutes 58 seconds
Confirmation delay (light node)
31 minutes 15 seconds
Authors
KUNNTFAD3G55IWXSNKTDRKH222E4DF7R
Children
3O0BKmAWjYRPQ8s3pDIcveBx0QNCPjyFKEE/GELXcjA=
tMvSUj+2j4bB4a2tBGOrE+sfpsKkE+3Sc/KWuftN4cc=
Parents
GtB5rFev3M1Kh2HuEdrijVLFtcSfDaRqzMJTMRfUmtU=
Messages
Payments
APK5BB3FHLOPEU45D6ACELSH4UI2MEHL
987.130101807
GBYTE
APK5BB3FHLOPEU45D6ACELSH4UI2MEHL
3,734.28
USDC
Data
sender_address:
0xd68cE254c5C1AD12ef7c3eD41Ec37e2a00E14678
amount:
37720000
reward:
377200
txid:
0x82df7ad9cd6496d1b2768e24b8a262dca874523f4d8516379a499aa766bf8f39
txts:
1701430619
data:
{ "oswap_aa": "MBTF5GG44S3ARJHIZH3DEAB4DGUCHCF6", "address": "5DR2PSOXOWBMW6FOR3ED6UPU2SBHEYJN" }
address:
EWPV5JZYOIKDCL6MTNHTWWO327FAEGET
AA responses
From APK5BB3FHLOPEU45D6ACELSH4UI2MEHL
AA address:
APK5BB3FHLOPEU45D6ACELSH4UI2MEHL
Bounced
Response unit:
tMvSUj+2j4bB4a2tBGOrE+sfpsKkE+3Sc/KWuftN4cc=
Response:
{ "error": "one of secondary AAs bounced with error: EWPV5JZYOIKDCL6MTNHTWWO327FAEGET: formula $amount = trigger.output[[asset=$asset]]; $address = $data.address; // final recipient $oswap_aa = $data.oswap_aa; $data_to_forward = $data.data; $definition = definition[$oswap_aa]; require($definition, "not an AA"); $params = $definition[1].params; require($params, "no params"); $x_asset = $params.x_asset; $y_asset = $params.y_asset; require($x_asset == $asset OR $y_asset == $asset, "wrong asset received"); $get_param = ($name, $default) => { $value = var[$oswap_aa][$name]; exists($value) ? $value : (exists($params[$name]) ? $params[$name] : $default) }; $alpha = $get_param('alpha', 0.5); $beta = 1 - $alpha; $gamma = $get_param('price_deviation', 0); $base_interest_rate = $get_param('base_interest_rate', 0.2); $get_shifts = () => { $mid_price = $get_param('mid_price', 0); // price of x_asset in terms of y_asset if ($mid_price){ $lp_shares = var[$oswap_aa]['lp_shares']; $s_curve = $lp_shares.linear * $lp_shares.coef; $x0 = $s_curve / $mid_price^$beta / $gamma; $y0 = $x0 * $mid_price; } // else{ // $x0 = 0; // $y0 = 0; // } {x0: $x0, y0: $y0} }; $get_denom = ($balances, $l_balances, $shifts, $pxy) => { $leverages = [2, 5, 10, 20, 50, 100]; // account for leveraged positions $L_sums = {x: 0}; foreach($leverages, 6, $L => { $L_sums.x = $L_sums.x + ($L - 1) * ($l_balances[$L||'x'].balance + $l_balances[-$L||'x'].balance / $pxy); }); $denom = $beta * ($balances.x + $shifts.x0) - $L_sums.x; // log({denom: $denom, sum: $L_sums.x, share: $L_sums.x/$denom}); require($denom > 0, "negative denom " || $denom); $denom }; $balances = var[$oswap_aa]['balances']; $l_balances = var[$oswap_aa]['leveraged_balances'] OTHERWISE {}; $profits = var[$oswap_aa]['profits'] OTHERWISE {}; $recent = var[$oswap_aa]['recent'] OTHERWISE {}; $shifts = $get_shifts(); $pxy = $alpha/$beta * ($balances.y + $shifts.y0) / ($balances.x + $shifts.x0); $denom = $get_denom($balances, $l_balances, $shifts, $pxy); $Lambda = $get_param('pool_leverage', 1); $pool_props = { alpha: $alpha, beta: $beta, Lambda: $Lambda, swap_fee: $get_param('swap_fee', 0.003), arb_profit_tax: $get_param('arb_profit_tax', 0), period_length: $get_param('period_length', 3600), }; if (length($l_balances)){ // charge interest accrued since the previous interaction $i = $base_interest_rate / (1 - $pool_lib#1.$get_utilization_ratio($balances, $l_balances, $shifts.x0, $shifts.y0, $alpha)); $charged_interest = $pool_lib#1.$charge_interest($balances, $l_balances, $profits, $shifts.x0, $shifts.y0, $recent.last_ts, $i, $alpha, $Lambda); } $y_in = $asset == $y_asset; $req = {share: 1, final_price: 0, found: false}; foreach([1, 2, 3, 4, 5], 5, $n => { if ($req.found) return; if ($y_in){ // buying x $y_amount = $amount; $x_amount = $y_amount / $pxy; $req.final_price = $pxy * (1 + $x_amount / $denom * $req.share); } else { $x_amount = $amount; $req.final_price = 1/$pxy * (1 + $x_amount/($denom + $beta * $Lambda * $x_amount) * $req.share); } // copy because they will be modified in each iteration $_balances = $balances; $_l_balances = $l_balances; $_profits = $profits; $_recent = $recent; $res = $pool_lib_by_price#6.$swap($_balances, $_l_balances, $_profits, $_recent, $shifts.x0, $shifts.y0, $y_in, 0, $req.final_price, -1, 0, trigger.initial_address, $pool_props); log('iteration', $n, 'required', $res.amount_Y, 'have', $amount); if ($res.amount_Y <= $amount) $req.found = true; else $req.share = $req.share * $amount/$res.amount_Y * 0.95; }); require($req.found, "failed to find suitable swap params"); $final_price = $req.final_price; failed: to pay -3.68632270956423e+22" }
Witnesses
2TO6NYBGX3NF5QS24MQLFR7KXYAMCIE5
4GDZSXHEFVFMHCUCSHZVXBVF5T2LJHMU
APABTE2IBKOIHLS2UNK6SAR4T5WRGH2J
DXYWHSZ72ZDNDZ7WYZXKWBBH425C6WZN
FAB6TH7IRAVHDLK2AAWY5YBE6CEBUACF
FOPUBEUPBC6YLIQDLKL6EW775BMV7YOH
GFK3RDAPQLLNCMQEVGGD2KCPZTLSG3HN
I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT
JMFXY26FN76GWJJG7N36UI2LNONOGZJV
JPQKPRI5FMTQRJF4ZZMYZYDQVRD55OTC
TKT4UESIKTTRALRRLWS4SENSTJX6ODCW
UE25S4GRWZOLNXZKY4VWFHNJZWUSYCQC
Technical information
Fees:
2,117
bytes
(451 headers, 1666 payload)
Level:
10634157
Witnessed level:
10634144
Last ball unit:
ptJm+Y1sD0JmsTxQ3P+h3UkpNyJ7mIF1k2lHazZHINs=
Main chain index:
10260509
Latest included mc index:
10260508
Status:
stable/confirmed/final