Stakenet (XSN) Trustless Proof of Stake Factsheet

jstarhead
7 min readJun 17, 2018

--

This article is a technical sum up about how TPoS works. If you like to learn more about the weaknesses of previous staking solutions click here.

1. Trustless Proof of Stake

TPoS is a Stakenet invention and is fully operational and available for everyone who owns XSN. While crypto investors currently use offline storage such as Ledger or Trezor for mere storage, TPoS transforms these cold storage devices into profit generating devices which also secure the network by validating the blockchain. The Staking rewards flow directly to the coin owner while the coins remain offline. Furthermore, Trustless Proof of Stake allows people to offer Staking as a Business, where a merchant can stake other people’s coins and generate a commission-based income from the rewards created, opening new opportunities for businesses to arise from our invention.

1.2 Introducing TPoS

One of the main criticisms of a PoS system has been that this is only maximally safe when all the coins are online and authoritative staking nodes are avoided. All previous staking and offline staking solutions could not meet these conditions. Stakenet has devised a solution to the problems being faced by users of decentralized networks today: Trustless Proof of Stake. TPoS essentially allows users to own a stake in Stakenet and use any other node to do the staking for them using their high bandwidth, continuous, connectivity, while not having to share any spendable balance or private keys with the node. Your funds are yours and yours alone. They will safely and securely grow over time and protect the network even while you sleep. This feature was created with the intention of allowing users to securely stake XSN coins in cold storage form a hardware device and produce, validate and move a blockchain at the same time. Increasing security for both the network and the user.

Stakenet was created to make an ecosystem that allows easy and secure offline staking to increasing security for both the network and the user. For this purpose, the basic characteristics of Bitcoin and Peercoin were assumed and in some cases slightly modified. XSN uses the same core as Bitcoin and an adjusted coinage, like Peercoin for the validation of new created blocks, down to 24h. The trustless staking is realized by the invention of so-called merchantnode. The requirements to set up a merchantnode offline staking, are zero. In contrast to all previous solutions, the merchantnodes have neither an advantage in the block generation and the blockrewards, nor a decisive influence on the blockchain. They have only the right, to validate the blockchain for you. Just imagine you are putting your money inside of a virtual bank that cannot fail, get robbed, go bankrupt, become insolvent or shut down. Just imagine you can withdraw or move 100% of your funds at any time, day or night, no questions asked, and no withdrawal limits imposed. With Stakenet you do not send over your money, you send the right to grow your money, for as long as you like.

1.3 Purpose

An XSN TPoS contract is a special agreement made on our blockchain which allows an owner of a given address (“owner”) to give staking permission to a separate address (“merchant”). The owner of this merchant address does not have permission to move funds in the TPoS address, only the right to stake the balance of that address. The owner can move his funds out of the TPoS address at any time, giving him complete control of his funds during and throughout the execution of this contract.

1.4 Technical documentation of the TPoS contract

The contract is a special transaction with OP_RETURN that holds data specifying the terms. The contract is created by a user sending 1 XSN to himself. This transaction will also broadcast the terms of the contract to the network. This 1 XSN needs to be made lowest priority when user spends XSN. To cancel the TPoS contract the user simply needs to move all his funds into a new address or just unlock and move the 1 XSN, which includes all contract information.

1.4.1 Required information of the TPoS contract

Required information in the contract are as follows:

1. tposAddress , Address owned by creator of contract (this balance will stake via TPoS)

2. merchantAddress , owner of this address will have the ability to stake the balance in “tpos address”

3. commission, (value between 1–99%) tells the protocol how to split staking rewards minted from tpos address (allowing owner to auto pay commission to merchants)

4. signature , signature by creator of the contract showing proof that he is the owner of the tpos address

1.4.2 Sample contract

A sample contract within the XSN blockchain looks like this:

out 0: { tposaddress : 1 XSN} (deposit)

out 1: { OP_RETURN XoX31nLRYeteYLHMibYmHALCV7bE2PPRH6 Xp944knpdSSWex2uH2he5CKZg2sN12bbPS 10 65_bytes_signature }

out 2: { changeaddress: changeamount }

1.4.3 RPC calls

We have created RPC calls to create a TPoS contract and submit it to the network:

RPC call 1 tposcontract create [tpos_address] [merchant_address] [comission]

#this call will return a hex encoded contract, which can be sent to the network using RPC call 2.

RPC call 2 sendrawtransaction [hex encoded contract]

In this snapshot you can see how a contract is being created and broadcasted on our network via RPC.

RPC calls for the TPoS contract creation

1.4.4 Sample “one click” TPoS UI

The image below is an example of an “one click” TPoS UI taken from the XSN desktop wallet.

Once the user fills the required fields and clicks “stake” the backend executes this for steps:

1. Generates the new tposAddress for the owner

2. Generates the TPoS contract using the entered merchantAddress

3. Broadcasts the contract to the network

4. Send the amount of XSN to the tposAddress of the owner for staking

1.5 Staking as a business

The Stakenet blockchain was created to be the world’s first truly trustless, profit-driven economy where everyone can offer TPoS services as a 3rd party to other individuals who use the XSN blockchain. Therefore, the XSN TPoS protocol includes a commission features, which makes it possible for everyone to run staking as a business.

Staking as a business

On the surface, the commission is simple. A merchant provides a service and charges a fee for said services. However, in our case, this entire negotiation is handled directly on the XSN blockchain. The TPoS protocol itself is smart and knows exactly how to split the new minted coins. All done without any human involvement through a series of cryptographically signed messages broadcasted when the contract first created. We engineered this feature to avoid predicting market rate or demand but allow the two parties to settle among themselves a split from 1 to 99%. This will also allow alternative forms of services to arise, such as willingly giving the merchant all the rewards in exchange for certain goods.

1.5.1 Use case

Say a merchant wants to gain a competitive edge and offer added services on top of their regular staking. So, they could instruct the owner to input 99% commission at the time of their TPoS creation, then agree to send the reward in a currency of the owner’s choice to an address of their choice. The owner could not only be staking his assets while offline but also be exchanging securely and safely, without lifting a finger. The exchanged rewards could hypothetically be translated to any form, like a BTC address, ETH, or even fiat (directly into a bank account) and could be used as a means of “cashing in” to an owner’s local currency. Once these services are established it will drive large amounts of traffic and attention to our currency, as we will be the first and only one with this unique functionality. In a world with increasing regulations this effect will be even more dramatic.

1.5.2 Seller ratings

Since the staking rewards would be in control of the merchant, this example of a hidden exchange would have to maintain a small degree of trust. We believe this will be easily mitigated by giving the merchant a rating based on the quality of service. Any dishonesty or underperformance would cost the merchant more in the long run than they would gain, like the effect of standard seller rating we are all familiar with before making an online purchase. This model works because the merchant will never be enabled to make off with a significant amount of fund. The worst scenario is he steals a few small rewards but completely ruins his reputation in doing so, and if the owner is not comfortable with the service he can simply cancel the TPoS contract and redeem his funds at this discretion.

--

--