Owners Contract Upgrade

Firstly, for anyone who isn’t familiar with our owners contract, it was built as a means of us performing our crowdsale back in April ‘18. It’s an Ethereum smart contract that doesn’t confide to any token standards, because as a revenue sharing contract, it breaks the ERC20 interface and wouldn’t be compatible. Reasons for this:

When revenue is shared to all the holders in the form of any ERC20 token, it blocks any transfers of the shares until all revenue distribution is complete. This would cause obvious issues on any DEX that allows a token address to be specified.

The minimum value that can be transferred in shares is 0.04 ether worth. Again, this would cause issues on any DEX that allows a token address to be specified, as it’d break the typical denotation of ERC20 that any unit of wei can be transferred between addresses.

Current contract: 0x3ab2ab661311501f4b3c9b17d40e3d95f9bc577f

Reason for Upgrade

There’s one further issue that we had to overcome with how we’ve configured our owners contract in its current state and that is:

To enable owners only staking, we would have had to perform a snapshot of all our share holders and then used that throughout the life cycle of owners only staking on our platform.

With the above point, that means that there would have never been fluid staking limits based on the amount of LP you held. Once the snapshot was taken, you could have sold all your LP shares and you would have still had your staking limit. That was a big problem, as our holders should be benefited with more utility and use by holding the LP share, rather than seeing its utility come under question by removing the need to hold the token after the said snapshot was performed. The original contracts served their purpose well, but we’re proud to announce an upgrade which increases functionality and removes the need for a snapshot.

New Contract Version

Our new contract version solves the issue described above in a way that will give dynamic staking limits based on how much LP you hold, and how much you actively have staked in our pool. The new process for owners only is:

You will stake an amount of LP into our pooling contracts. When that LP is staked, then our pool contracts recognise that staking of LP has occurred, records the amount and then grants you a LINK staking limit.

If you have an active LINK stake and remove your LP ownership stake, your LINK staking positions on our nodes will also be removed based on how much of your LP stake you remove.

Although the LP share can’t fit to the ERC20 transfer function, we have added ERC20 support for the standard name, decimal, symbol constants and balanceOf for viewing your balance in any standard ERC20 wallet. Any attempt to transfer the token in a standard wallet will just result in a reverted transaction.

With the above, it introduces a new mechanism of stakingOwnership . When staking ownership, the LP shares don’t leave your wallet, rather it sends a notification to any contract receiving those shares that a certain amount has been staked. In this case, our owners contract will notify our staking contracts that X amount of LP has been staked with them, to which the pooling contracts take action on, giving you your staking limit.

You can view all these code changes at:

https://github.com/linkpoolio/linkpool-owners

If anyone has any code comments, please raise an issue! We fully welcome people analysing our contracts and providing any feedback.

Nuances of staking ownership:

The LP share tokens do not leave your wallet on staking, your full balance will be retained.

For what amount of LP is staked, you cannot then transfer those share tokens from your wallet. For example, if you have 1 LP and staked 0.6 LP, you could then only transfer 0.4 LP with 0.6 LP being locked in your wallet address until you remove that ownership stake.

When any amount of ownership is staked into another address, any rewarded ERC20 token paid out in distribution is paid directly into your wallet address, not to the contract you’ve staked ownership with.

Based on the above points, we can now remove the need for a snapshot entirely from our LINK staking platform. The staking limits you have will be completely based on how much LP you have staked into the pool, rather than any arbitrary amount you had when a snapshot was taken. When LINK is distributed from the rewards earned in the owners contract, it’s still then sent directly to your wallet. It’s a end-to-end solution for our staking platform for life, preserving the ability to have a limit for both owners and the general public.

Contract Upgrade Timeline

The timeline is as follows:

Our DEX will be locked to any new orders on the 27th of March at 12pm UTC. You will only be able to remove any open orders.

On the 5th of April, we will deploy the new contract version and move all the LP balances from the old to new contract.

After that upgrade has been performed, we will update our DEX and app to reflect the new contract and normal service will resume. Any open orders will be reverted and LP tokens back in your wallet.

For the above, we will be adding a warning notice into the DEX to make this process more transparent to our app users.

We understand that this is a disruptive process, but we’ll be ensuring that the upgrade is performed smoothly since we have the tool sets in place to execute these upgrades automatically from previous iterations.