Attribute an Algorand clawback to the correct asset holding
A clawback transaction carries an outer sender and an asset sender. Posting the debit to the signing authority can leave the holder’s asset balance overstated.
Read the nested asset sender
This partial Indexer-style record illustrates a clawback of 12 base units of asset 73. The outer sender authorizes the clawback. The sender inside asset-transfer-transaction identifies the holding being debited. Use the nested receiver for the credit.
{
"tx-type": "axfer",
"sender": "CLAWBACK_AUTHORITY",
"asset-transfer-transaction": {
"asset-id": 73,
"sender": "DEBITED_HOLDER",
"receiver": "RECIPIENT",
"amount": 12
}
}
Reconcile charges and ordinary transfers separately
If the authority holds zero units, the clawback can still move tokens from the designated holder when authorized. Its outer network fee is an ALGO expense and uses a different asset ledger. For a normal transfer without an explicit asset sender, the outer sender provides the units. Check close-out fields separately if a holding is being closed.