Saturday, April 2, 2016

Pasabuy

1. What is Pasabuy?

Pasabuy is a mobile marketplace for travelers and non-travelers that makes acquisition of local items beneficial to both parties. Travelers can earn from their trip by buying items for non-travelers. While non-travelers can conveniently wait for their requested product without having to pay for the trip nor paying for hefty provincial/overseas shipping fees.
Our vision is to make every shipping economical. As frequent (and budget) travelers ourselves, our mission is to help build a community that maximize each travel experience by supporting local products, bringing and sharing those stuff with non-travelers and utilizing every baggage allowances.

2. How does Pasabuy work?

Non-traveler/ Requester
a. "Request" for an item that you want from another city or province. Remember to provide a photo of the item for easier identification. Provide description and price you are "Willing to Pay" to the Pasabuy traveler.
b. Once posted, other users will be able to see and comment on your request. Sit back and relax until traveler/s "Offer" to buy your item.
c. "Accept" if you're satisfied with the offer.
d. "Pay" to seal the deal. Note: at this point, you will be prompted to make payment to Pasabuy.
e. In the event that the traveler is unable to render the service within 7 days upon published return date, a 100% refund will be credited back to your account.
f. Similarly, if there's no dispute or feedback from you within the 7 days upon published delivery date, Pasabuy will proceed with crediting payment to the traveler's account.
Traveler
a. "Add Journey" to inform Pasabuy users about your upcoming trip destination and return date.
b. Either "Recommend" products you're willing to bring back or "Offer" to buy requested item/s available in your destination.
c. Once a requester accepts and proceeds to pay for your recommendation or offer, you may already start procuring the item. Note: you should be comfortable with the item that you'd be bringing back and be sure that it is allowed in your destination. If you have doubts or if the item is out of stock, you may cancel the transaction.
The transaction within agreed timeline via agreed mode - either via meet up or courier delivery service. Prompt requestor to "Confirm Delivery" within 7 days otherwise, any dispute will no longer be entertained.
The Pasabuy Guarantee
Your payment will be held by Pasabuy until the traveller renders the service within 7 days upon return date published. Only after that timeline will Pasabuy release the payment to the traveller's account. In case of any dispute i.e. counterfeit item or item significantly not as agreed, please contact us via email or call and we will immediately look into that matter.

3. What are the shipping and other charges in Pasabuy?

Pasabuy recommends traveler to ship the items thru Xendph. The traveler can drop off the items to selected 7-Eleven branch around Metro Manila. First, he/she must open an account with Xend at www.xend.com.ph by clicking on the "Sign Up for a Free myXend Account" button. You can also book your "pickups" on the go, by downloading the Xend Mobile App, available for both Android and iOS.
The traveler must book a "pickup" once the account has been created. This "pickup" will be presented to the 7-Eleven counter before payment. The list of selected 7-Eleven branches can be found at new.xend.com.ph/7-eleven . For additional information, visit Xendph FAQ at new.xend.com.ph/faq .
The traveler must drop the items before 4:00 pm for same day delivery. The item will be picked up on the next day if dropped after 4:00 pm.
Shipping of small items (9" x 14") would cost Php 59 and shipping of large items (12" x 18") would cost Php 79.
Pasabuy also charges Php 25 per transaction to admin cost.

4. How would a traveler know the requester's contact number and shipping address?

Once the requester paid for the products thru our payment system, the traveler would immediately see the requester's contact number and shipping address on the product page. It is very important for the requester to update his/her contact number and address on the profile page.

5. What payment options do you support?

We are currently supporting online banking, Over-the-Counter/ATM, Over-the-Counter (Non-bank), Globe Gcash, Smart money and many others thru Dragonpay payment system. No cash dealings are allowed to prevent any fraud or disputes due to lack of accountability between the two parties.

6. Any tips for Requesters?

In order to attract travelers to buy requested items for you, you must be willing to pay for a higher price for the traveler to earn more. Take note that it one of their incentives aside from wanting to help people get their desired products. You need to consider the time and effort required to purchase the items.

7. Any tips for Travelers?

Keep the receipts and take pictures of the item to prevent disputes. Do not buy any illegal items such as drugs and counterfeit products. Communicate with the requester at all times. Keep safe!

Sunday, August 28, 2011

Bitcoin Transactions

We describe the simplest case of transactions in Bitcoin. Bitcoin defines a coin as a chain of transactions. When transferring coins from A to B, A gets a hash of the previous transaction. A generates a new asymmetric key pair. A digitally signs using her generated private key the hash of the current transaction. The transaction will now consist of the hash of the previous transaction, the digital signature, A's public key, the hash of B's public key (B's address) and the coins that will be sent. A broadcasts the transaction to other nodes.

All nodes receiving the transaction verifies the ownership of the coins in that transaction. A user only stores private keys in their wallet. However, the public key can be easily generated from the private key in an asymmetric key pair (but not vice versa). So B receiving the transaction generates all her public key. She hashes the each key and compares it to the address in the transaction. If one is equal, this means that she now owns the coins in that transaction.

The first transaction in a transaction chain is the generation transaction, which gives 50 Bitcoins to a node that solves a block. The generation transaction is also the first transaction in a valid block.

Friday, August 26, 2011

How POW solves the Byzantine Generals' Problem

TEMPLATE

How POW is a solution to synchronization and global view.

One would question how the system handles consistency of block chains (or the transactions database) of every node. Each of the nodes must have all the transactions in their block chains.

Transactions are publicly announced and are broadcast to the network. If two same transactions are propagated nearly the same time, nodes will only accept the first one that arrives and incorporate it in their potential block, rejecting the second transaction. Now if the two transactions are almost sent to the network at the same time, majority of the nodes would receive the first transaction while the remaining nodes would accept the second one. The first transaction will obviously have a huge advantage on being included on the valid block and the block chain first since the collective CPU power of the majority nodes is greater than the other nodes. Note that the time of finding a proof-of-work by solving a block is proportional to the CPU power of all the nodes working on it. When a proof-of-work is found, the valid block will be propagated to other nodes. Nodes will drop their current potential block, add the received valid block to their block chain and work on a new block. The second transaction after seeing that the first transaction is in the new block chain will be considered as invalid.

Blocks are created every 10 minutes. If the average time becomes shorter up to a certain threshold, the difficulty of creating a block doubles. Suppose two different blocks (with slightly different transactions) are solved and propagated throughout the network nearly at the same time. A node keeps them both but only the first one that arrives is accepted to the chain. The transactions in the second valid block which are not in the first block will be included into the new potential block.

How POW solves double spending problem

In an online currency, spending a digital token twice is possible because the owner can either retain the spent token on his local account or produce a duplicate of the token before spending. Traditional solutions involve a centralized trusted party that decides which transaction arrives first. However, problems arise due to weaknesses of a centralized system such as single point of failure. Another problem of this system is the need of trust to the central authority for checking every transactions.

Bitcoin implements a decentralized system which nodes agree on a single chronology of transactions. Transactions received by nodes that are inconsistent with the transaction database (a chain of transactions) is considered invalid. Receivers of the coins can check the transaction database first if these coins are already spent, thus preventing double spending.

The global database is created by a chain of valid blocks (block chain), where each block contains the hash of the previous block, a random number (nonce) and a hash tree of all recent transactions. A node creates a potential block which can become a valid block and added to the block chain if the node finds a solution to a known difficult CPU intensive problem: finding the numerical hash value of the potential block that is lower than a defined target. Note that incrementing the nonce changes the value of each hash of the potential block. The potential block is hashed (i.e. a SHA-256 hash), each hash with varying nonce, by the node a million times per second until it finds a solution. Received transactions broadcast by the network are immediately included in the transaction hash tree of the node's working block. In addition to the changing nonce, new transactions also changes the hash value of the whole block.

When a solution is found, the node broadcast the block to the network. The block becomes a valid block and all nodes add the valid block into their block chain. Other nodes accepting the valid block give up their current working potential block and begin to work on a new potential block. The new potential block will contain the hash of the latest valid block of the block chain, the nonce, and recent transactions: 1.) transactions in its transaction pool (i.e. transactions in the transaction hash tree of their old potential block) that were not in the latest valid block and 2.) all newly received transactions before starting work.

Through the use of digital signatures in transactions, an attacker node can only manipulate his own transactions. The attacker can double spend her coins. To do this however, she must go back to the block where her transaction is included, change that transaction and solve again the proof-of-work of that block. Modifying the block changes the hash of the block and also hash of the succeeding blocks after. She must also redo all the blocks (from the block where her transaction is found) up to the top, including new blocks the network is adding. The attacker creates a new branch from the block chain. The rule is all nodes consider the longest block chain branch the valid block chain. If the attacker's branch catches up and became the longest, all nodes in the network would agree that this branch is the valid block chain.

The creation time of a new valid block is proportional to the CPU power of all the nodes working on it. Unless the CPU power of the attacker is greater than of the honest nodes, double spending is difficult and is very unlikely to happen. It is proven mathematically that an attacker winning the race of outpacing the block chain of honest nodes becomes exponentially hard as new valid blocks are appended to the block chain.

Proof-of-work (POW)

A proof-of-work is a technique that requires a client to give “evidence” that it spent some time doing a time consuming work, building its reputation as a valid client. It is originally used as a security measure to prevent denial of attacks and spam. The client is usually challenged by solving a feasible but computationally difficult problem. This requires a certain amount of time to have a solution depending on the client's CPU power. The solution to the problem serves as the proof-of-work. Bitcoin uses a proof-of-work technique to address fundamental problems of a fully decentralized peer-to-peer digital currency.

Wednesday, January 20, 2010

Analysis of the Increase and Decrease Algorithms for Congestion Avoidance in Computer Networks

The primary algorithm used for congestion avoidance on implementing TCP in Berkeley is the additive increase / multiplicative decrease algorithm: additively increase a users load if there is no congestion then multiplicatively decrease load if there is timeout (this means there is congestion). The paper shows why the said algorithm is sufficient enough to control congestion in a computer network.

The analysis consists of many users (n users sharing a network), and 4 criteria to evaluate the algorithm namely efficiency, fairness, distributedness and convergence. The paper models the system in linear controls and it shows how the algorithm converges (distributedly/with or without trunctation) to efficiency and fairness. Furthermore, the paper explains that additive increase / multiplicative decrease offers the least the time of convergence to fairness.

I have three more questions in addition to the author's further questions. First, is the study of the algorithm scalable or still feasible on very large number of users? If the numbers of users suddenly increase exponentially, will the system work? Or even if it works, will the time of convergence (to fairness and efficiency) be still optimal? Second, in relation to the asynchronous operation, the connections in some networks such as mobile and wireless networks always come and go. Almost all have small time connections: a user connects, transfer small amount of data, then closes the connection immediately. Does this algorithm will solve the congestion problem? My last question is about outside interference. In wireless networks, there are many interference (eg. interference from other network) that influence the network. Do these interference affect the congestion?