[Draft] NuDroid Fees via Server

Hi. This is an alternative proposal to this. It will be a faster and cheaper method to implement dynamic fees into NuDroid but is pending the “getfee” RPC command in Nu 2.1, and requires reliance on a server for every transaction. I’ve gone into detail about what it will involve.

Matthew


Address: TBC
Amount: 1,600 NBT

This proposal will allow the correct fee to be used in NuDroid for the 2.0 protocol. It may work with the future 3.0 protocol, but this is not guaranteed. It involves the following tasks and changes:

  • To create a new python wsgi script to provide NuBits fees. The script will take “application/x-www-form-urlencoded” POST data with the arguments “bytes” and “amount”. The “bytes” argument shall be the size of the transaction in bytes, and the “amount” argument shall be formatted with 4 decimal places. Using the “getfee” RPC command from Nu 2.1 onwards, the script will respond with the fee in units as a numerical string.
  • Have the new script deployed on the “Default - Explorer” server, and potentially on “Default - Anton” with the collaboration of @willy
  • The application will assume that the “amount” parameters should be the total value of all outputs in a transaction. It is assumed that this logic will likely achieve the correct fee with the future 3.0 protocol, although it is not guaranteed.
  • To alter the fee calculation in NuDroid to first estimate coin selection with an assumed 0.01nbt fee. Then the app should make a server request for the fee. The coin selection should be reapplied. If there is a change in the transaction size as a multiple of 1000 bytes, another request should be made to the server to obtain the new fee. The process may be repeated until the fee is satisfied.
  • When requesting fees, the app should try all of the trusted servers with “/getfee” appended to the URL and use the fee of the first server that responds.
  • The app should give the error “Cannot obtain fee from servers” if there is an error obtaining the fees.

This update shall be released no later than 2 weeks after the grant is passed, however efforts will be made to release earlier than this if possible. If the update is not released by this time, the entire grant amount shall be burned.

The update will be released under version 4.4 on Google Play.


2 Likes

What would implementation cost to just multiply the fee you charge now by the value found in the getinfo rpc command? (Divided by 0.01 of course)

1 Like

Using the getinfo RPC command would not be compatible with Nu 3.0 of-course. It would be somewhat easier as the fee can be calculated with a single request. I could perhaps do that instead for 1,200 NBT.

I’m sorry, i really don’t mean to downplay your efforts, but $1.2k for a simple rpc call? I’m just having such a hard time justifying that kind of compensation in my head. I mean, even if we assume that you’re like the most professional programmer ever ($100/hour), that means it’s going to take you 12 hours of straight coding to implement a getinfo rpc command.

There is more to it than that, it’s . Firstly there time spent preparing for all of this, additional time and effort going through the custodian grant system, and then there is exchanging NuBits into Bitcoin and Bitcoin into GBP. I have to implement server software which obtains the information from the RPC command yes, but then I also have to implement it in nubitsj so that the app obtains the fee from the trusted servers, and only when required; I have to deploy the software on the explorer server; I have to test each scenario to make sure it is working; and finally I put together the final builds and upload to github and Google Play.

You’re charging shareholders for the effort of submitting a grant? How much is that worth, exactly? I’ll be sure to tack that on to my next NuPond grant.

Fine, I get it, your time is precious and you’re charging $1,000 of overhead for just looking at the problem. In that case, the OP is fine.

That’s a general problem with using contractors, although I doubt @MatthewLM is charging anything more than say $100 for that. Either way I don’t blame @MatthewLM; for a full-time contractor it’s a good rule to make every hour of overhead count, because otherwise you’d find yourself in terribly abusive business relationships. I mean lawyers even bill the time it takes to say hello and engage in small talk before getting down to business.

So shareholders really need to understand that asking for minimum wage isn’t a terribly greedy thing to do, compared to just putting money in liquidity pools.

I think I was wrong saying “additional time and effort” in regards to the custodian system, and I’m not charging a particular amount just for that. It’s certainly easier the second time around, now that I know what to expect. But there is still an uncertain time that it takes for grants to pass which can be an issue if I have to try and juggle other pieces of work around.

@dysconnect is right, you can’t only charge for the time spent coding, because there is a lot of time spent doing things around that. Everything has to be taken into consideration, because that additional time still counts as work, and there are significant risks involved when working self-employed. If I was full-time employed by Nu instead then things would work out cheaper of-course, but that’s not the way things are.

However, no-one is forced to vote for a custodian grant, so feel free not to vote if you think it is too much. Also, if I have a quiet period I can sometimes offer things for lower cost, but not at this time.

1 Like

I think something between no accounting of (overhead) costs and this:

is a good way to go.

@MatthewLM needs to earn money with his work. It’s fine to let him request compensation for his efforts.
I think it would help to find a more detailed proposal that contains not only the steps, but the estimated time for the tasks.
As the draft is dealing with a fixed price offer, @MatthewLM carries the risk of requiring more time and work, because things are more complicated than they appear to be.
So far @MatthewLM delivered high quality in little time.

I understand that Nu needs to track and control costs.
But I think Nu can overshoot the mark.

Do we know about the time and the hour rates other developments are charged?
What does Nu pay to @JordanLee, @erasmospunk, @woolly_sammoth, @desrever, @CoinGame, @Ben, etc. for their services?
Does Nu (the shareholders) even know who is paid for the work (how much time, what rate) and who does it for fun or education?

I made my recent NuBot grant for hitBTC for free (no charge for the grant, no operator fee, no depreciation for the used hardware), because I wanted to find out how complicated it is to set up and run NuBot.
The grant passed recently and NuBot has done its first day of liquidity service.
I will get a share of the money the operation earns (assuming the following grant after the successful operation passes as well…) for putting funds on the order book from the two buddies who didn’t want to operate an ALP bot and didn’t want to send funds to NuLagoon.
If I calculate an hour rate I come to the conclusion that it wasn’t worth it - financially speaking - and this is assuming that I won’t have much hassle in the next 29 days.

But it was worth finding out that running a NuBot and requesting a grant is not much more complicated than running an ALP bot.
A lot of time was spent for troubleshooting the NuBot release candidates and setting up an account at a new exchange. If this month NuBot on hitBTC runs fine, I already think about pulling funds from ALP operations and putting it into additional NuBot operations for which I draft additional grants.
Let this month pass and you might find me motivating people to consider an independent NuBot operation instead of or in addition to ALP bots.

You might ask why I went into greater detail and wrote about things that appear unrelated.

I like supporting Nu. I want it to succeed. I was happy to read @JordanLee’s statement in the “Custodial grant to purchase 2S1 Military tank for Nu Network” because it was good to see that it’s not only my naive take of Nu when I think of it as vehicle to make the world a better place, but the vision of Nu’s architect as well.
But it’s not my job to support Nu.

I can afford to not earn money with it - others can’t.

relevant -> Contractor compensation directed by shareholders?

1 Like

I’ve not been contracted for any work with Nu since mid May.

Thank you for your reply.
I hoped the questions would come across as rhetorical questions - following the “overshooting the mark” apprehension.

Oh sorry I didn’t even read the whole post. Been really busy today and just sorta skimmed where my name was when I got the ping.

1 Like