Pre-swap block: https://www.mintscan.io/osmosis/blocks/9465039
Swap block: https://www.mintscan.io/osmosis/blocks/9465040
Tx in question: https://www.mintscan.io/osmosis/txs/E054F4F363113C6006C82BD7A899C48D454E419C5EED15CBF859F7D60718E99C
Swaps in: 3000000 UUSDC
Gets out: 10944266 UQCK
Swap route is pools 678 > 952
678 is USDC <> OSMO https://info.osmosis.zone/pool/678
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo10venxtvdglryxkdmvjr8wa6n3ugja40rewddlxtg0pr30vmkf47sllgslg --height 9465039 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "7838673705736"
denom: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
- amount: "10651596226854"
denom: uosmo
pagination:
next_key: null
total: "0"
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo1k3j5wgcj8um2gnu8qxdm0mzzuh6x66p4p7gn6fraf3wnpfcvg9sq2zhx7j --height 9465039 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "658986900132"
denom: ibc/635CB83EF1DFE598B10A3E90485306FD0D47D34217A4BE5FD9977FA010A5367D
- amount: "329923796412352352"
denom: ibc/BB936517F7E5D77A63E0ADB05217A6608B0C4CF8FBA7EA2F4BAE4107A7238F06
- amount: "273612"
denom: ibc/EB7FB9C8B425F289B63703413327C2051030E848CE4EAAEA2E51199D6D39D3EC
- amount: "244231522381"
denom: uosmo
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo100ywfax95u9c6mndxzuqkq2fdkv7f6pqmsnhke --height 9465039 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "4914"
denom: ibc/0EF15DF2F02480ADE0BB6E85D9EBB5DAEA2836D3860E9F97F9AADE4F57A31AA0
- amount: "16774695"
denom: ibc/42D24879D4569CE6477B7E88206ADBFE47C222C6CAD51A54083E4A72594269FC
- amount: "945474"
denom: ibc/635CB83EF1DFE598B10A3E90485306FD0D47D34217A4BE5FD9977FA010A5367D
- amount: "38966102900929795331"
denom: ibc/6AE98883D4D5D5FF9E50D7130F1305DA2FFA0C652D1DD9C123657C6B4EB2DF8A
- amount: "4631895"
denom: ibc/A8CA5EE328FA10C9519DF6057DA1F69682D28F7D0F5CCC7ECB72E3DCA2D157A4
- amount: "10362158"
denom: ibc/BB6BCDB515050BAE97516111873CCD7BCF1FD0CCB723CC12F3C4F704D6C646CE
- amount: "250421"
denom: ibc/C140AFD542AE77BD7DCC83F13FDD8C5E5BB8C4929785E6EC2F4C636F98F17901
- amount: "6008939"
denom: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
- amount: "294000000000000000"
denom: ibc/D38BB3DD46864694F009AF01DA5A815B3A875F8CC52FF5679BFFCC35DC7451D5
- amount: "263446152"
denom: ibc/EDD6F0D66BCD49C1084FB2C35353B4ACD7B9191117CE63671B61320548F7C89D
- amount: "1285640"
denom: ibc/FA602364BEC305A696CBDF987058E99D8B479F0318E47314C49173E8838C5BAC
- amount: "68860"
denom: uosmo
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo10venxtvdglryxkdmvjr8wa6n3ugja40rewddlxtg0pr30vmkf47sllgslg --height 9465040 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "7838677443678"
denom: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
- amount: "10651591157707"
denom: uosmo
pagination:
next_key: null
total: "0"
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo1k3j5wgcj8um2gnu8qxdm0mzzuh6x66p4p7gn6fraf3wnpfcvg9sq2zhx7j --height 9465040 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "658975955866"
denom: ibc/635CB83EF1DFE598B10A3E90485306FD0D47D34217A4BE5FD9977FA010A5367D
- amount: "329923796412352352"
denom: ibc/BB936517F7E5D77A63E0ADB05217A6608B0C4CF8FBA7EA2F4BAE4107A7238F06
- amount: "273612"
denom: ibc/EB7FB9C8B425F289B63703413327C2051030E848CE4EAAEA2E51199D6D39D3EC
- amount: "244235590781"
denom: uosmo
pagination:
next_key: null
total: "0"
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo100ywfax95u9c6mndxzuqkq2fdkv7f6pqmsnhke --height 9465040 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "4914"
denom: ibc/0EF15DF2F02480ADE0BB6E85D9EBB5DAEA2836D3860E9F97F9AADE4F57A31AA0
- amount: "16774695"
denom: ibc/42D24879D4569CE6477B7E88206ADBFE47C222C6CAD51A54083E4A72594269FC
- amount: "11889740"
denom: ibc/635CB83EF1DFE598B10A3E90485306FD0D47D34217A4BE5FD9977FA010A5367D
- amount: "38966102900929795331"
denom: ibc/6AE98883D4D5D5FF9E50D7130F1305DA2FFA0C652D1DD9C123657C6B4EB2DF8A
- amount: "4631895"
denom: ibc/A8CA5EE328FA10C9519DF6057DA1F69682D28F7D0F5CCC7ECB72E3DCA2D157A4
- amount: "10362158"
denom: ibc/BB6BCDB515050BAE97516111873CCD7BCF1FD0CCB723CC12F3C4F704D6C646CE
- amount: "250421"
denom: ibc/C140AFD542AE77BD7DCC83F13FDD8C5E5BB8C4929785E6EC2F4C636F98F17901
- amount: "3008939"
denom: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
- amount: "294000000000000000"
denom: ibc/D38BB3DD46864694F009AF01DA5A815B3A875F8CC52FF5679BFFCC35DC7451D5
- amount: "263446152"
denom: ibc/EDD6F0D66BCD49C1084FB2C35353B4ACD7B9191117CE63671B61320548F7C89D
- amount: "1285640"
denom: ibc/FA602364BEC305A696CBDF987058E99D8B479F0318E47314C49173E8838C5BAC
- amount: "67610"
denom: uosmo
Pool 678 Diffs:
Pool 952 Diffs
Account Diffs:
This means we have unaccounted for:
Protorev Diffs:
Protorev backran the following tx in the same block: https://www.mintscan.io/osmosis/txs/A8D2BD0349DDCDBF975011E242AA791154C4D761FAE27AF76E2555C02ECAE90D
This:
Protorev account pre swap
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo17qdmjdumw4xawam4g46gtwzle5rd4zwyfqvvza --height 9465039 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "794360948"
denom: ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2
- amount: "2887794603"
denom: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
- amount: "45356703603"
denom: uosmo
Protorev account post swap
czar@Adams-MacBook-Pro ~ % osmosisd q bank balances osmo17qdmjdumw4xawam4g46gtwzle5rd4zwyfqvvza --height 9465040 --node https://rpc-osmosis-ia.cosmosia.notional.ventures:443
balances:
- amount: "794360948"
denom: ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2
- amount: "2887794603"
denom: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
- amount: "45356704350"
denom: uosmo
This can be validated utilizing the following python script:
import base64
import httpx
def txs(block_height: int | None = None) -> dict | None:
page = 1
page_total = 1
# Loop through each page of txs
while page <= page_total:
headers: dict = {"Content-Type": "application/json"}
json_data: dict = {"method": "tx_search",
"params": [
f"tx.height={block_height}",
False,
f"{page}",
"100",
"asc"
],
"id": 1}
if page == 1:
txs_resp = httpx.post(url="http://65.109.20.216:26657/",
json=json_data,
headers=headers,
timeout=60)
txs = txs_resp.json()
if page > 1:
txs_extend_resp: dict = httpx.post(url="http://65.109.20.216:26657/",
json=json_data,
headers=headers,
timeout=60)
txs_extend = txs_extend_resp.json()
txs["txs"].extend(txs_extend["txs"])
page += 1
return txs
txs = txs(block_height=9465040)
for tx in txs['result']['txs']:
events = tx['tx_result']['events']
for _, event in enumerate(events):
if event['type'] == 'protorev_backrun':
print(event['type'])
for attribute in event['attributes']:
attribute['key'] = base64.b64decode(
attribute['key']).decode('utf-8')
attribute['value'] = base64.b64decode(
attribute['value']).decode('utf-8')
print(attribute['key'], attribute['value'])
else:
continue
At Osmosis, we frequently need to operate the nodes for extracting data.
Jul 10, 2024Osmosis is a decentralized exchange that is focusing on providing traders the opportunity to swap tokens.
Mar 15, 2024When we call Reply from Go, the call gets propagated all the way to wasm VM.
Mar 4, 2024This is a sidecar query server that is used for performing query tasks outside of the main chain.The high-level architecture is that the chain reads data at the end of the block, parses itand then writes into a Redis instance.
Jan 20, 2024or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up