SpartanDev: 26/04/21–09/05/21

SpartanDev: 26/04/21–09/05/21

The Buidl Continues

SpartanDev: 26/04/21–09/05/21

The Buidl Continues

You will notice this week’s Dev update bundles in a 2 week period due to the attacks that happened just before last week’s update. This week has been about figuring out what happened in detail and refining a path forward.

Please take the time to read the Medium articles below to make sure you are up to speed with what happened during the exploit and the path forward.

What Happened?

Today, Spartan Protocol was subject to an exploit targeting the liquidity pools.
The Spartan Contracts were fully audited by Certik prior to launch, along with the usual ongoing code reviews, so this…spartanprotocol.medium.com

The Road Ahead?

Rebuilding Spartan Protocol
The Plan Aheadspartanprotocol.medium.com


Spartan Socials

The past week has seen Spartan Protocol get a fair amount of air time, driving a lot of people to join our social media channels to see what is happening and how the protocol responds to the exploit.

Considering that crypto socials, in general, have a reputation for being a bit toxic, it was refreshing and heartwarming to see the positive interactions between community members supporting each other taking the time to help everyone understand what has happened and the plan forward.

The numbers below highlight the growth in the community that are now actively engaged with our social platforms, please help continue this positive environment and support any newcomers to the shield wall.

We have an opportunity to show the community what makes Spartan Protocol different.


Twitter

Top Impressions:

Top Engagement:

Top Community Mention:

A big thank you goes out to the team at PeckShield for their help through this tough period. They also provided a full and detailed analysis of the transaction which you can read about below.

SpartanSocials — Medium

SpartanSocials — Telegram


GitHub Activity

Whilst the contract contributors prepare the new base token contract and adapt the existing V2 contracts in preparation for the CodeArena bounty, the front enders have continued to work on the DAppV2 & the snapshot of LP holders from just before the attack.

SpartanContractsV2 (‘master’ Branch)

          • Implement initial fix for calcLiqShare bug & move the sync() function here
          • Change bond period to 6 months (was 12 months)
          • Remove Utils pricing functions
          • Update synthVault automated tests
          • Update repo readme in preparation for CodeArena bounty

          SpartanContractsV2 (‘RebuildSparta’ Branch)

          New base (SPARTA token) contract with the initial new functions/features:

          • iBEP677 approveAndCall() | to replace the previous transferTo function
          • burn() | ability to internally burn SPARTA tokens
          • upgrade() | ability for users to upgrade/bridge their old SPARTA tokens for the new SPARTA tokens

          New ‘claim’ contract for the SPARTANs affected by the attacks:

          • claim() | ability for users to claim their allocated SPARTA based on the snapshot of their SPARTA weight of LP tokens held or locked in DAO/bond
          • expire() | users will have a 6 month window to make their claim of the SPARTA, after which the remainder will transfer to the DAO

          Refactor contracts:

              Refactor DAO proposals:

              • ‘Start Emissions’ & ‘Stop Emissions’ -> ‘Flip Emissions’ now that the base contract has been simplified accordingly
              • Incentive address no longer relevant with Reserve contract etc; so has been removed

              Other Changes:

              • Name changed from “SPARTAN PROTOCOL TOKEN” to “Spartan Protocol Token”
              • approveAndCall() added to test Token1 contract (for automated testing)
              • TestVault created for initial testing of the approveAndCall() implementation
              • Base contract automated testing expanded

              GitHub Activity — SpartanDAppV2

                                Supply DropDown:

                                  • Extend translations

                                  Contributor’s Focus

                                  Contributor focus moving forward is going to be broken into phases. This is done to highlight that the original goal has not changed but acknowledges and embraces the opportunities that there is some rebuilding required in order to get there.

                                  • Phase One — deals with the snapshot process, along with the new $SPARTA token and bridge
                                  • Phase Two — happening in line with phase 1; is adapting the V2 contracts to the new changes/features and getting them prepared for the CodeArena bounty. This phase also includes the code review process
                                  • Phase Three— is continuing with the goal of delivering incentivised deep liquidity pools for leveraged synthetic token generation

                                  Phase 1 — The New $SPARTA Bridge

                                  Affected Users Snapshot

                                  Confirm SpartanProtocol holders & members snapshot from just prior to the attack.

                                  Firstly a complete list of all possible wallets needed to be built to ensure no Spartans would be missed:

                                  • A complete list (for each pool) of every wallet address that held the LP token at any point *COMPLETE*
                                  • A complete list (for each bond contract) of every wallet that ever added liquidity via bond *COMPLETE*
                                  • A complete list of every wallet that ever deposited into the DAO (Lock+Earn) *COMPLETE*
                                  • Recreate the state of the chain from just prior to the attack to do the below calls *COMPLETE*

                                  Loop the above lists using the relevant contract functions:

                                  • List of all wallet holdings (LP tokens) *COMPLETE*
                                  • List of pool’s depth in SPARTA & total supply of LP units *COMPLETE*
                                  • List of each DAO member’s locked units (LP Tokens) *COMPLETE*
                                  • List of each Bond member’s locked units (LP Tokens) *COMPLETE*
                                  • Use the above to get every wallet’s claim to base (SPARTA) to be allocated for the ‘claim’ contract for affected users *IN PROGRESS*

                                  Issue A New $SPARTA token (Must await snapshot completion)

                                  • Confirm new token ticker — suggestions welcome but leaning towards keeping the old ticker ($SPARTA)
                                  • Build & deploy new base contract
                                  • 1-way bridge — 1 old SPARTA = 1 new SPARTA
                                  • The above-weighted claims (from the snapshot) are plugged in for affected users to claim via the bridge dapp
                                  • Implement deflationary mechanisms (burn SPARTA on each transfer etc)

                                  Tokenomics

                                  • The 300 million market cap remains unchanged
                                  • The 100 million previously-planned initial distribution is unchanged however the remaining allocation for Bond will be reduced to account for the above snapshot/claim process

                                  Phase 2 — The Original Plan

                                  SpartanContracts

                                  • Continue updating V2 contracts to suit the changes to the base contract and get it finalised ready for the CodeArena bounty
                                  • Put the contracts through a code review process on CodeArena
                                  • Continue the code review process within the community

                                  DAppV2

                                  • Update the DAppV2 to suit any changed contracts

                                  Community Forum

                                  A community forum for longer-form & categorised discussion has been created in GitHub: join the discussion here.

                                  This was a plan for some time now but fits in well with the current plans to further integrate the community with the code. We all know the only way to do this is to ensure community members are always only 1 click away from the code changes (GitHub)

                                  • Setup categories & get the community contributing good questions about DAO proposals & mechanics of AMMs so that they can be padded out into longer-form go-to guides to post in the channels

                                  Phase 3 — Deploy & Iterate

                                  • Deploy V2 to mainnet (with Synths)
                                  • Enable Bond allocations to get some TVL into the V2 pools
                                  • Deploy Lending to testnet
                                  • Continue ahead with the previous plans!

                                  Community Contribution

                                  Spartan Protocol is at its core, a community-driven and led project. In this vein, the more contributors the better. There is a great opportunity for community members to contribute by making LP reward analysis tools, etc.

                                  Recently, community members have been graciously funnelling in to contribute to explainer articles, ideas and even $SPARTA donations to support the growth of the platform.

                                  Engage with the community and contributors

                                  Where to find out about all the latest updates or suggest improvements — get involved.

                                  GitHub list of bounties available

                                  spartan-protocol/spartan-site
                                  New issue Have a question about this project? Sign up for a free GitHub account to open an issue and contact its…github.com

                                  Reach out on telegram to get involved: https://t.me/SpartanProtocolBounties