Replies: 1 comment
-
I disagree that this should be blocked at the API level. If a user wants to send a token from their address back to their same address, that is a valid action.
IMO removing the ability for users to send XCP or any asset from and to the same address doesn't really add any value, and adds an additional layer of friction to using CP... now instead of just being able to speed up my txs by sending some XCP to myself with a high fee, now I would have to take additional steps to accelerate my transaction (CPFP) |
Beta Was this translation helpful? Give feedback.
-
I just discovered (by accident) that it is possible to send yourself BTC, XCP and other Assets. I do not mean it is possible to send to another address you own but to "send to" the same address your "sending from" - when source and destination are identical in the API call - so your not actually sending anything anywhere but you are creating extra Counterparty database records.
I wonder should this be blocked at the API level as there is no need to send yourself assets you already possess, it just creates additional database records with no benefit for the user.
Also as there are no dust limits for divisible assets in theory you can split 1 XCP into 100 million records in the database
I appreciate you would have to pay the btx tx fees to do this, but a very easy sanity check to "fix" this is to prevent ASSET eg != BTC create_sends when "source" and "destination" are identical
Here are API examples that result in send to source transactions - note this BTC transaction does not consolidate your inputs as it results in a change output to the same address
// unconsolidate your bitcoin utxos
{
"method": "create_send",
"params": {
"source": "1JDogZS6tQcSxwfxhv6XKKjcyicYA4Feev",
"destination": "1JDogZS6tQcSxwfxhv6XKKjcyicYA4Feev",
"asset": "BTC",
"quantity": 1000,
"fee_per_kb": 1,
"extended_tx_info": true,
"allow_unconfirmed_inputs": true
},
"jsonrpc": "2.0",
"id": 0
}
//send 1 satoshi of XCP to source
{
"method": "create_send",
"params": {
"source": "1JDogZS6tQcSxwfxhv6XKKjcyicYA4Feev",
"destination": "1JDogZS6tQcSxwfxhv6XKKjcyicYA4Feev",
"asset": "XCP",
"quantity": 1,
"fee_per_kb": 1,
"extended_tx_info": true,
"allow_unconfirmed_inputs": true
},
"jsonrpc": "2.0",
"id": 0
}
//send 1 whole asset source
{
"method": "create_send",
"params": {
"source": "1JDogZS6tQcSxwfxhv6XKKjcyicYA4Feev",
"destination": "1JDogZS6tQcSxwfxhv6XKKjcyicYA4Feev",
"asset": "BACONTITS",
"quantity": 1,
"fee_per_kb": 1,
"extended_tx_info": true,
"allow_unconfirmed_inputs": true
},
"jsonrpc": "2.0",
"id": 0
}
Beta Was this translation helpful? Give feedback.
All reactions