Ethereum Tutorials



ShareHolder Factory Contract

Deploying contracts manually is a routine and error-prone task, especially if more than one contract needs to be created. Consider an example: a musical band using ShareHolder Contract to do a fund rising for each of their songs: one song - one contract. Then as song brings some profit, part of the profit is being distributed (again, by ShareHolder contract) among owners of shares.

As we know, a musical band can easily have hundreds of songs...

To automate the task of creating multiple contracts, a ShareHolder Factory contract was critten.

The only purpose of a ShareHolder Factory contract is to simplify creation of ShareHolder contracts:

ShareHolder Factory is tharefore a code in an Ethereum block chain that takes some initial parameters, such as number of shares your new ShareHolder contract should manage, initial price of a share and so on. Then it creates a contract and deploys it in a block chain for you.

Here "for you" means that your wallet's address becomes an owner of a newly deployed contract, so WE have no control over it.

Pricing Model

First of all, price of using ShareHolder Factory is very small; nevertheless it is not free (as this entire project should earn money for its share holders, including YOU if you purchace shares). For the money you pay, you get some additional features, of course.

Paying for deploying contracts using ShareHolder Factory is simple: a minimum fee is charged once, at the time of deployment.

Your wallet address (contract owner) will be added to ShareHolder Factory's records as a proof of purchase.

There are three reasons one might need the proof of purchase.
First and obvious: a ShareHolder contract is not a free domain, and copying it is prohibited.
Second, we are going to create and keep a web site providing you and your clients with an access to contract's statistics. Of course, that same statistics is available directly from the block chain, but having charts and tables nicely wrapped in an HTML site is way more convenient than extracting the same data using command line tools.
A third reason is promoting your site. When deploying a ShareHolder contract via ShareHolder Factory (and if you choose, it is not mandatory) you can provide a brief description of your business to be shown in our site, together with a direct link to YOUR site.

An additional payment option includes the first one (you still pay for deploying), but you can also choose to divert a fraction of profits you send to ShareHolder contract to us. You choose that "fraction" yourself (say, 0.01%, or 10% - whatever) and an amount we received will determine a position of your company listing on a web page we mentioned above. In addition to the listing, our web site will have additional space for commercials, reserved for the most generous contracts.

One more thing: you can turn this payment on and off any time, as well as to adjust the amount you want to spend on this "ad campaign".

Users Guide

Use your Web browser (currently, Chrome is supported, other browsers may or may not work correctly) to navigate to ShareHolder Factory Web page. As ShareHolder Factory is an Ethereum contract, you need to have access to the block chain in order to work with it. If you don't, a warning message is displayed:

To have access to the Ethereum network, install and enable (it is enabled by default) a MetaMask plug-in for Chrome Browser.

Contracts and functions

Of course, if there is a way to make things complicated, people will make it complicated. A contract can have functions. What it means? Think of a "real life" company: a supermarket. You go there with your money, you pay... and that's not enough. You have to tell them what you are paying for. Sounds reasonable - for a supermarket. Strangelly, sometimes an ICO contract, that (unlike a supermarket) sells only one product (a token) does not "just take money", it wants you to send them to one of contract's functions.

That is not a big deal, but some wallets programs do not know how to do it and some require special knowleges. Lucky us, it does not happen very often, most ICO contracts can receive money, no questions asked.

To put is simple: if an ICO's "how to invest" page says "send money to an address", then you can use any wallet. If it says "use MyEtherWallet of Mist"... Well, your options are limited to these (very good but not entry level) wallet programs.

Investing in our ICO

We are going to explain investing using two programs: MetaMask and MyEtherWallet. First is very easy to use, second is a professional tool. We'll also explain investing using a Web site.

Investing with MetaMask

Download and install MetaMask. MetaMask is a plugin for Chrome browser, and it takes about a minute to install it.

After the installation is complete, a fox icon appears on the upper-right side of a browser window. Click it and follow instructions. You will be asked to provide a password, so that your wallet (one you are about to create) can be encrypted. Make it reasonably strong.

Log in with a newly created password and find in a (very strangely organized) menus a "Create Account" item. By account (see above) they mean a pair of keys: private and public. Find (it is easier to find then to explain how to do it) the pricate key in MetaMask's menu and copy it to clipboard.

Now you need some ether. This tutorial is not about buying crypto currency, you can find plenty of "how to" guides online. One interesting option is an exchange that is built in a MetaMask itself.

When our ICO goes live, an address to send ether to will be published at ICO page. After money are transfered, go to MetaMask's "Tokens" tab and enter contract address, name (any, it is for you to see, but better to make it meaningful) and 0 as number of digits (anything from 0 to 18 will do, it is too, only for you to see).

Now you should be able to see your tokens, just give it some time as Ethereum transactions are far from being instant.


Our ICO provides tokens AND shares. Tokens are visible in MetaMask. Shares are only visible on our Web site (if you are a guru, you can extract this info from block chain as well). That is ok, just keep in mind that you have an extra bonus that isn't visible in MetaMask. We are going to talk about Web site later on this page.

As you can see, for a campaign that does not require approval, all you need to provide is your Bitcointalk Id and an address to send reward tokens to.

If a campaign does insist on approval, you have to follow an additional link, fill a KYC form on a campaign's site and wait for an approval.

Investing with MEW

MyEtherWallet is a professional tool, it has some very advanced features, and it is not an entry level program. However, most of ICOs recommend it, for an unknown reason.

Open MEW in your browser or download it from GIT (if you know how) and use locally. It has more than one way of storing data, I strongly suggest using "Keystore", which is essentially same Metamask does. Create a wallet, make sure your password is strong enough. Log in in "Send/Receive ether" section. You will see a form to send ether to an address...

After transfer is complete, click "tokens" and add token you just paid for: it is not "adding to wallet", it is just adding to the list.

Paying for gas

BEFORE sending ether anywhere, you have to make sure your transaction does not get stuck. See, in Ethereum system, you pay variable fee for transactions, the more you pay, the faster, the less you pay... it can even get stuck.

Go to Ethereum Gas Station to figure what is current gas price. IMPORTANT!!! Default values both MetaMask and MEW try using are way too small!

Using Web site to invest

It is possible to "attach" a web page in Browser to a working wallet in order to gain access to both Internet (a nice site) and block chain (actual data). Follow the link from ICO page to an "invest" page. Just make sure MetaMask is on.

The trick is, it is still MetaMask, all the Web page does is providing user friendly interface. When you enter all data and click "invest", MetaMask will catch up and ask for a confirmation.

When you create your ShareHolder contract (presumably, using our ShareHolder Factory), you are required to specify the min. (initial) price of a share and total number of shares you want to produce. These numbers are related and you need to understand them well in order to make your offer attractive to share holders.

Total number of shares is an amount YOU as an owner of a ShareHolder contract initially owe. As the contract does not care who the share holder is, all dividends you are sending to your contract (one that sold no shares yet) are assigned to you.

As share holders buy your shares, a proportional part of dividends will be sent to them. For example, if you have 1,000 shares total, 990 belonging to you and 10 to a single share holder, then you'll receive 99% of dividends and he'll receive 1%.

Which probably means that issuing 1,000,000,000 shares 1 ether each is a bad idea, unless you expect HUGE profit flow; your customers will never believe that you will be able to bring enough profit to make dividends higher than the initial cost of a share.

Max. Number of Tradable Shares

Unless you want to create another contract and send part of your income there, it is a good idea to get part of your own shares and to never sell them. This option is supported by ShareHolder: you can allow it to sell, for example, no more than 50% of total number of shares; the rest will remain yours.

Daily Supply and Increase on Demand

It is possible to limit amount of shares that is immediately available for sale. It is done by setting an initial amount of shares available for immediate sale (say, 2,000) and a daily supply, which is an amount of shares being "unlocked" daily to become available for sale.

There are many reasons for this feature to exist, from preventing a single person from buying all shares, to making shares available for sale parallel to ICO distribution or introducing pseudo-market pricing.

New blocks of shares will become available daily, until a limit (set by Tradable Shares, see above) is reached.

Pseudo-market pricing

ShareHolder contract is not meant to implement market pricing and "exchange glass", mostly because it uses a totally different pricing model, based on amount of money share contains (a "fair" price).

However, a situation can occure when trading goes out of control. Let's say a campaign promoting your shares was a total success, and demand is very high. As you have a daily supply limit (see a previous chapter), all available shares are being sold in first 20 minutes of a day; then people have to wait till the next day begins, so some more shares become available.

Of course you can increase the daily supply. However there is an additional option: you can set a premium, an extra that you charge during current day, if a limit have been exausted during a previous day.

This extra goes to you, not to shares.

I the same time, a price at which share holders can sell their shares back to ShareHolder contract remains "fair", which means that increased demand creates "price scissors", charging buyers for agiotage.

As the result, they will either slow down, or - if they believe that future profits will compensate extra spending - they will be willing to pay the price.

Say, you set the "increase on demand" to 10%. Then if all shares that were available for sale were sold yesterday, today's price will go up 10%. If today's limit is all sold too, tomorrow's price will go up another 10%. If not, it will go 10% down till it reaches the "fair" price.

The first chart shows price under "normal" circumstances. You send daily dividends to ShareHolder, 0.001 ether per share, and the price increases accordingly. Upper (yellow) line shows price one has to pay to buy share from ShareHolder (price plus trade commission), red line shows price one gets when selling his share back (price minus trade commission). In this example there is no profit commission.

The second chart shows the situation when on day 3 all available shares were sold. Next day's BUY price goes up. At day 4 the situation repeats, so price goes up again. At days 5 and 6 the demand is weaker, and daily limit is not exhausted: the price goes down. Note that SELL price is unaffected: the extra fee goes to contract's owner, not to share holders.

Web Site UI

One can work with ShareHolder contract (as with any Ethereum contract for that mater) from the block chain, using command line tools (Geth) or advanced wallets (MEW, Mist). However using specialized Web interface is way more convenient. Web site is provides as part of our service, creating ShareHolder contract vai our ShareHolder Factory automatically grants you an access to all its features.

Use your Web browser (currently, Chrome is supported, other browsers may or may not work correctly) to navigate to ShareHolder Web page. As ShareHolder is an Ethereum contract, you need to have access to the block chain in order to work with it. If you don't, a warning message is displayed:

As was mentioned above, a Web site is accessed by a Browser, which normally has no access to the block chain. To display block chain info (data from the ShareHolder contract) in Browser, you need to grant it access to a block chain. The easiest way of doing it is by installing MetaMask plug-in.

Learn Touch Typing

(C), all rights reserved

Please read the disclaimer