Hello
i set:
"paytxfee" : 0.00010000,
"relayfee" : 0.00010000,
Why is not enough?
The fee you are using is the minium fee per kB. For some normal transactions that should be enough, but not for all of them. You are using multisig transactions, and those are even bigger.
As a rule of thumb, you can use this formula to calculate the size of a normal tx:
180*Number-of-inputs + 34*Number-of-outputs + 10 = size in bytes
As I said, multisigs are much bigger, but it is impossible to give you a formula because it depends a lot on the type of multisig. I believe you are using a 2 of 3 multisig, so I have calculated the deviation from the initial formula for 2 of 3 multisigs. There are three examples:
http://explorer.dash.org/tx/c12690030b046aa96139c5d21c30c71337af8613354df0e438beb601cbd9a993
Size according to formula: (180*32) + (34*1) + 10 = 5804 bytes
Real size: 9494 bytes (x1,64)
http://explorer.dash.org/tx/d25b54a1f5407a064c36a8fe20706a2fb48e1d5ad01ea80c6b3057425b504f67
Size according to formula: (180*8) + (34*1) + 10 = 1484 bytes
Real size: 2411 bytes (x1,62)
http://explorer.dash.org/tx/ddb5492f26a6267f3a1dc56a352cfa9f0a92969e5326762066c68622cad6b2df
Size according to formula: (180*29) + (34*2) + 10 = 5298 bytes
Real size: 8644 bytes (x1,63)
As you can see, the real size of these 2 of 3 multisig transactions is 62-64% bigger than if they were normal tx, so you could use that as an approximation.
To avoid errors I would recommend one of these two approaches:
1- Be very conservative in the fee calculation (something like formula for normal tx multiplied by 2)
2- Chage the code so it increases the fee in case it gets that error and tries again