If Your Reading This Send Booty Pics

SpankBank v0 Guide

Today nosotros are incredibly excited to announce that we've launched the SpankBank v0. The smart contracts have been deployed to Ethereum mainnet and the staking UI is up at banking company.spankchain.com.

Deployment Transaction Link

SpankBank Contract Link

Hither's what you demand to know:

  1. While the smart contracts are complete, the UI all the same needs some work. Notably, only the staking is functional at the moment, the remainder of the SpankBank Explorer (viewing other staker profiles, historical data, analytics, etc…) will exist coming in the next few weeks.

How to stake your SPANK

Below are a serial of screenshots where I (Ameen) staked my SPANK. I didn't do everything perfectly in guild, but if y'all follow along I'll walk through all the details.

If none of this makes any sense to you, or y'all're newly discovering the project, Fear NOT. Our wonderful community managing director Chase put together a great overview of the two-token SPANK + Haul economy nosotros've built that you can get-go with.

It is time. My SPANK is ready.

So beginning I went to the SpankBank Explorer at bank.spankchain.com and clicked the "Stake your SPANK" button at the bottom. And then I noticed that the little grayness "Max:" wasn't properly loading and I realized that I hadn't continued to my MetaMask business relationship.

I clicked the "Connect to MetaMask" button and the push turned pinkish and confirmed the connectedness.

Once I connected my MetaMask, the "Max:" was properly populated with the total SPANK I had in my wallet. I decided to stake 350,000 SPANK for 12 months, the maximum staking time.

Ane thing to note is that i SpankBank period = xxx days, non quite 1 month. Perfectly aligning periods with months in Solidity was more trouble than it was worth so we decided to skip it. This means that fifty-fifty though periods will roughly track agenda months by virtue of starting on Sept 1st, they will eventually start to end a few days before the end of the calendar month equally nosotros progress.

Before moving on, I clicked on the "Settings" button.

Optionally prepare your Delegate Address and Booty Address from the staking settings.

From the Settings, y'all can optionally fix your Delegate Address and Haul Address. Equally a staker, you are required to checkIn once every period in order to be eligible to claimBooty for the next period. We wanted to requite stakers who adopt additional security the option of keeping their main staking business relationship in cold storage, and instead use a split up delegate account to checkIn and claimBooty . Nosotros as well wanted to give stakers the option to set a separate Booty Accost — the destination address for their claimed Haul—both for convenience (east.g. so you can set information technology to your SpankPay account) and for increased security (e.g. in example your consul business relationship gets hacked, the hacker would as well need to become your Booty account in society to merits and steal your Booty).

If yous decide to use a different Delegate Address or Booty Address, yous'll still demand to transport ETH to your Spank Address—that'south the one which initiates the transaction and needs to pay the gas fees.

In my case I decided to skip all that, stick to the defaults, and use my MetaMask account equally all three addresses.

If I alter my mind later, I can update the consul and Booty addresses… as soon every bit we send the interface for that :)

One other matter to know at this stage is that you lot can just ever pale once from a specific staker business relationship. Staking addresses and consul addresses must be unique to a specific staker, so if yous stake once (e.grand. to test), you'll have to use a dissever business relationship to stake once again. Y'all tin yet use the same Booty Address to receive your Haul in one identify beyond multiple stakers y'all control.

Look earlier you lot leap!

Once I clicked ostend I run across another popup confirmation screen which shows me how much SPANK I'm getting prepare to pale and for how long.

Yep. Permit's practise this. I hit stake.

Now for the MetaMask confirmation.

Once I hitting stake, I encounter the familiar MetaMask confirmation popup window. If you lot look closely in a higher place the $0.00 USD amount you'll notice that the transaction is an "ApproveAndCall" and the address is not really the SpankBank contract accost, but instead the SPANK ERC20 token contract address. This is fine. The short answer here is that this saves the user from having to execute (and wait for) an actress transaction to the SPANK ERC20 contract commencement to "approve" the SPANK amount they want to stake. Instead, nosotros combine the "approve" and "stake" into a single transaction by sending the staking parameters equally a payload to the SPANK ERC20 "ApproveAndCall" function, which forwards them forth to the SpankBank contract on your behalf. Corking.

Because I'm impatient, I clicked "edit" above the "Gas Fee" and switched information technology over to 20 gwei from it's default of ~three gwei and so the transaction would go mined more than quickly. So I clicked "save" and so confirmed the transaction.

Once I confirmed the MetaMask transaction, the confirmation popup in the SpankBank explorer displayed the transaction ID, which I could click on to testify the transaction on etherscan.

After a few moments my staking transaction was confirmed and subsequently refreshing the page, I was able to see my active stake and some basic analytics.

I'm not going to prevarication, it feels pretty adept to exist the genesis staker.

And that's all there is to staking! Cheers!

Wait don't go I nevertheless have a lot of questions!

Okay. So now yous've seen how to pale, simply we oasis't gotten into all the details about how this whole SpankBank actually works. Let'southward do that now.

What is this all about?

You stake your SPANK to earn Booty. Okay that role you lot understand.

How much BOOTY will I earn?

Answering this requires a bit of background into how the SpankBank manages BOOTY issuance.

Our SpankBank driven economy.

Every calendar month, all the fees that SpankChain collects we send as BOOTY to the SpankBank to be counted and burned (eliminated from the total supply). At the beginning of each new flow, the SpankBank volition issue new Booty just if the total BOOTY supply is less than the target BOOTY supply, which is 20x the previous menstruum'due south fees.

If let's say at that place are 20,000 total Booty in apportionment, and in a given period 20,000 BOOTY is transacted on the SpankChain camsite (some Haul would exist re-used and spent multiple times), we would take our 5% cutting (1,000 BOOTY), and send it to SpankBank where it would be counted and burned, leaving just nineteen,000 BOOTY remaining. The target supply would and so be twenty x i,000 Booty in fees= twenty,000 Booty, and and so one,000 new BOOTY would be minted to get from nineteen,000 to 20,000 Haul and it would exist distributed to all SPANK stakers proportional to their SpankPoints.

At present to explain SpankPoints. Stakers are rewarded with extra Haul for staking for additional periods. The SpankPoints for each staker are calculated every bit the amount of SPANK staked multiplied past the staking gene. The staking factor ranges linearly from 100% if staking for the maximum length of 12 periods, to 45% for staking the minimum length of 1 flow. And then 50% for 2 periods, 55% for 3 periods, etc…

So let'south say in that location are only 2 stakers, Alice and Bob, each with 100 SPANK staked. Alice stakes for 12 periods while Bob stakes for only 2. This ways Alice has 100 SPANK * 100% = 100 SpankPoints, and Bob has 100 SPANK * 50% = 50 SpankPoints. Now, Alice and Bob would each receive BOOTY equal to their fraction of the total SpankPoints for the period. The total SpankPoints would be 100 Alice + 50 Bob = 150 total. If we plug this into our last case and distribute the i,000 newly minted BOOTY among these 2 stakers, Alice would receive (100 / 150) * 1,000 = ~667 Booty and Bob would receive (50 / 150) * one,000 = ~333 BOOTY.

Bootstrapping the SpankBank

Every bit mentioned earlier, we set the initial Haul supply to x,069 which roughly matches 20x the fees nosotros would have nerveless if we charged 5% on this past month's transactions. Considering we tin't collect fees in Booty until we have BOOTY, we decided to bootstrap (or should we say… bootystrap?) the SpankBank by issuing the initial BOOTY supply to ourselves, and so distributing information technology through an airdrop at the beginning of adjacent calendar month to all stakers based on their SpankPoints. So if you pale for longer, you'll start out with more Booty.

What else can this thing practice?

The SpankBank has several other features, which nosotros explain in detail in the documentation, but will cover briefly here:

  • checkIn — Used by stakers to institute their eligibility for receiving BOOTY for the next period. Can as well optionally extend the staker's catastrophe catamenia.

Once nosotros upgrade the SpankBank Explorer UI we'll create a follow up guide with screenshots to explain how to use each of these features.

What if this all goes horribly wrong?

So in the absolute worst case scenario, where staked SPANK from the SpankBank are somehow stolen or frozen, nosotros would accept to "difficult-fork" our own SPANK ERC20 token. Nosotros would immediately contact all exchanges to let them know to stop all SPANK trading to limit whatever potential upside for an attacker in selling to unknowing buyers. So nosotros would migrate to a new SPANK ERC20 contract and airdrop to a snapshot of balances, deploy a new SpankBank, and start sending fees to that.

This would exist a massive coordination headache, simply ultimately the migration price isn't that high, we're confident that the codebase has been thoroughly tested, and the upside for an assault is limited enough that it probably makes more sense to just let the states know. So I'one thousand not that worried about this scenario.

In the less bad scenario where nosotros detect a critical bug, only no funds have been stolen or frozen even so, we would vote with our staked SPANK to close the SpankBank, and all stakers would immediately be able to withdraw their stakes. Then nosotros would redeploy a new SpankBank, but wouldn't take to hard-fork the SPANK ERC20 token.

Teehee.

As of this writing, we've passed $69,000 in staked SPANK, huzzah!

polimakeles.blogspot.com

Source: https://medium.com/spankchain/spankbank-v0-guide-6654aad1a192

0 Response to "If Your Reading This Send Booty Pics"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel