Prime Specification

From Bitcoin Wiki
Revision as of 00:30, 20 April 2013 by Qertoip (talk | contribs)
Jump to navigation Jump to search

Functional

User

  • sign up with e-mail activation and TOS acceptance
  • sign in / out
  • password reset
    • reset link valid for 24h or one use whichever comes first

Settings

  • change password
  • change email
  • configure two factor authentication
  • on/off API
  • reset API key
  • configure email notifications (TODO: details)
  • complete account removal (privacy feature)
  • all changes require second method authentication (email confirmation or OTP)

Dashboard

  • change market; market is a pair of currencies, i.e. USD/BTC, PLN/BTC

Order book

  • live chart
  • live table

Last trades

  • live chart
  • live table

Account

  • Balances for the current market
  • History
    • every balance change must have a corresponding transaction
  • Open orders
    • cancel order

Deposit

Bitcoins

  • generation of personal input address
    • internal maintenance of user input addresses (every user has a list of input addresses)
  • displaying address and instructions to the user
    • funding user balance with incoming bitcoins
      • create entry in account history, remember bitcoin tx id

Fiat

  • internal (LAN-only) API for custom scripts to bump fiat balance
    • create entry in account history, remember fiat tx id

Withdraw

Bitcoins

  • edit bitcoin output address
  • confirm with e-mail link or Google Authenticator OTP
  • displaying form to send bitcoins
    • amount
    • instructions and fee information
    • send button with summary and confirmation
  • mechanism to actually send bitcoins
    • create entry in account history, remember bitcoin tx id

Fiat

  • edit bank account details
  • confirm with e-mail link or Google Authenticator OTP
  • display form to send fiat
    • amount
    • instructions
    • send button with summary and confirmation
  • add FiatWithdrawal entry to the list of pending fiat withdrawal requests
    • publish pending fiat withdrawals in internal API
    • accept request to mark specific FiatWithdrawal as fulfilled
      • create entry in account history, remember fiat tx id(?)


Buy/Sell

  • Display "Please be aware this is only approximation. Order book can change every second."
  • Validate order value denominated in fiat is high enough
    • This is to prevent order and transaction spam/DOS

Buy bitcoins

  • Instant buy
    • "I want to buy [____] BTC instantly."
    • "You will spend about ____ USD and receive ____ BTC after fee. Average BTC price will be about ____ USD."
    • Technically equals to submitting buy order with infinite price.
  • Buy with price limit
    • "I want to buy [____] BTC at price [____] USD/BTC."
    • "You will spend about ____ USD and receive ____ BTC after fee. Average BTC price will be about ____ USD."
    • "You need at least ____ USD at hand to submit this order."
    • Validate user has enough funds to submit the order (assuming worst case scenario)
    • Block funds
    • Match with existing orders
    • Smart defaults: max BTC user can buy, market price

Sell bitcoins

  • Instant sell
    • "I want to sell [____] BTC instantly."
    • "You will receive about ____ USD after fee. Average BTC price will be about ____ USD."
    • Technically equals to submitting sell order with 0 price.
  • Sell with price limit
    • "I want to sell [____] BTC at price [____] USD/BTC."
    • "You will receive about ____ USD after fee. Average BTC price will be about ____ USD."
    • Validate user has enough funds to submit the order
    • Block funds
    • Match with existing orders
    • Smart defaults: all BTC, market price

Fees

Transaction fee

Percentage and minimum fee denominated in fiat, like 0.6% min 0.01 USD. Taken from both sides of transaction from the output amount.

Bitcoin withdrawal fee

Percentage and minimum fee denominated in bitcoin, like 0% min 0.0005 BTC.

Fiat withdrawal fee

Percentage and minimum fee denominated in fiat, like 0% min 2 USD.

Public API

Ticker

TODO: design

Trades

As explained on bitcoincharts.

Order Book

As explained on bitcoincharts.

Admin panel

Stats

  • Totals for every fiat and cryptocurrency
  • Number of users online and total
  • Number of buy and sell offers
  • Number and volume of transactions

Export

  • emails.csv

Actions

  • Stop the service

Rollback

Non functional

Supported browsers

Prime example fronted is tested on the latest versions of:

  • Chrome
  • Firefox
  • Internet Explorer 9
  • Opera

There is nothing that prevents you from creating a Prime fronted that supports older browsers (see design).

Correct use of HTTP protocol

  • Semantic use of HTTP methods GET, POST, PATCH, DELETE
  • Correct HTTP status codes

Take advantage of HTML5

  • Use HTML5 to the full extent possible
  • Aim at HTML5 validity