<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Prime_Specification</id>
	<title>Prime Specification - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Prime_Specification"/>
	<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Prime_Specification&amp;action=history"/>
	<updated>2026-05-15T09:10:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>http://en.zaoniao.it/index.php?title=Prime_Specification&amp;diff=6392&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;==Functional==  ===User===  * sign up with e-mail activation and TOS acceptance * sign in / out * password reset ** reset link valid for 24h or one use whatever comes first  =...&quot;</title>
		<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Prime_Specification&amp;diff=6392&amp;oldid=prev"/>
		<updated>2019-06-28T10:00:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Functional==  ===User===  * sign up with e-mail activation and TOS acceptance * sign in / out * password reset ** reset link valid for 24h or one use whatever comes first  =...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Functional==&lt;br /&gt;
&lt;br /&gt;
===User===&lt;br /&gt;
&lt;br /&gt;
* sign up with e-mail activation and TOS acceptance&lt;br /&gt;
* sign in / out&lt;br /&gt;
* password reset&lt;br /&gt;
** reset link valid for 24h or one use whatever comes first&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
&lt;br /&gt;
* change password&lt;br /&gt;
* change email&lt;br /&gt;
* configure two factor authentication&lt;br /&gt;
* on/off API&lt;br /&gt;
* reset API key&lt;br /&gt;
* configure email notifications (TODO: details)&lt;br /&gt;
* complete account removal (privacy feature, TODO: is it viable? what about left funds and common history?)&lt;br /&gt;
* all changes require second method authentication (email confirmation or OTP)&lt;br /&gt;
&lt;br /&gt;
===Dashboard===&lt;br /&gt;
* change market; market is a pair of currencies, i.e. USD/BTC, PLN/BTC&lt;br /&gt;
&lt;br /&gt;
====Order book====&lt;br /&gt;
* live chart&lt;br /&gt;
* live table&lt;br /&gt;
&lt;br /&gt;
====Last trades====&lt;br /&gt;
* live chart&lt;br /&gt;
* live table&lt;br /&gt;
&lt;br /&gt;
===Account===&lt;br /&gt;
&lt;br /&gt;
* Balances for the current market&lt;br /&gt;
* History&lt;br /&gt;
** every balance change must have a corresponding transaction&lt;br /&gt;
* Open orders&lt;br /&gt;
** cancel order&lt;br /&gt;
&lt;br /&gt;
===Deposit===&lt;br /&gt;
&lt;br /&gt;
====Bitcoins====&lt;br /&gt;
* generation of personal input address&lt;br /&gt;
** internal maintenance of user input addresses (every user has a list of input addresses)&lt;br /&gt;
* displaying address and instructions to the user&lt;br /&gt;
** funding user balance with incoming bitcoins&lt;br /&gt;
*** create entry in account history, remember bitcoin tx id&lt;br /&gt;
&lt;br /&gt;
====Fiat====&lt;br /&gt;
* internal (LAN-only) API for custom scripts to bump fiat balance&lt;br /&gt;
** create entry in account history, remember fiat tx id&lt;br /&gt;
&lt;br /&gt;
===Withdraw===&lt;br /&gt;
&lt;br /&gt;
====Bitcoins====&lt;br /&gt;
* edit bitcoin output address&lt;br /&gt;
* confirm with e-mail link or Google Authenticator OTP&lt;br /&gt;
* displaying form to send bitcoins&lt;br /&gt;
** amount&lt;br /&gt;
** instructions and fee information&lt;br /&gt;
** send button with summary and confirmation&lt;br /&gt;
* mechanism to actually send bitcoins&lt;br /&gt;
** create entry in account history, remember bitcoin tx id&lt;br /&gt;
&lt;br /&gt;
====Fiat====&lt;br /&gt;
* edit bank account details&lt;br /&gt;
* confirm with e-mail link or Google Authenticator OTP&lt;br /&gt;
* display form to send fiat&lt;br /&gt;
** amount&lt;br /&gt;
** instructions&lt;br /&gt;
** send button with summary and confirmation&lt;br /&gt;
* add FiatWithdrawal entry to the list of pending fiat withdrawal requests&lt;br /&gt;
** publish pending fiat withdrawals in internal API&lt;br /&gt;
** accept request to mark specific FiatWithdrawal as fulfilled&lt;br /&gt;
*** create entry in account history, remember fiat tx id(?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Buy/Sell===&lt;br /&gt;
* Display &amp;quot;Please be aware this is only approximation. Order book can change every second.&amp;quot;&lt;br /&gt;
* Validate order value denominated in fiat is high enough&lt;br /&gt;
** This is to prevent order and transaction spam/DOS&lt;br /&gt;
&lt;br /&gt;
====Buy bitcoins====&lt;br /&gt;
* Instant buy&lt;br /&gt;
** &amp;quot;I want to buy [____] BTC instantly.&amp;quot;&lt;br /&gt;
** &amp;quot;You will spend about ____ USD and receive ____ BTC after fee. Average BTC price will be about ____ USD.&amp;quot; &lt;br /&gt;
** Technically equals to submitting buy order with infinite price.&lt;br /&gt;
* Buy with price limit&lt;br /&gt;
** &amp;quot;I want to buy [____] BTC at price [____] USD/BTC.&amp;quot;&lt;br /&gt;
** &amp;quot;You will spend about ____ USD and receive ____ BTC after fee. Average BTC price will be about ____ USD.&amp;quot;&lt;br /&gt;
** &amp;quot;You need at least ____ USD at hand to submit this order.&amp;quot;&lt;br /&gt;
** Validate user has enough funds to submit the order (assuming worst case scenario)&lt;br /&gt;
** Block funds&lt;br /&gt;
** Match with existing orders&lt;br /&gt;
** Smart defaults: max BTC user can buy, market price&lt;br /&gt;
&lt;br /&gt;
====Sell bitcoins====&lt;br /&gt;
* Instant sell&lt;br /&gt;
** &amp;quot;I want to sell [____] BTC instantly.&amp;quot;&lt;br /&gt;
** &amp;quot;You will receive about ____ USD after fee. Average BTC price will be about ____ USD.&amp;quot;&lt;br /&gt;
** Technically equals to submitting sell order with 0 price.&lt;br /&gt;
* Sell with price limit&lt;br /&gt;
** &amp;quot;I want to sell [____] BTC at price [____] USD/BTC.&amp;quot;&lt;br /&gt;
** &amp;quot;You will receive about ____ USD after fee. Average BTC price will be about ____ USD.&amp;quot;&lt;br /&gt;
** Validate user has enough funds to submit the order&lt;br /&gt;
** Block funds&lt;br /&gt;
** Match with existing orders&lt;br /&gt;
** Smart defaults: all BTC, market price&lt;br /&gt;
&lt;br /&gt;
===Fees===&lt;br /&gt;
====Transaction fee====&lt;br /&gt;
Percentage and minimum fee denominated in fiat, like 0.6% min 0.01 USD. Taken from both sides of transaction from the output amount.&lt;br /&gt;
====Bitcoin withdrawal fee====&lt;br /&gt;
Percentage and minimum fee denominated in bitcoin, like 0% min 0.0005 BTC.&lt;br /&gt;
====Fiat withdrawal fee====&lt;br /&gt;
Percentage and minimum fee denominated in fiat, like 0% min 2 USD.&lt;br /&gt;
&lt;br /&gt;
===Public API===&lt;br /&gt;
====Ticker====&lt;br /&gt;
TODO: design&lt;br /&gt;
====Trades====&lt;br /&gt;
As explained on [http://bitcoincharts.com/about/exchanges/ bitcoincharts].&lt;br /&gt;
====Order Book====&lt;br /&gt;
As explained on [http://bitcoincharts.com/about/exchanges/ bitcoincharts].&lt;br /&gt;
&lt;br /&gt;
===Admin panel===&lt;br /&gt;
====Dashboard====&lt;br /&gt;
* To be decided what goes on a dashboard&lt;br /&gt;
====Withdrawal requests====&lt;br /&gt;
=====Pending=====&lt;br /&gt;
* Total fiat funds pending for withdrawal&lt;br /&gt;
* FIFO list of pending fiat withdrawals&lt;br /&gt;
** time waiting, name, address, IBAN, amount, [insert bank withdrawal transaction id here] and click [MARK AS FULFILLED] button, [CANCEL] button&lt;br /&gt;
&lt;br /&gt;
=====Other=====&lt;br /&gt;
* list of fulfilled and cancelled withdrawals, by date of fulfillment&lt;br /&gt;
====Financial &amp;amp; Fees====&lt;br /&gt;
* Stats&lt;br /&gt;
** Total funds on the exchange&lt;br /&gt;
*** Total funds accumulated on the exchange for each fiat (calculated from a database)&lt;br /&gt;
*** Total funds accumulated on the exchange for each cryptocurrency (calculated from a database)&lt;br /&gt;
** Number of buy and sell orders&lt;br /&gt;
** Number and volume of transactions&lt;br /&gt;
* Fee settings&lt;br /&gt;
&lt;br /&gt;
====Hot wallets====&lt;br /&gt;
* Number and percentage of funds in a hot wallet (actual value taken from a bitcoind) for each cryptocurrency&lt;br /&gt;
&lt;br /&gt;
====Users====&lt;br /&gt;
* Total number of registered users&lt;br /&gt;
* Export emails.csv (i.e. for mass mailing via external software)&lt;br /&gt;
* Generate comprehensive report users.csv&lt;br /&gt;
** designed to be open in a spreadsheat (Excel, Calc, etc.)&lt;br /&gt;
** one user per line, fields:&lt;br /&gt;
*** e-mail '''hash''', total balance BTC, total balance USD, ..., paid fees, number of transactions, transaction volume, sing-up date, sing-up IP, last sign-in date, last sign-in IP, number of sign-ins, number of open orders&lt;br /&gt;
* Search user by e-mail, username, name, or e-mail hash (to look up users from the report)&lt;br /&gt;
** View user details&lt;br /&gt;
** Deactivate / Activate&lt;br /&gt;
** Impersonate&lt;br /&gt;
&lt;br /&gt;
====Performance====&lt;br /&gt;
* Hot&lt;br /&gt;
** Number of users online &lt;br /&gt;
** Number of transactions in last minute&lt;br /&gt;
** Job queue length&lt;br /&gt;
** Pending fiat withdrawals (number, volume and the longest waiting)&lt;br /&gt;
* Historical&lt;br /&gt;
** Number of transactions per hour chart (TODO: necessary in v1.0?)&lt;br /&gt;
* Settings&lt;br /&gt;
** Min. order value denominated in primary currency for each market (i.e. denominated in USD for USD/BTC market)&lt;br /&gt;
** Limit of requests per minute for signed-in user&lt;br /&gt;
&lt;br /&gt;
====Security====&lt;br /&gt;
* Shutdown the service&lt;br /&gt;
* Rollback to the point in time (TODO: define details)&lt;br /&gt;
** &amp;quot;Rollback wreaks havoc, causes some users and exchange to lose money and can be illegal in your jurisdiction. Rollback is irreversible.  Rollback is a bad idea 99.999% of the time. Proceed only if you fully understand the consequences!!!&amp;quot;&lt;br /&gt;
** Rollback should not be available through the web app, only as a command line tool&lt;br /&gt;
&lt;br /&gt;
==Non functional==&lt;br /&gt;
&lt;br /&gt;
===Performance===&lt;br /&gt;
* Disallow small value orders, see [[Prime Specification|Performance]] settings in admin panel&lt;br /&gt;
** Prevents order and transaction spam. Spammed order book is slow to match. Spammed transaction history can become to large to handle.&lt;br /&gt;
* Limit requests per minute for a signed-in user&lt;br /&gt;
** Further requests will be rejected with [http://tools.ietf.org/html/rfc6585#section-4 429 Too Many Requests]&lt;br /&gt;
** Does not insert logs into a database. Works buy incrementing user request_counter in scope of minute stored in request_counter_at. When current minute is larger than request_counter_at, it zeroes out request_counter and sets request_counter_at to the current minute. This isn't 100% accurate but this is acceptable.&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
* commandline tools: pg_dump, openssl (to use built-in db backups)&lt;br /&gt;
&lt;br /&gt;
===Supported browsers===&lt;br /&gt;
Prime example fronted is tested on the latest versions of:&lt;br /&gt;
* Chrome&lt;br /&gt;
* Firefox&lt;br /&gt;
* Internet Explorer 9&lt;br /&gt;
* Opera&lt;br /&gt;
There is nothing that prevents you from creating a Prime fronted that supports older browsers (see design).&lt;br /&gt;
&lt;br /&gt;
===Correct use of HTTP protocol===&lt;br /&gt;
* Semantic use of HTTP methods GET, POST, PATCH, DELETE&lt;br /&gt;
* Correct HTTP status codes&lt;br /&gt;
&lt;br /&gt;
===Take advantage of HTML5===&lt;br /&gt;
* Use HTML5 to the full extent possible&lt;br /&gt;
* Aim at HTML5 validity&lt;br /&gt;
&lt;br /&gt;
==Limitation of v1.0==&lt;br /&gt;
* While Prime is designed from ground up to support multiple cryptocurrencies, the first version will deliver integration with bitcoin only.&lt;br /&gt;
* No support for multiple hot and cold wallets. Only one pair of hot/cold wallet will be supported.&lt;br /&gt;
&lt;br /&gt;
==Open questions==&lt;br /&gt;
* Checking whether actual crypto and fiat balances cover values from a database (prevent fractional reserve)? How to do it correctly (i.e. delays in transfers, etc)?&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
&lt;br /&gt;
[http://bitcoin.it/ http://bitcoin.it/]&lt;br /&gt;
[[Category:Manuals]]&lt;br /&gt;
==See Also on BitcoinWiki==&lt;br /&gt;
* [[Safein]]&lt;br /&gt;
* [[ShopperCoin]]&lt;br /&gt;
* [[Holdvest]]&lt;br /&gt;
* [[Plaza Systems]]&lt;br /&gt;
* [[SOFIN]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>