Rug-Proof $HIT Staking

12.75 % (127.5 B HIT) Locked in a Rug-Proof Smart Contract

Staking is the first part of our mission to add additional functionality to HIT, and was successfully tested and added April, 2024.

Through our novel Rug-Proof contract, we have placed all future staking rewards into a contract that the founder cannot access, but to distribute to stakers; a first of it's kind. This is open source, and we hope to see more projects adopt this.

On 27th April 2024 - this went livetxid_rdx1chlwds7wxcewgttxaanlg9aug0d725mjs2l9v02j8emca5gya38sf4kmaz

Why Rug-Proof?

Addix was born out of the ATL in sentiment and price, and with many Memecoins launching, then soon Rugging. As a result, not just promising, but coding in Rug-Proof measures, was top of our list of priorities.

We arrived at our novel Rug-Proof contract, by forking Astrolescent's Staking Contract, written by Timan. This is the original; https://github.com/Astrolescent-Official/astrolescent-contracts-staking

And the fork by Marco; https://github.com/nemster/astrolescent-contracts-staking

Having written the fork, Marco placed the Smart Contract in the Radix Developer Telegram Group for Public Review; https://t.me/RadixDevelopers/50289

We have placed all future staking rewards into a contract that the founder cannot access, but to distribute to stakers; a first of it's kind.

TX ID: txid_rdx1chlwds7wxcewgttxaanlg9aug0d725mjs2l9v02j8emca5gya38sf4kmaz

The above transaction is 127.5 B HIT being locked up. Since then, each week HIT has been trustlessly distribuited according to the following schedule

This is open source, and we hope to see more projects adopt this.

Bullish on Radix

Forking the original staking contract encapsulates everything about why we are bullish on Radix; The excellence within the community, the ease with which something brilliant can be modified, and the simplicity of the language and logic to execute this.

Technical Details

Users' stakes are deposited in a OneResourcePool, which is a blueprint developed by the Radix team, called "sastrl": https://github.com/nemster/astrolescent-contracts-staking/blob/main/src/lib.rs#L22

Felix then deposited the rewards in a Vault (a simpler coin storage) called "future_rewards": https://github.com/nemster/astrolescent-contracts-staking/blob/main/src/lib.rs#L23

The only way out of "future_rewards", the "take" method, is used here: https://github.com/nemster/astrolescent-contracts-staking/blob/main/src/lib.rs#L89 Coins taken go directly into "sastrl" via the "protected_deposit" method.

The difference among "protected_deposit" and the "contribute" method used by users ( https://github.com/nemster/astrolescent-contracts-staking/blob/main/src/lib.rs#L68) is that "contribute" mints new Staked HIT and returns them while "protected_deposit" returns nothing.

The "create_proof_of_amount" seen is just needed to pass the authentication system, because "deposit_rewards" is restricted, not PUBLIC: https://github.com/nemster/astrolescent-contracts-staking/blob/main/src/lib.rs#L13

Now ELI5 please

I plan to give out sweeties to everyone who has supported me. Rather than keeping the sweets in a draw in my room, where I can pick at them, I lock them inside a gumball machine, then flush the key down the loo. I am unable to take the sweets back out, even though I put them in there. All I can do is twist the mechanism, so the sweets are handed out to the people who rightfully deserve them.

So how does the Staking Actually Work?

The contract is a fork of a radix emulator, so it works with precisely the same mechanism. That can be a little confusing, so let's go through how staking Radix works.

When you stake XRD (Radix), you're locking up your Radix tokens to support the network, often in exchange for rewards.

  1. Initial Staking:

    • You stake a certain amount of XRD.

    • In return, you receive Liquid Staked Units (LSUs), which represent your stake.

  2. Earning Rewards:

    • Over time, your staked XRD earns rewards.

    • These rewards are added to your stake, increasing the total amount of XRD you have staked.

    • Note - The LSUs in your wallet do not change.

  3. Value of LSUs:

    • The value of each LSU can change based on the total amount of staked XRD and the rewards generated.

    • If the total staked XRD increases due to rewards, the value of each LSU will represent a larger amount of XRD.

  4. Unstaking:

    • When you unstake, you trade your LSUs back for XRD.

    • Because the total amount of staked XRD has increased (thanks to the rewards), the number of LSUs you hold might correspond to more XRD than you initially staked.

This is exactly how Staking $HIT works, but instead of Staking XRD and receiving LSUs, you stake $HIT and receive StHIT

So, why does the $HIT not correspond to StHIT?

Just like with XRD and LSUs, the mismatch happens because the value of StHIT changes over time as rewards accumulate, so the number of StHIT you receive back doesn't directly match the initial amount of $HIT you staked but instead reflects the increased value due to earned rewards.

Disclaimer

Make sure you are eligible to use the Addix staking service according to laws and international laws pertaining to your jurisdiction. By using the service, you declare you are not subject to any legal restrictions. Please see the section on Staking Terms and Conditions for more information.

Last updated