SpartanDev:17/05/21–23/05/21

Deflationary feeBurn | TokenV2 | Ongoing BUIDl

Summary

The feeBurn has been in action since the first SPARTAv2 token transfer. It starts at 0% and grows/shrinks with the token’s total supply. The feeBurn is set to be 1% *if* the token’s total supply is at the max (300M) however the max supply is programmatically impossible to reach. Read more about this new deflationary aspect below:

In just over a week of SPARTAv2 (token) upgrade DApp going live, we have already seen over 700 users and 32 Million SPARTA upgraded to SPARTAv2. (This was also during a period where seasoned crypto participants have probably taken a smart move in steering clear of socials/blockchain and enjoying some fresh air)

BSCSCAN.com Screenshot 23 MAY 21: https://bscscan.com/token/0x3910db0600ea925f63c36ddb1351ab6e2c6eb102

To acquire SPARTAv2 (token), please read the below medium article for more details on how to:

  • Upgrade existing v1 tokens to v2 (Mainnet & Testnet)
  • Claim your share of SPARTA allocated to users impacted by the LP drain (Mainnet & Testnet)
  • Interact with DAppV2 to help test the V2 contracts (Testnet)

Spartan Protocol GitBook

This will be an ongoing focus for the wider community to contribute towards.

Spartan Socials — Twitter

Top Impressions:

Top Engagement:

Top Community Mention:

SpartanSocials — Medium

SpartanSocials — Telegram

Contributor’s Focus

Phase 1 — SPARTA V2 (Token) — Completed!

Affected Users Snapshot

Massive thanks to PeckShield for helping provide resources to one of our community contributors who worked on getting this snapshot! They were also very swift to reach out after the LP-drain and provide their advice and support to help understand and move forward.

Huge thanks also to Chiachih Wu for personally reaching out to some of the contributors and providing generous advice and support with the exploit and also the snapshot process.

All contributors who had interactions with PeckShield & Chiachih Wu throughout this process have reported very incredible generosity with their time and impressive knowledge. Can pretty confidently state that we wouldn’t have this snapshot right now without your help!

Deploy New $SPARTA V2 (Token)

Deploy Upgrade DApp

Add Deflationary Mechanism

Phase 2 — Spartan Protocol V2 (Protocol)

SPARTA V2 (Token) — CEXs

  • Binance CEX: Pending completion
  • BKEX: Pending completion
  • MXC: Pending completion

SPARTA V2 (Token) — DEXs

SPARTA V2 (Token) — BSC Scan (Complete):

SPARTA V2 (Token) — TrustWallet (Complete):

SPARTA V2 (Token) — CoinGecko (Submitted):

SPARTA V2 (Token) — CoinMarketCap (Submitted):

SpartanContracts

  • Put the contracts through a code review process on CodeArena
  • At the same time; continue adding automated tests and review the code within the community
  • Update contracts based on results from CodeArena and other reviews

DAppV2

Community Forum

  • 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

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

GitHub Activity — SpartanContractsV2

Project-Level

contracts/Dao.sol

contracts/Pool.sol

  • Decimals — unit256 changed to unit8
  • Cull newDAO code (migration feature; no longer relevant) to reduce lines of code
  • transfer() — Add ‘virtual’ & change ‘to’ to ‘recipient’
  • Bring in the new increase/decrease allowance, approve and transferFrom functions
  • Bring in approveAndCall & transferAndCall
  • _transfer() — Add/update checks and make the arguments more human-readable. Also add ‘virtual’
  • _mint() — Add check for 0x address. Also add ‘virtual’
  • burnFrom() — More human readable args. Remove ‘override’. Use the new allowance/approval functions
  • transferTo() — Remove function; no longer relevant
  • addLiquidity() — Changed to add() & ‘public’ changed to ‘external’
  • addLiquidityForMember() — changed to addForMember()
  • removeLiquidity() — Changed to remove() & ‘public’ changed to ‘external’
  • removeLiquidityForMember() — changed to removeForMember()
  • swap() — ‘public’ changed to ‘external’
  • mintSynths() — Changed to mintSynth()
  • burnSynths() — changed to burnSynth()
  • sync() moved to ‘Balances’ section

contracts/Reserve.sol

  • Added setIncentiveAddresses()
  • Added purgeDeployer()
  • Removed newDao refs (No longer relevant)
  • addLiquidity() — Changed ‘public’ to ‘external’
  • Updated refs to changed POOL contract function names (see above)
  • zapLiquidity() — Changed token-scope to pool-scope. Changed ‘public’ to ‘external’
  • Changed ‘Asym’ refs to ‘single’ (mostly in function names)
  • removeLiquidity() — Changed ‘public’ to ‘external’
  • removeLiquidityAsymForMember() — Changed to shorter removeLiquiditySingle() & changed to ‘external’. Refactored function
  • buyTo() — Changed to return only the ‘fee’
  • swap() & swapTo() — Removed the return
  • currentPoolRevenue() — changed to ‘view’
  • pastPoolRevenue() — changed to ‘view’

contracts/Sparta.sol

  • purgeDeployer() — removed return
  • feeOnTransfer — hard-coded max set to 500 bp

contracts/Synth.sol

  • Cull newDAO code (migration feature; no longer relevant) to reduce lines of code
  • transfer() — Add ‘virtual’ & change ‘to’ to ‘recipient’
  • Bring in the new increase/decrease allowance, approve and transferFrom functions
  • Bring in approveAndCall & transferAndCall
  • _transfer() — Add/update checks and make the arguments more human-readable. Also, add ‘virtual’
  • _mint() — Add check for 0x address. Also, add ‘virtual’
  • burnFrom() — More human-readable args. Remove ‘override’. Use the new allowance/approval functions
  • transferTo() — Remove function; no longer relevant

contracts/Utils.sol

contracts/poolFactory.sol

  • Remove newDao refs; no longer relevant
  • Remove curatedPools
  • Removed sorting and challenging lowest curated pools logic
  • Add isPool() helper
  • Remove curated pools helpers

contracts/synthFactory.sol

Interfaces

test/1_pool.js

test/2_swap.js

test/3_dao.js

test/9_daoDeposit.js

GitHub Activity — SpartanDAppV2

public/index.html

src/Providers.js

src/assets/css/spartan-icons.css

src/assets/css/styles.css

  • Added zoom class

src/assets/scss/spartan/custom/_footer.scss

src/components/Common/LanguageDropdown.js

  • Changed language names to be shown in the native language (ie. Greek -> Ελληνικά)
  • Changed DropdownItem to Button
  • Restyled and refactored

src/components/DataManager/DataManager.js

  • checkArrays() — enable actions to run on mainnet. Add in getSpartaGlobalDetails() && getBondSpartaRemaining() && getReserveGlobalDetails() to the loop

src/components/Footer/Footer.js

  • Change <I> classed icons to <img>
  • Add in tooltips to show what each icon represents (for users who don't recognise the icons)

src/components/RecentTxns/RecentTxns.js

src/components/Supply/Supply.js

  • Added hardcoded ‘Burn’ & ‘Bond’ figures for distro from V1
  • getTotalSupply() — Handle properly; it now uses: SPARTAv1 totalSupply plus SPARTAv2 totalSupply
  • getCirculatingSupply() — Handle properly; it now uses: getTotalSupply() minus SPARTA in reserve & bond contracts (released but non-circulating SPARTA)
  • getMarketCap() — This now multiplies the circulating supply * SPARTA token price
  • Enabled this component to show up on mainnet too now that it’s handled correctly
  • Visually show the v1 vs v2 circulating tokens
  • Visually show the distribution of totalSupply based on whether they were allocated via Burn, Bond or Emissions
  • Make the mapped out contracts more compact with 2 Cols

src/components/WalletSelect/WalletSelect.js

  • Enable wallet balances/assets on mainnet now that the actions are not bypassed

src/components/WalletSelect/walletTypes.js

src/components/layout/Common.js

src/store/pool/actions.js

  • getCuratedPools() — Check for valid poolFactory; if not the contract will not be called and the array will be empty
  • getTokenDetails() — Refactor; cleanup. We no longer use UTILS to get all this info; we simply call a max of 2 contract calls per asset. We now use static token icons for SpartaV1, SpartaV2 & BNB

src/utils/web3.js

  • getTokenContract() — removed
  • getWbnbContract() — removed

src/utils/web3Contracts.js

  • Changed getSpartaContract() to getSpartaV2Contract() for specific SPARTAv2 interfacing

src/views/pages/Pools/AddLiquidity.js

src/views/pages/Pools/BondLiquidity.js

src/views/pages/Swap/Swap.js

src/views/pages/Synths/Overview.js

src/views/pages/Upgrade/Overview.js

src/views/pages/Vault/Overview.js

  • That left no requirement for the getData() loop; so it was removed

GitHub Activity — SpartanSite

css/style.css

dao.html

  • Nav, body and footer content updated

faq.html

  • Nav, body and footer content updated

index.html

  • Nav, body and footer content updated

lending.html

  • Nav, body and footer content updated

pools.html

  • Nav, body and footer content updated

synths.html

  • Nav, body and footer content updated

Project Information

Official Links

Community Contribution

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

Incentivized liquidity and synthetic asset generation for Binance Smart Chain. https://SpartanProtocol.org