<blockquote>
  <p>I've been doing freelance to create an altcoin and my client wants this new coin to be private which means only authorized users can mine and use the coin. What I've been doing so far is to make a new altcoin, keep it in a private repo</p>
</blockquote>

<p>Bitcoin sounds like a poor fit for your application for two reasons. First, Bitcoin is designed to keep working even if some people tamper with the inner workings of their client. If you're willing to give that up, you can build something a lot simpler. Second, it's designed to process transactions in a decentralized way, which sounds like the opposite of what you want. If you give that up, and use a central clearinghouse, you can build something much simpler.</p>

<blockquote>
  <p>So I was wondering how could someone get my code and whether he was able to mine my altcoin.</p>
</blockquote>

<p>I don't know whether this person has the source code of your altcoin; I don't know what security measures you've taken. However, having the source code of your altcoin is not nessesary to connect to it. As long as a peer can fake its way through a <code>version</code> message, that's good enough to make it into <code>getpeerinfo</code>. The two clients don't need to be running the same code.</p>

<blockquote>
  <p>And do you have any ideas or suggestions on how I can stop someone from mining my altcoin or only allow certain machines from certain IP addresses can connect to my network and mine even if they have my altcoin source code?</p>
</blockquote>

<p>Bitcoin's design is going to make that quite difficult. Bitcoin uses a gossip network to move blocks around. If I mine a block, and I tell you about it, then you will tell all of your friends about it. They will in turn tell all of their friends about it too, until everyone knows.</p>

<p>This means that if a single node is misconfigured, and allows external blocks, it broadcasts those to every other node on the network.</p>

<p>It would make more sense to modify the client so that blocks must be signed by a key that is only held by your client.</p>

CC BY-SA 3.0
2017-03-14T10:51:30.427Z
Thank for your response, Nick! In fact, I don't want to give up the feature which keeps the database consistent and reliable even with distorted data nor the decentralized one. What I've done for the project is to make it like a hybrid one, centralized & decentralized at the same time. The server will only keep the credential data for users to sign in, mnemonic code which then will help to backup their transactions. The rest will be still the altcoin core's responsibilities. A signed key or an authentication protocol with a token are good ideas but I'm thinking how to implement them feasibly.
hoanghs13
CC BY-SA 3.0
2017-03-14T06:36:01.247Z
2017-03-14T06:42:30.130Z
2017-03-14T06:42:30.130Z
Nick ODell
<p>I've been doing freelance to create an altcoin and my client wants this new coin to be private which means only authorized users can mine and use the coin. What I've been doing so far is to make a new altcoin, keep it in a private repo, implement mobile wallet apps with authentication gate that requires user to enter his credential info (I have a server to contain this kind of info), etc. Everything seems to work well 'til yesterday when I see a strange IP in the output of <code>getpeerinfo</code> command. So I was wondering how could someone get my code and whether he was able to mine my altcoin.</p>

<p>So my question is: Has anyone of you had experiences in such situation of creating private coin? And do you have any ideas or suggestions on how I can stop someone from mining my altcoin or only allow certain machines from certain IP addresses can connect to my network and mine even if they have my altcoin source code?</p>

<p>Thank you in advance and have a nice day!</p>

<altcoin><server><peers>
Idea on how to keep my altcoin private, make it impossible for others to mine even if they have my altcoin's source code
hoanghs13
# Idea on how to keep my altcoin private, make it impossible for others to mine even if they have my altcoin's source code

(Asked by: username_0 on 2017-03-14)

I've been doing freelance to create an altcoin and my client wants this new coin to be private which means only authorized users can mine and use the coin. What I've been doing so far is to make a new altcoin, keep it in a private repo, implement mobile wallet apps with authentication gate that requires user to enter his credential info (I have a server to contain this kind of info), etc. Everything seems to work well 'til yesterday when I see a strange IP in the output of `getpeerinfo` command. So I was wondering how could someone get my code and whether he was able to mine my altcoin.

So my question is: Has anyone of you had experiences in such situation of creating private coin? And do you have any ideas or suggestions on how I can stop someone from mining my altcoin or only allow certain machines from certain IP addresses can connect to my network and mine even if they have my altcoin source code?

Thank you in advance and have a nice day!

**Tags:** altcoin, server, peers


---

## 1 answers

### Answer by username_1 on 2017-03-14. Score: 1

> I've been doing freelance to create an altcoin and my client wants this new coin to be private which means only authorized users can mine and use the coin. What I've been doing so far is to make a new altcoin, keep it in a private repo

Bitcoin sounds like a poor fit for your application for two reasons. First, Bitcoin is designed to keep working even if some people tamper with the inner workings of their client. If you're willing to give that up, you can build something a lot simpler. Second, it's designed to process transactions in a decentralized way, which sounds like the opposite of what you want. If you give that up, and use a central clearinghouse, you can build something much simpler.

> So I was wondering how could someone get my code and whether he was able to mine my altcoin.

I don't know whether this person has the source code of your altcoin; I don't know what security measures you've taken. However, having the source code of your altcoin is not nessesary to connect to it. As long as a peer can fake its way through a `version` message, that's good enough to make it into `getpeerinfo`. The two clients don't need to be running the same code.

> And do you have any ideas or suggestions on how I can stop someone from mining my altcoin or only allow certain machines from certain IP addresses can connect to my network and mine even if they have my altcoin source code?

Bitcoin's design is going to make that quite difficult. Bitcoin uses a gossip network to move blocks around. If I mine a block, and I tell you about it, then you will tell all of your friends about it. They will in turn tell all of their friends about it too, until everyone knows.

This means that if a single node is misconfigured, and allows external blocks, it broadcasts those to every other node on the network.

It would make more sense to modify the client so that blocks must be signed by a key that is only held by your client.

> **Comments:**
> **username_0**: Thank for your response, Nick! In fact, I don't want to give up the feature which keeps the database consistent and reliable even with distorted data nor the decentralized one. What I've done for the project is to make it like a hybrid one, centralized & decentralized at the same time. The server will only keep the credential data for users to sign in, mnemonic code which then will help to backup their transactions. The rest will be still the altcoin core's responsibilities. A signed key or an authentication protocol with a token are good ideas but I'm thinking how to implement them feasibly.  

---

