ToPack is a Etherium's blochain based decentralized app. The aim is to allow users to send their pack thanks to an other user that act as deivery, the way of the pack is "tracked" thanks the use of blockchain.
This can be done estimating the gas required by a function using web3.eth.estimateGas or web3.eth.Gas functions, and then manage it.
For example in deletePost() it's important that the user receive back the cost of the Gas if it call the function on a post that doesn't exist.
Apply same reason for others functions.
The delivery have to be declare a shipping as complete, it have to receive its reward if the shipping is completed with success, otherwise the app have to be calculate a penality