<p>USDT on the Bitcoin blockchain uses the Omni layer, which encodes data in the OP_RETURN outputs. In your transaction, the amount is <code>0000000006052340</code>, which is hex for <code>101000000</code>. Omni has a precision of 8, so you can divide that by 10^8 to get <code>1.01</code>.</p>

CC BY-SA 4.0
2020-03-09T07:35:08.003Z
BRO! I would have never guessed that! Is the value always stored in the last 16 places of the OP_RETURN hash?
coder123
CC BY-SA 4.0
2020-03-09T07:39:16.447Z
Yes, the format is `OP_RETURN <omni magic 4 bytes> <asset ID 8 bytes> <value 8 bytes>`
Raghav Sood
CC BY-SA 4.0
2020-03-09T07:20:59.263Z
2020-03-09T07:20:59.263Z
Raghav Sood
<p>I was looking at a transaction I just signed for USDT and I decoded it to compare stuff to my original address and amount. Just to be careful.</p>

<p>I found the address that the data is being sent to in <code>vout[1].addresses[0].</code> I now want to see where is the amount that I am sending and if it is the same as the one I had intended.</p>

<pre><code>{
    "txid": "42aaf04994f7123470e8c7aff2a7fd2341b2b3d648d5839c4023432fc12cfbe",
    "hash": "42aaf04994f7123472342324f2a7fd467123445d2342d58235235345212cfbe",
    "version": 2,
    "size": 405,
    "vsize": 405,
    "weight": 1620,
    "locktime": 0,
    "vin": [
        {
            "txid": "7f589c98b41292d2180a33eac21ab7f1235456ebfd8c897305793bb793182534",
            "vout": 1,
            "scriptSig": {
                "asm": "3045022100afcd667212334568ae54e1b6e555fc756cce228923a809939382ce2d7e99d778022058a62ecf394cafb4b52ba7e1d49d543a1edef2134190f88773a30a11ef8f20b[ALL] 023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728",
                "hex": "483045022100afcd6671234567f8ae54e1b6e555fc756cce228923a809939382ce2d7e99d778022058a62ecf394cafb4b52ba7e1d49d543a1edef94897690f88773a30a11ef8f20b0121023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728"
            },
            "sequence": 4294967295
        },
        {
            "txid": "4f7dee045e338f0e68ad35dd98e1d1a07fac5d63f912e09f9c9cf88fea5fb7eb",
            "vout": 2,
            "scriptSig": {
                "asm": "3045022100f4af4fa80e2134cf84d87a42c14945717adf50b1cf0b75baafd821cb938bb02b0220061b806f0350ff9e0b20d06fce1ed35cc2fb1234569c321e4b96c479dbc5688[ALL] 023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728",
                "hex": "483045022100f4af4fa80e2134cf84d87a42c14945717adf50b1cf0b75baafd821cb938bb02b0220061b806f0350ff9e0b20d06fce1ed35cc2123456c549c321e4b96c479dbc56880121023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728"
            },
            "sequence": 4294967295
        }
    ],
    "vout": [
        {
            "value": 0,
            "n": 0,
            "scriptPubKey": {
                "asm": "OP_RETURN 6f6d6e69000000000000001f0000000006052340",
                "hex": "6a146f6d1234780000000000001f0000000006052340",
                "type": "nulldata"
            }
        },
        {
            "value": 0.00000546,
            "n": 1,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 7a8cb455ccb12345617396cce512c37134d72369 OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a9147a8cb455c1234561617396cce512c37134d7236988ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "1CAyzih1V3nhx98STVq7Jdya88VY4Bkna6"
                ]
            }
        },
        {
            "value": 0.00042535,
            "n": 2,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 c4d18aa08bcdcabd245a7f183e09ca712c6c83b OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a914c4d18aa08bcdca89357aa7f183e09ca712c6c3b88ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "1JwgTpJPZ2WtsZvoo6EsstdB9jNnhJxERB"
                ]
            }
        }
    ]
}
</code></pre>

<p>This is the signed transaction. 
The amount I intend to send is 1.01 but I can't see that anywhere only random values in vout[1], vout[2] and weight. Can anyone please guide me where to find this value or how to recreate it? Maybe weight is the USD value of the amount I am sending in USDT Omni?</p>

<p>Any guidance will be much appreciated.</p>

<transactions><signature><omni>
Where to find the amount that is being sent in a signed transaction?
coder123
# Where to find the amount that is being sent in a signed transaction?

(Asked by: username_0 on 2020-03-09)

I was looking at a transaction I just signed for USDT and I decoded it to compare stuff to my original address and amount. Just to be careful.

I found the address that the data is being sent to in `vout[1].addresses[0].` I now want to see where is the amount that I am sending and if it is the same as the one I had intended.

```
{
    "txid": "42aaf04994f7123470e8c7aff2a7fd2341b2b3d648d5839c4023432fc12cfbe",
    "hash": "42aaf04994f7123472342324f2a7fd467123445d2342d58235235345212cfbe",
    "version": 2,
    "size": 405,
    "vsize": 405,
    "weight": 1620,
    "locktime": 0,
    "vin": [
        {
            "txid": "7f589c98b41292d2180a33eac21ab7f1235456ebfd8c897305793bb793182534",
            "vout": 1,
            "scriptSig": {
                "asm": "3045022100afcd667212334568ae54e1b6e555fc756cce228923a809939382ce2d7e99d778022058a62ecf394cafb4b52ba7e1d49d543a1edef2134190f88773a30a11ef8f20b[ALL] 023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728",
                "hex": "483045022100afcd6671234567f8ae54e1b6e555fc756cce228923a809939382ce2d7e99d778022058a62ecf394cafb4b52ba7e1d49d543a1edef94897690f88773a30a11ef8f20b0121023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728"
            },
            "sequence": 4294967295
        },
        {
            "txid": "4f7dee045e338f0e68ad35dd98e1d1a07fac5d63f912e09f9c9cf88fea5fb7eb",
            "vout": 2,
            "scriptSig": {
                "asm": "3045022100f4af4fa80e2134cf84d87a42c14945717adf50b1cf0b75baafd821cb938bb02b0220061b806f0350ff9e0b20d06fce1ed35cc2fb1234569c321e4b96c479dbc5688[ALL] 023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728",
                "hex": "483045022100f4af4fa80e2134cf84d87a42c14945717adf50b1cf0b75baafd821cb938bb02b0220061b806f0350ff9e0b20d06fce1ed35cc2123456c549c321e4b96c479dbc56880121023b976783e66fbdc15e96954278d194829ce15735c99a11af7d6d56aae070c728"
            },
            "sequence": 4294967295
        }
    ],
    "vout": [
        {
            "value": 0,
            "n": 0,
            "scriptPubKey": {
                "asm": "OP_RETURN 6f6d6e69000000000000001f0000000006052340",
                "hex": "6a146f6d1234780000000000001f0000000006052340",
                "type": "nulldata"
            }
        },
        {
            "value": 0.00000546,
            "n": 1,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 7a8cb455ccb12345617396cce512c37134d72369 OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a9147a8cb455c1234561617396cce512c37134d7236988ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "1CAyzih1V3nhx98STVq7Jdya88VY4Bkna6"
                ]
            }
        },
        {
            "value": 0.00042535,
            "n": 2,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 c4d18aa08bcdcabd245a7f183e09ca712c6c83b OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a914c4d18aa08bcdca89357aa7f183e09ca712c6c3b88ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "1JwgTpJPZ2WtsZvoo6EsstdB9jNnhJxERB"
                ]
            }
        }
    ]
}

```

This is the signed transaction.
The amount I intend to send is 1.01 but I can't see that anywhere only random values in vout[1], vout[2] and weight. Can anyone please guide me where to find this value or how to recreate it? Maybe weight is the USD value of the amount I am sending in USDT Omni?

Any guidance will be much appreciated.

**Tags:** transactions, signature, omni


---

## 1 answers

### Answer by username_1 on 2020-03-09. Score: 2 | Accepted answer

USDT on the Bitcoin blockchain uses the Omni layer, which encodes data in the OP\_RETURN outputs. In your transaction, the amount is `0000000006052340`, which is hex for `101000000`. Omni has a precision of 8, so you can divide that by 10^8 to get `1.01`.

> **Comments:**
> **username_0**: BRO! I would have never guessed that! Is the value always stored in the last 16 places of the OP_RETURN hash?  
> **username_1**: Yes, the format is `OP_RETURN <omni magic 4 bytes> <asset ID 8 bytes> <value 8 bytes>`  

---

