Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to send without splitting the wallet balance into more addresses #2614

Open
benapetr opened this issue Apr 15, 2021 · 5 comments
Open
Labels
ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG

Comments

@benapetr
Copy link

This is copy paste from Daedalus issue tracker as they said Daedalus is just using cardano-wallet and therefore can't affect this behaviour:

I noticed Daedalus right now has some annoying feature, where it randomly (at least when it decides to auto-withdraw rewards) splits the balance by sending ADA from address A, but returns unspent ADA back to address B (both A and B belonging to same wallet, but being different addresses). From user perspective this probably doesn't matter (with exception, see *), but it does matter when you are sending from a wallet that belongs to a pool pledge, because tools like adapools.org etc. will be confused and show that stake address has multiple wallets with different amount. Also CLI scripts that verify if pledge is adhered by checking the reward address balance are broken, as the balance is now split over multiple addresses.

*When you need to send more ADA than is on single address, you need to add multiple source addresses to transaction, which IMHO increases the transaction size and has potential to increase the fee. Sending from one address is just easier from low level perspective.

Bonus question: what is the point of splitting the balance between multiple addresses? Why not just always use the primary wallet address?

@benapetr
Copy link
Author

also this leads to hypothetically unwanted scenario when ADA is split in a way that it's going to be expensive to send out, imagine this:

wallet with balance of 4ADA is split into multiple UTXOs due to this "feature":

address  balance
a             1.2ADA
b             1.1ADA
c             0.2ADA
d             1.5ADA

Now imagine that owner of the wallet wants to send 1.7 ADA to someone - how? The minimal amount of ADA to send is 1ADA no address has balance enough to send 1.7 and other addresses can't send just 0.2 because minimal amount is 1ADA, this would result in fee over 1ADA

@zxpectre
Copy link

zxpectre commented May 7, 2021

I guess this is a common practice on UTXO model for the unspent values but the ability to build and submit transactions with total control of inputs and outputs on cardano-wallet (as you can do in cardano-cli) would be really appretiated as for now we cannot develop payment processing using 1 derived address per 1 user using single mnemonic account because checking if addresses are in use i'ts not atomic and unexpended amounts will collide with user deposits. Correct me if I'm wrong, but because of this assumption I'm developing my solution using multiple mnemonic accounts with lower gap limit posible (10) and it's not very efficient regarding tons of paralell wallet sync processes in background.

Avoiding Rosetta for now, the only option left is cardano-cli but is terrible regarding security, the dependency on input and output files is terrifying, please if someone could talk to that team to use stdin, stdout and string arguments instead of only files would allow devs to sleep in peace at night.

Keep up the nice work, we won't give up guys!

@leobel
Copy link

leobel commented May 27, 2021

Hi @benapetr, maybe this article can help you to understand better

@benapetr
Copy link
Author

benapetr commented Jul 21, 2021

FYI I cross referenced this issue here - https://forum.cardano.org/t/is-there-any-way-to-investigate-where-ada-from-transaction-ended-or-confirm-it-was-delievered/67257 this is a good example of why this can be a problem.

This model makes blockchain transactions so confusing and obfuscated to end-users that they are not even able to understand if ADA was delivered to their wallet or not (or even identify what the target wallet actually is). Especially in case of a wallet that isn't staked, in this case it's also impossible to figure out actual balance of the wallet, unless you are the owner, because individual wallet addresses are not interlinked via staking key.

@benapetr
Copy link
Author

benapetr commented Sep 3, 2021

Hello, can something be done about this? It costs us some money at this moment, because cardano-wallet always clears the primary address of our pool in its "random redistribution" which I then have to recharge by sending some ADA there from our own wallet, otherwise scripts to modify pool registration do not work, using alternative secondary addresses for transaction result in this error:

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [UtxowFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash "hash_redacted"])))])

Or at least provide some workaround to make it possible to use secondary address of wallet? I am following this guide: https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#18-4-changing-the-pledge-fee-margin-etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG
Projects
None yet
Development

No branches or pull requests

4 participants