SpankChain
Published in

SpankChain

SpankBank Hotfix

We did it! Oh shit!

Yesterday evening I (Ameen) was informed that the SpankBank has a critical vulnerability. Stakers can splitStake and overwrite other existing stakers, permanently freezing their staked SPANK. All staked SPANK is currently safe because the splitStake function can’t be called by any staker until the next period (you can’t splitStake after you have checked in for a period, and staking automatically checks you in). We have closed the deployed SpankBank, fixed the bug, and redeployed. If you have already staked, you can immediately withdraw, and re-stake if you choose.

New SpankBank Contract

New BOOTY Contract

We’ve updated the SpankBank Explorer UI and added a “Withdraw stake from previous contract” button that only shows up if we recognize your account as a staker in the buggy SpankBank. As of right now, you can immediately withdraw your SPANK from the old SpankBank. Funds are safu.

Click to withdraw your stake from the previous SpankBank contract.

Once your withdrawal transaction confirms, the “Withdraw stake…” button will disappear and be replaced with the familiar “Stake your SPANK”, which will allow you to re-stake on the new SpankBank contract (with the same account if you want). We apologize for the inconvenience.

In our tests we check for overwriting the delegateKey of another staker, but failed to check for overwriting the main staker address. This is an excruciatingly stupid mistake. As the author of this code and the tests, I take full responsibility for the error. It was also my decision to forego an audit, which would have likely found the bug.

We may have been overconfident, but we weren’t reckless. We designed a big red button to push in case of emergencies like this one, and we’ve already fixed the problem and moved on. We also knew going in that the upside of attacking the system was low, and so the incentivizes for a rational gray-hat hacker who discovers a critical exploit favor sharing it with us, which is exactly what happened. Having a community of engaged developers who can help us make our systems more robust is invaluable at this stage, and one discerning hacker has earned a $5,000 ETH bounty.

Aside from the period 0 start time, which was reset when we redeployed the SpankBank contract, all other operational parameters of the SpankBank will remain the same.

We don’t think there are any more bugs (which is the type of thing that you’re right about once, but can be wrong about several times), but if we’re wrong we’ll pay out the bounty, fix it immediately and move on. It’s also helpful to remember that this bug presented us the opportunity to test voting to close the SpankBank, so now we all know what to expect when we decide to upgrade, or in case of another critical bug.

As a final note, I’d like to remind everyone in the community that we are pioneers exploring a new paradigm of economic coordination. We’re going to encounter obstacles and make mistakes. As a community, we need to be pragmatic and alert, ready to quickly maneuver to overcome any challenges, learning and growing stronger from each experience.

For context, here are a few of the obstacles SpankChain has made it through:

1. July 2017—Within 24 hours of Suicide Girls passing on us as a launch partner because they thought our name was too outlandish, we met Janice Griffith who joined as a cofounder and became our primary adult industry liaison.

2. Nov 2017—We designed our ICO to be too fair and didn’t offer buyers any bonus for committing early. As a result, our first day saw only $700K ETH in deposits and with 24 hours to go on the last day of the two-week auction we still only had $2M ETH deposited. The minimum was $5M. This was stressful, but rationally we knew that all the money would come at the very end, and true enough, with 8 hours to go we reached the minimum of $5M and by the auction close we had collected $6.5M.

3. April 2018—We were (perhaps foolishly) hoping to copy Gnosis’s work on the two-token model but they decided to de-prioritize it. We adapted and built the SpankBank ourselves.

4. September 2018—This.

In BOOTY we trust.

Connect with SpankChain

For more information about the SpankChain project:

--

--

--

Sexy Crypto Payments

Recommended from Medium

One simple approach to GLORY — with the added bonus of a gem

Lambo Defi - Enabling users to invest in any asset, in any quantity, at any time.

All you need to know about ICO Dashboard Scripts.

Investing In Messaging Apps: A Study

Our Vision and the Diamond Hair Program

StreamCoin (STRM) Listed on Probit Global

OpenSea Fires the Broadside Cannons with ‘Seaport Protocol’: The Next Generation of NFT…

Shilltopia: A Shiller’s Utopia

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
SpankChain

SpankChain

A cryptoeconomic powered adult entertainment ecosystem built on the Ethereum network.

More from Medium

GinGr Tech Update — A Word from our CTO

Stand Up

LITTLE STATS ABOUT WAVES DUCKS

Smartphone pricing — Is it Justified?