dashhive / crowdnode-cli

Earn ~6% Interest on Dash via CrowdNode - CLI for Mac, Linux, and Windows
https://github.com/dashhive/crowdnode-cli
MIT License
4 stars 1 forks source link

discuss: balance output #14

Open coolaj86 opened 2 years ago

coolaj86 commented 2 years ago

Re: https://github.com/dashhive/crowdnode-cli/issues/9#issuecomment-1175777872

  1. Was a bit surprised to see more than exactly 1 DASH staked. Not a big deal for me, but might be for others?

You were asked to deposit Đ1.03 to account for Signup and ToS deposits. The deposits minus fees also count towards your stake.

Received 100300000

Key:       Đ  1.00300000

Accepting terms...
    ✅ AcceptTerms

reserving 50000 (Đ0.00050000) for withdrawals (--no-reserve to disable)

Initiating deposit of 100052926 (Đ1.00052926)...

Without knowing in advance how many utxos you'll be sending, the transfer fee, or other specifics that will be usually but not always the same, it's not reasonable to get it to deposit Đ1.00000000 perfectly.

DASH

  1. Is the terminal output supposed to be in markdown format?

Yes. https://github.com/dashhive/crowdnode.js/pull/28

Not only that, but stdout is used for the kinds of text that a person would want to grep and stderr is used for the kinds of text that someone would most likely want to ignore when piping between programs.

One of the great philosophies of Unix is that you should be able to use the output of one program as the input to another program - "piping".

The idea is that if someone were writing a simple bash script using crowdnode-cli, it should behave nicely for them with grep, sed, awk, (and the modern rg, sd, bat) etc and they should be able to duck-tape together something interesting.

riongull commented 2 years ago

it's not reasonable to get it to deposit Đ1.00000000 perfectly

Not sure why it's not reasonable. Can't you just make an output with exactly the amount that the user specified he wanted to stake in the crowdnode stake x command?

Let's keep this one open until after we have some more feedback from others.

coolaj86 commented 2 years ago

Can't you just make an output with exactly the amount that the user specified he wanted to stake in the crowdnode stake x command?

No, because there are 3 deposits.

I suppose we could adjust the last deposit to subject the previous deposits and just leave some on the key since we need that anyway for additional commands...

CrowdNode just doesn't work well with exact amounts anyway. You can't withdraw exact amounts. You don't get dividends in exact amounts.