Farming with SIA in my Desktop

If you like me, and you have a lot of free disk space then it is a good idea to make money by farming it. Farming is the term we are going to use when you are renting your free space to others. Currently, for some happy reasons, I have 7 TB I can rent. In this article, I will show how to rent your space. Once you get your SIA Coins (SC), it is up to you to trade them.

Requisites

Personal Computer: in my very specific case I am using Desktop with 4 cores of AMD A10-5700 APU with Radeon(TM) HD Graphics and 12 GB of RAM.

Enough free space: I have two USB hard disk, the first one is 2 TB USB 2 disk and the second one is 5 TB USB 3 disk. I decided to use BRTFS as it uses real-time compression and it is pretty good with small files. But it is your call. If you are using the disk for other stuff, maybe EXT4 or XFS are better options for you. Do your own research to decide what filesystem is the best for your needs.

Go lang 1.6 or better: Mageia 5 and 6 have it, you will need to see if your Linux distribution has it.

Installation of SIA Software

The first thing you need to do is to install the SIA software. At the moment of writing this article, the latest SIA available was 1.0.3. You can check this information in the SIA Github Project page. To install the software, you can type the following commands:

mkdir ~/siacd ~/siago get -u github.com/NebulousLabs/Sia/...

If all goes for good, you will have a bin directory with to files: siac (the SIA client) and siad (the SIA daemon).

Configuration of the SIA Daemon

SIA Daemon (siad) is very easy to configure. You just need a directory where to put all information (not the space you are planning to lease). I did the following:

mkdir /var/lib/siacd ~sia/bin./siad -d /var/lib/sia/

If this is your first time, go to eat. The SIA daemon will start syncing the blockchain. If you want to check if the sync is done, execute SIA client (siac) without parameters. You will see a line that says Synced: Yes/No, and an approximation of the remaining time to complete.

Configure the Wallet

If you want to farm, you must have a valid wallet. At the early beginning, I was thinking that using an address provided by Poloniex was enough. But it is not, the software needs the ability to manipulate the wallet more than doing transfers. Type the following:

cd ~sia/bin./siac wallet init

The SIA client will output two very important values: sia seed and sia password. Save them, you will need them for almost anything. The next step is to know what is your SIA wallet address. Type the following:

./siac wallet unlock./siac wallet address

Take note of your new address.

Put your Harddisk Space into the Market

I will cover here how I did. My first step is to tell the SIA daemon where I will store the space for lease. In my very specific case, I have two hard disks, one mounted at /mnt/2T and the other at /mnt/5T. I have created a sia.storage directory in each other.

You will get a message telling SIA folder has been added. The next step is to configure the price. First some concepts:

Storage: usually in terms of Siacoins per Terabyte per Month. You can set your own price by typing ./siac host config minstorageprice 0000SC

Bandwidth: usually in terms of Siacoins per Terabyte. Bandwidth is divided in:

Download: when the renter downloads, this is upload for you. You can set your own price by typing ./siac host config mindownloadbandwidthprice 0000SC

Upload: when the renter uploads, this is download for you. You can set your own price by typing ./siac host config minuploadbandwidthprice 0000SC

Collateral: usually in terms of Siacoins. The Collateral is a guarantee to renters for your commit. It's the way to say that you are committed or you will lose money as well. Collateral is divided into three concepts:

Collateral: the amount of money that will be put in escrow. You can set it by typing ./siac host config collateral 0000SC

Max Collateral: the maximum money that it is going to be put per contract. You can set it by typing ./siac host config maxcollateral 0000SC

Collateral Budget: the global money that it is going to be put in escrow. You can set it by typing ./siac host config collateralbudget 0000SC

Duration: usually in weeks, it is the duration that the host will commit to keeping a file. You can set up this value by typing ./siac host config maxduration 000

As this is a market bid, the best next question is what values should I use. The SIA FAQ says that use a lower price of 100 SC per GB.

Calculating your Prices

Storage Pricing

Well, I have 7 TB of Disk (7000 GB). I paid in a total of 250 CADs for those drives, that is approximately 200 USD (I am rounding numbers). Therefore:

7000 GB / 200 USD = 35 GB / USD, which it means 0.0285714285714 USD / GB if we want to get paid this drives on the first month (We are very optimistic and we hope all the space gets rented right away). According to Polionex (November 4th, 2016), 1 SC worths 0.00000051 BTC and 1 BTC = 702.45174945 USD. It is not a direct conversion, but then we have 0.0285714285714 USD / GB * 0.00000051 SC / BTC * 702.45174945 BTC / USD = 0,00001023572549199 SC / GB. But we need SC / TB, so we are missing one operation 0.00001023572549199 SC / GB * 1024 GB / TB = 0.1048138290379 SC / TB. This is the minimum price I can sell 1 TB of my storage, then 100 SC per GB is more than good for me. I will keep it low to get more contracts, let's go for 90 SC per GB. Then my command is:

./siac host config minstorageprice 92150SC

Bandwidth Pricing

I currently have an unlimited plan 20 Mbps downstream, 10 Mbps upstream ADSL line, I'm currently paying 64.40 CADs per month, that is approximately 48 USD. So, as this is unlimited bandwidth (means I don't have a monthly quota) there is always a limit of how many Terabytes I can download or upload. First I will do numbers for my download stream of 20 Mbps. 20 Megabits / second * 1 / 8388608 TB / Megabit * 2592000 seconds / month = 6.17980957 TB / month for the 20 Mbps downstream link, and of course the half 3.08990479 TB / month for the 10 Mbps upstream link. As two-thirds of my bandwidth is used for downstream, it is safe to do the following 32 USD / month / 6.17980957 TB / month = 5.17815309 USD / TB. I won't do the maths for the 10 Mbps, but as numbers are proportional, the price is the same. I will let you do the maths if you want. And then we convert that price to SC by doing 5.17815309 USD / TB * 0.00000051 SC / BTC * 702.45174945 BTC / USD = 0.0018550753754 SC / TB.

So, it is more than safe to say I can bill 1 SC per TB. Then my commands are:

Maximum Contracts Duration

The SIA FAQ states that there is a minimum of 12 weeks. Then this decision is more on how often you turn off your computer. I usually turn it off every 6 months (24 weeks). The default is 25 weeks. My command is then:

./siac host config maxduration 24

I think that's it. I will play with the values to see whats the optimum to get more revenue.