[Discussion] Contract to create web interface code that one can use to sell/buy Nubits with fiat online

I propose to pay for a contract to enable opening up a new space of possiblities to buy/sell Nubits. This will have several benefits and features:

  • Now if people wants to buy Nubits they have to register at an exchange. This discourages people from trying out with minimum hassle, and increases centralisation. With web sites set up using the software proposed people can easily buy or sell back Nubits.
  • This software can be used to provide liquidity in NBT/FIAT pairs similar to the ALP software that enables individuals to provide liquidity to support Nubit peg. The difference is that ALP works for Nubits/crypto pairs on centralized exchanges; this software is for Nubit/fiat pairs on an individual web page, decentralized and free from exchange risks. It’s a missing piece of Nu liquidity provision system.
  • The code will be easily modified by the user, so that other payment processors, money exchanges, and e-currency gateawsys (PEGs) that issues USD tokens can be added
  • Similarly the code should be easily adapted for triggering external routines upon receiving payments, so that it can be used as a payment page.

From my investiggation it doesn’t seem hard to write code for a webside that sells/buys Nubits. Quote from Enable easy selling/buying Nubits with e-currency USD:

====

This grant will pay 1500 NBT (or 3.75 BTC at current bitcoin price) to a contractor who demonstrates a website that exchanges Nubits with e-Currerncy USD of payment processors, money exchanges, and e-currency gateaways (PEGs) and submits source code with documents.

XXXX is the development manager. The grant also pays 300 NBT to the development manager to cover costs of server, testing funds, communicating and reporting.

Schedule, Payment and Delivery

One week after this motion is approved, advertizement will be posted by the development manager on nubits.com, peercointalk, bitcointalk, reddit to look for contractors.

The first payment is made (200 NBT to the developer and 50 NBT to the development manager) once a contractor is identified and the contractor has produced detailed requirements according to the general requirement listed below.

The website code is delivered to the development manager. The development manager will set up the website and perform acceptance tests according to requirements. Once the test is passed, the code is released on github and rest of payment is made to the contractor and the development manager.

General requirements

The following requirements are made for creating a website that allows customers to exchange Nubits, a cryptocurrency that has successully pegged to $1 USD, with e-Currerncy (fiat) USD issued by payment processors, money exchanges, and e-currency gateaways (PEGs), at an exchange rate fixed by the website operator.

R1. The website can sell Nubits in a few steps:

  1. customer enters Nubits receiving address and e-currency USD (for example by entering a PerfectMoney e-voucher code, or by pressing a pre-made OKPay payment button);

  2. the website server verifies that fund has arrived at own PM account;

  3. the website server sends Nubits to customer’s Nubits receiving address

R2. The website can buy Nubits from a customer as easily:

  1. a customer enters a payment processor account number and the amount NBT to sell;

  2. the website server gives a Nubits payment address of server’s own Nubits wallet;

  3. the customer sends Nubits to the address;

  4. the website server verifies Nubits payment has arrived in full and sends fiat from its own account to the account provided by the customer. (no exchange between different e-currencies is required)

The final result web interface can be simple like https://pm2btc.me.

R3.1 E-currencies involved are stored off-site and is handled with published APIs of major PEGs.
R3.2 Two PEGs shall be supported, one of which is PerfectMoney. Other examples include Payeer, webmoney, OKPay etc.
R3.3 The website owner has full control of the Nubits wallet and e-currency accounts used by the server.
R3.4 The code is properly structured so that adding new PEG API is easy for the web site owner.

R4.1 The website displays liquidity of buy/sell funds available for Nubits and every supported e-currency.
R4.2 Buy/sell transactions shall be confirmed with, transacton information displayed, by the customer before execution.

R5. The website internally logs all customer and API activities.

R6.1 The website owner can set up the site on an commercial VPN and a Raspberry Pi without needing non-free software.
R6.2 The website owner can configure buy/sell spread.
R6.3 The website owner can configure buy/sell maximum per transaction.

R7. Help document is provided to users and website owner to cover above functional requirement points.

R8. More than one user can use the web site at the same time.

===============

9 Likes

Sounds intriguing!
Having that type of websites might indeed make it easier for people to buy and sell NBT.
However, there are some things I don’t understand.

Where do they get the e-currency vouchers get from with which they buy the NBT?[quote=“mhps, post:1, topic:3567”]
website server verifies Nubits payment has arrived in full and sends fiat from own account to the account provided.
[/quote]

With fiat you mean e-currency fiat, right? Is it possible to retrieve those vouchers via API? Is that the reason for this requirement:

The idea is that such an exchange site is holding the Payeer, webmoney, OKPay, PerfectMoney, whatever accounts and is man in the middle for the trade just like ShapeShift is, right?

Where can customers redeem Payeer, webmoney, OKPay, PerfectMoney vouchers? Don’t they need to have accounts at Payeer, webmoney, OKPay, PerfectMoney for that as well? This is very much related to the initial question about where do they get e-currency vouchers.

People have to have account on the payment processors. Payment processors such as OKPay, PerfectMoney are much better known, operated, secured, and used than cryptoexchanges. They are more like paypal.

yes.

I don’t understand what you mean by retrieve. You can buy an equally valued e-voucher (a string) from your PerfectMoney account and use it to pay for things. Anyone who receives the e-voucher can redeem it in their own PM account. E-vouchers can be purchased in many sources (example)

btc-e and bter also issues their e-vouchers.

API should be used so that a website with a human operator doing all the work behind does not qualify.

Right. The customer trades with the site. Think currency exchange booth in an airport.

Yes. One has to put cash into some account so that it is transferable by the internet. No one can buy Nubits with physical cash on an automated website.

I mean, the user who wants to sell NBT needs to receive an e-currency voucher from the exchange website in turn.
So this website needs to get a voucher with the right value (that matches the NBT+fee).
I thought this is done by API access to the e-currency issuer.

that is a possibility. or he could give an account number to be paid to.

Would it be an option trying to contract the development of such a tool in a way like e.g. NuDroid was created and the redesign of nubits.com might be done instead of going for a bounty program?
On the one hand offering a bounty provides an incentive for people to invest time, because there’s money to be made.
On the other hand some people will shy away from investing time and efforts, because they are aware that others can beat them to it and if the bounty can only be claimed once, they will have wasted the time.

For Nu the bounty program can be beneficial, especially if multiple people are creating software to get the bounty. It’s not Nu’s problem if only one gets it (although it will require to find out whom to pay the bounty). Nu would possibly receive more than just one solution, which would be nice for Nu.

From two points of view I’d prefer having a kind of contract instead of a bounty:

  • from a “business ethical point of view” I don’t like bounties which might screw people who invest time, although one could argue they knew beforehand that this can happen; I just don’t appreciate that style
  • from a “I want to see such a tool view” I expect a contract a better match for getting that tool delivered in good quality in a timely manner (the developer has no need to hurry to be first and doesn’t need to sacrifice a sound, safe and scalable design just to get the job done)

We could for example ask @CoinaDay, who seems to have some experience

and seems to be willing to work for Nu as well.

I could imagine creating a set of requirements (which needs to be done anyway), having a kind of tiny project plan with milestones and move from milestone to milestone either with fixed price offers or by paying an hourly rate based on an assumed total amount of efforts.

…just to sketch an alternative, because I’d really much like to see such a tool!

That is preferred than a bounty. Any taker as a contractor? Make comments and offers please.

How does this system deal with chargebacks? Does like okpay insure against it or something?

How do you imagine chargebacks to happen?
I understand that you need to deposit cryptocurrencies or fiat to those providers.
You can’t request chargebacks for that, right?
If that’s right this system can’t deal with chargebacks and trades are final.
But maybe my understanding is flawed as I haven’t even visited one of the listed websites.
I will do that as soon as I find some time.

Let’s hope that @CoinaDay chimes in!

Okpay credits the website’s account, then goes to withdraw money from the customer. Customer flags the withdrawal as fraud. I just don’t know how payment providers deal with this situation, im legitimately asking.

I never doubted that. I was not aware of that flagging mechanism.

You flag the credit card charge.

How do those platforms deal with that in general?

I mean, anybody could fund the account by credit card, buy a voucher and pay at some place with that voucher.
As soon as the one who’s paid with the voucher redeems the voucher and withdraws the money, the platform has a loss if the credit card payment becomes flagged.

If it were that simple, I could collude with somebody. Each of us would then fund the account by credit card. We transfer vouchers, redeem the funds and afterwards flag the each credit card transactions.
We have created a kind of double spend attack.
It must be more complicated than that.
It’s about time I start to understand how those platforms work as what I’ve written above is 100% hypothetical.

https://www.okpay.com/en/business/digital-wallet
"
Fraud is effectively deterred

We understand the risks online businesses face and take all necessary
steps to protect merchants from chargebacks. We verify the identity of
OKPAY users to make sure you only work with legitimate customers.
"

PerfectMoney: No chargeback policy Every transaction in Perfect Money system is final. Guaranteed.

OKpay: To ensure your safety, the OKPAY risk team works 24/7 to prevent chargebacks before they even occur.
Also “Completely non-reversible.

Payeer: ?

Webmoney: not sure

See also comparison of some 30 payment methods in aspects including chargeback risks

https://en.bitcoin.it/wiki/Payment_methods

1 Like

Hey guys! Sorry, got online late today. I’ll probably be on off-and-on for the next 6-8 hours or so. Anyhow, yes, I would absolutely be interested in working on this on a contract basis! Ideally I’d like to do hourly contracting rather than a project bid, as I believe that aligns incentives better to actually get things done: for instance, when there’s a great idea and requirements change after the fact, as always, instead of having a crazy out-of-scope modifications rate like some large contractors which will go unnamed do, being hourly from the start means we try to get requirements right at the start, then I start working on the core things I know I’ll need, and if we want to do tweaks as we go (like add or remove support for a different payment processor) that should be relatively simple.

It’s also lower risk on both sides in my opinion: I don’t invest all the work up-front to make the software (and get tempted to cut corners to be able to pay the bills by getting to the milestone sooner) and the customer doesn’t risk paying for a “completed” project that doesn’t actually work for them when the actual requirements are different from the initial requirements.

I do think the overall estimate is actually pretty good for getting to a working version. I would expect that working at 20-25 NBT an hour, polishing up the requirements and specifications might be around 100-200 NBT, API / payment processor research will probably be about 200 NBT ultimately, writing and doing some basic testing on an internal wrapper library for these payment processors (research if there’s an existing FOSS library which works first, but I’ve often found making my own simple wrappers can be worthwhile; however, getting them to properly handle errors and such edge cases takes more time) around 200 NBT (just spitballing here), and maybe 200 NBT for the configuration and business logic of trades, oh, and maybe 200 NBT for the nu integration, and we’ll put documentation as 200 NBT. So even with reasonably generous estimates, a decent working version (we’ll just throw another 200 NBT for final integration and testing and ass coverage) should be done by around 1400 NBT. So my very rough estimate matches the initial budget estimate here.

I would perhaps suggest a slight change in description / concept of considering me the “development manager” of the project and directly putting the responsibility for the project on me. I understand the desire for verification, but I would think of it as: since this is intended to be an open source release, then part of what I’m agreeing to for acceptance criteria is sort of a “reasonable hacker” standard of: a reasonably competent sysadmin should be able to install, configure, and operate this system easily, that sort of thing.

I can see the logic of an administrator role which distributes funds as I report hours and which does a basic sanity check that I produce what I’m supposed to by the end. And actually, it would be nice to have a second paid person on the project for a tester role. So I can see putting that in there. I just have an aversion to being able to potentially not get paid, or not get paid until the code is perfect. I’m not worried about whether I can produce acceptable working code but the structure of “here are my initial thoughts; build my idea and report back for the money” has always terrified me because of the experience of requirement change and differing interpretations.

Anyhow, I’m still completely new to how things are done around here, just putting out my thoughts on ideal structure. I’d be willing to compromise on a fixed price contract as long as it’s not the open bounty (because of the possible risk of being beat to the punch, and I cannot afford to gamble that much with my income right now), but it would definitely be a hardship for me and would frankly result in a lower quality product without necessarily saving anything. It would however still beat the hell out of going back to killing time flipping burgers, so there’s that. :slightly_smiling:

I do think this is a very interesting project idea. Operating such a site publicly in the United States would constitute a money selling business to the best of my understanding of the law (but I am not a lawyer), but creating the code and releasing it without warranty should be safe I believe. And so long as some people somewhere start using it, then it’s useful.

Also, I just realized I hadn’t been thinking about the advantage of this being NuBits; I’d thought about it so far as a generic cryptocurrency selling/buying site. But the advantage of the NuBits thing is we could make the assumption the exchange rate is always 1:1. xD Personally, I’m enough of a Y2K kid that I think I’d just make the 1 as a constant variable so it could still be modified in a single place if something crazy happened (or for later support of, say, buying NBT with EUR and so forth (with additional modification, but at least already using a constant variable rather than hard-coding the logic of “1 currency unit equals one cryptocurrency unit” everywhere, as amusing as that could be.)).

2 Likes

Thanks for the reply @CoinaDay. There are a lot of similar sites selling bitcoin. We compiled a long list. I think someone who developed those sites should be able to make a Nubits exchange site for 10-20 hours work based on existing code base, including documentation and testing. However although @tomjoad as the outreach manager contacted most of them as I know, we didn’t identify someone who could do the job. So the reason why I put it as a bounty was that we could advrtise and attract offer in a broader community. However the problem with it is that bounty claimers could be someone totally outside the Nu community and is only interested in doing just enough.

It’s very good that you are interested in becoming part of t he community and your cost breakdown is close to my estimate.

@Cybnate set an example of how a manager interfaces deveoper with the community in NuDroid development. I have no problem if you ask for a grant to do the development as long as you keep the community in the loop and installments of payment are tied to measurable milestones.

The Nu shareolders on the other hand would worry about paying and not getting the product. In any case you need to craft a custodial grant proposal yourself and get it approved by the shareholders. As you have no track record in the community you might need a few feedback-iterations to get such request agreed and approved.

It’s great you have thought about it. It’s a tool for a global community.

Nubits pegged to the USD certainly makes such site much easier to make. NuBot and ALP software already get price feeds working so trading NBT with other fiats or even BTC isn’t hugely difficult to code. My main concern is in attacking vectors to such site. An NBT-USD site may be much attack-resistant.

1 Like

Alright, I’ll try it.

There is no possible milestone apart from completion in my opinion, and I will consider support limited and optional after acceptance because otherwise a fixed price development project is suicide. I will be attempting to complete this within two weeks at the very most; ideally within a week. The code should be simple, clean, and easy to review.

I’m not certain yet which language I would use. I usually use PHP for hacking up a site, but for a financial system using its type system seems like a great way to introduce subtle bugs. I’m not a fan of Ruby, or at least its idioms: Rubyists seem to have a fetish for over-complicating things.

This is going to sound really weird, but would you be opposed to the idea of a compiled (or hell, interpreted I guess if a person wanted to get really crazy) C(++) server for it? I’ve never done a web-application in C before, but I’ve done C work and I think strong, explicit typing would be good here. I know web applications can be done in C, and I’ve heard of crazy good performance with it.

The biggest potential problem I think would be it wouldn’t work with some of the more cut-rate hosting, where you just get space for some PHP code or something but can’t run applications or get shell access. Also, the setup I’m imagining wouldn’t work for hosting multiple sites on the same server instance, as it would have the server embedded.

Actually…doing it as a C CGI probably would be pretty clean I think, and reasonably well-supported on hosts.

Edit: Is there a guide for how to draft proposals? I understand the general concept, but I haven’t seen a point-by-point description of how to do it properly and obviously I’d like to be able to get this through as smoothly as possible. :slight_smile: For text of proposal, I’m basically thinking verbatim what you’ve got here with the modification of assigning it to me as developer.

About the best language to use to develop the site, devs like @desrever @CoinGame @woolly_sammoth @willy @woodstockmerkle @ttutdxh @dysconnect @jooize should know better than I do.

Reading past proposals in https://discuss.nubits.com/c/nushares/custodial-grant-passed will help greately. Basically you create a “[Draft] …” for feed back and iteration.

Then when you think it is ready, if you ask for payment upfront, put in an NBT address and an amount pair in the proposal for voting by changing the title to “[Voting] …”, and updating the hot list post optionally. Once there are 5001 blocks voting for it in a continuous 10000 block chunk, the amount is sent by the blockchain to your address.

However if the payment is not upfront, generally you will first make a motion to pass so that shareholders promise to approve your grant request when agreed conditions are met. You will put up grant requests later. Read Standardised Formatting for Motions to learn how to hash a motion.

I agree with all what @mhps said!
I think doing this by motion instead of grant keeps things easier than with a grant.

A grant would most likely require a “fund manager”, because I imagine NSR holders won’t pay you upfront and that’s what would happen, if you draft a grant with 1,500 NBT - as soon as it passes, the NBT are at the grant address.
As a kind of contract is required to allow you to claim money for your services (the grant would do that as well, but with upfront payment), a motion might be more appropriate.
With a motion that passed, the FLOT or any other entity acting on behalf of Nu could pay you for your services after you delivered what you were contracted for.

…just my 0.02 US-NBT.