SpartanDev: 04OCT21 - 10OCT21

Dev Update

SpartanDev: 04OCT21 - 10OCT21

Happy October! Spartan Protocol V2 just had its first week on mainnet & the first phase is going well! Read about it in the latest update

SpartanDev: 04OCT21 - 10OCT21

The news the Shieldwall has been waiting for, mainnet is back, stronger, faster and better than ever in V2. Rewardingly today the protocol cracked $2M TVL marking another important milestone for these early stages on mainnet.

The codeArena audit results and follow up contributions clearly show through in the slick working of the updated protocol and the care that has been shown in its update.

V2 was released with liquidity caps for each individual pool, allowing for a stepped and smooth growth approach. Taking inspiration from the legends over at THORchain.

These caps have been hit multiple times since opening. Each day, if the pools are at their caps; there is an assessment made and it may be increased in size. At first, this was a process of doubling the caps each time. Now that we are in the 1M-range for individual pools; the step sizes won't be doubling anymore. We should now expect selective non-doubling SPARTA increases in the caps as we continue through these early phases.

Vault Incentives & Dao Proposals

The first pools reached full initialisation today, unlocking some functions to be tested on mainnet. The important tests are already complete and have been given the nod by a few contributions to move forward.

This means we can look to enable the DaoVault incentives with a rough ETA pegged at: Tomorrow, Tuesday the 12th @ 2.00AM (GMT)

The curated pools are looking stable, ready for 'Vault Incentives' & 'Dao Proposals'.

This means that the Spartans who have provided liquidity should now look to stake their LP tokens in the DaoVault in preparation for that 'Harvest' button to be enabled & their vote to count towards proposals that will shape the very future of Spartan Protocol!

Spartan Protocol - Mainnet Release Blog

Spartan Protocol V2 Official Mainnet Launch
Spartan Protocol V2 is now live on mainnet! Spartans, assemble! Prepare to re-join the shield wall stronger than ever!

Wednesday feeBurn Updateβ€Œ

It is quite cool to see mainnet live now, watching these numbers grow and the total supply being deflated every time SPARTA moves around.

Spartan Socials - Twitterβ€Œ

Tweet of the Week:

Community Tweet of the Week:

SpartanSocials - Mediumβ€Œ

SpartanSocials - Telegram


Contributor's Focus

CodeArena Contest (Pre-Mainnet)

COMPLETED βœ… β€” Triage and prioritise the feedback submitted from the CodeArena wardens during the contest to prepare for the judges

COMPLETED βœ… β€” Work through the post-contest tasks with the C4 judges & team for the eventual allocation of awards to security wardens

COMPLETED βœ… β€” C4 Public Report

SPARTA V2 (Token) (Pre-Mainnet)

COMPLETED βœ… β€” Work with DEXs & aggregators to ensure up-to-date information on the new SPARTA token (retiring the previous contract address)

COMPLETED βœ… β€” Work with token-tracking informational websites to ensure new token info is up-to-date (BSCscan, CoinGecko, CoinMarketCap)

SpartanContracts (Pre-Mainnet)

COMPLETED βœ… β€” Sort and prioritise all CodeArena submissions into contract scopes along with tags based on β€˜actionable’ or β€˜discussion points’

COMPLETED βœ… β€” Implementing refinements to contracts to address C4 & contributor feedback since the C4 contest code-freeze

COMPLETED βœ… β€” Rebuild automated testing & start private testnet

COMPLETED βœ… β€” Deploy V2 to public testnet

COMPLETED βœ… - Deploy V2 to BSC mainnet

DAppV2 (Pre-Mainnet)

COMPLETED βœ… β€” Prepare DAppV2 for testnet deploy

COMPLETED βœ… β€” Continue updating during private testnet

COMPLETED βœ… - Continue updating during public testnet

Looking Onwards (Post-Mainnet)

Continue updating DApp during mainnet ('functional' priority)

Enable the Vault incentives

Enable the DAO proposals

DAO to manage the Bond program (list assets & release allocations)

Work with aggregators to connect the SPARTA pools

Set up a reliable index of history scoped to contracts (for 'positions' page)

Build a 'positions' page for V2

Post-C4-contest article on the top issues

(Side-Task) β€” Work with CMC/CoinGecko to feed in the SPARTA pool info

March onwards with our original goals of building the decentralised, yield-generating synthetics protocol on Binance Smart Chain


GitHub Activity β€” Spartan Contracts v2

As expected; we had no realised changes to the contracts heading into the mainnet launch for the week. We should now consider the contracts to be at their final v2 stage and shift our focus to code review from now on.

The focus is now on future phases & features of the protocol, shaped by the community contributors. Some examples of proposed future contracts from the community having included lending & leverage. Anyone looking to contribute to these future additional contracts please feel free to reach out on Telegram and join the contribution community to help shape it!

GitHub Activity β€” Spartan DApp v2

Global Changes

  1. Added rounded-circle class to all token icons to remove the dreaded USDT logo's background issue (and any future token logos with a non-transparent bg)
  2. Changed USDT logo to custom USD logo throughout
  3. Added custom USD logo for Col alignments wherever SPARTA logo is used in a component above or below
  4. Removed/updated any hardcoded checks for mainnet/testnet to include mainnet
  5. Added a bunch of translation injections throughout the DApp (still a few views left to check/update)

src/components/Approval/Approval.js

  1. Added validity checks & refactored out some logic from the JSX

src/components/AssetSelect/AssetSelect.js

  1. Made the AssetSelect button overflow: 'hidden' to stop the SPARTA selection pushing to a new line for a short period on load/change

src/components/Common/AddressConn.js

  1. Added page reload for window.BinanceChain too, so the DApp reloads if a BinanceChainWallet user changes their account or selected chain inside their wallet extension (this was already the case for all other wallets that use window.ethereum, but BC wallet does not)

src/components/DataManager/DataManager.js

  1. Hand in chainId to getTokenDetails() now that mainnet is live

src/components/Icons/icons.js

  1. Added custom USD logo
  2. Added USDC logo
  3. Added Ledger logo

src/components/Share/SharePool.js

  1. Fixed Twitter share title to 'Spartan Protocol'

src/components/Supply/Supply.js

  1. Added TVL figure to supply dropdown for now
  2. Injected translations
  3. Added TVL tooltip
  4. Changed USDT logo to custom USD logo

src/components/Tooltip/tooltip.js

  1. Added info tooltips:
  • Pool capped
  • Pool curated
  • Pool Inactive
  • Pool Normal

src/components/WalletSelect/LPs.js

  1. Added redemption value of each LP parcel & made it default
  2. Added a switch-click function to switch it back to $USD value instead of redemption value if the user would like to see (can add a clear indicator/button for this later, for now, its a bonus hidden feature)

src/components/WalletSelect/WalletSelect.js

  1. Removed the loading state as it's instant and can't see a use for it
  2. Wrapped wallet.activate() in a setTimeout() because he was being a naughty boy (quite literally... weird issue with this for some users and giving it a timeout seems to fix it)
  3. Conditionally disable certain wallet selection buttons based on the window objects available:
  • WalletConnect will always be enabled as that doesn't use a window object.
  • BinanceChainWallet will only be enabled if window.BinanceChain is detected
  • All other wallets will only be enabled if window.ethereum is detected

src/components/WalletSelect/walletTypes.js

  1. Add in Ledger option (commented out, for now, awaiting testing)

src/locales/hi/translation.json

  1. Updated Hindi translations

src/locales/nl/translation.json

  1. Updated Dutch translations

src/utils/bigNumber.js

  1. formatFromWei() will now dynamically go to a lower decimal if required
  2. formatFromUnits() will now dynamically go to a lower decimal if required

src/utils/math/nonContract.js

  1. Fixed convertTimeUnits() - wrap the incoming seconds variable in BN() to ensure its a BigNumber before the BN maths operations

src/utils/math/router.js

  1. Fixed addLiqAsym() estimates (i believe this is still slightly out for one more edge case as outlined in a GitHub issue)

src/utils/web3.js

  1. Update the mainnet addresses & changed some old contract var names to ensure no conflicts come up
  2. Uncommented all testnet & mainnet RPCs to allow the dapp to cycle through and spread the love
  3. Added mainnet to tempChains
  4. Changed oneWeek to the mainnet value 604800
  5. Updated getTwAssetId with the missing c
  6. Bypass the API call in getTwTokenLogo() to bypass the CORS issue for some users (will need to be dealt with at some point)
  7. Fixed the broken edge-case parse logic for addLiqSingle

src/views/pages/Donate/Overview.js

  1. Updated the progress bar label to dynamically be on whatever side is larger

src/views/pages/Home/NewPool.js

  1. Temporarily hid the NewPool's token info up the top (reliant on the API CORS issue being fixed)

src/views/pages/Home/Overview.js

  1. Only really relevant in the first 7 days of mainnet - added a 'first load' check to check how many established pools exist (after the pools object has finished loading) if there are 0; show the 'NewPools' tab by default

src/views/pages/Home/PoolItem.js

  1. Added pool cap liquidity progress bar (a visual indicator of how close the pool is to its cap)
  2. Updated the badges above the pool items & added tooltips + translation IDs (remove the text bloat above the pools and have it closer to the user's eyes)
  3. Added token icons for all unit qtys to suit smaller screens better & align the Cols

src/views/pages/Home/SummaryItem.js

  1. Removed the text bloat here and moved them to tooltips (see above)

src/views/pages/Pools/LiqAdd.js

  1. Added confirm message; if pool is inactive, cannot remove liquidity until it is active again

src/views/pages/Pools/LiqBond.js

  1. Added loading checks & loading spinner

src/views/pages/Pools/LiqRemove.js

  1. Changed inactive pool check to only matter if the pool is curated to align it with the contracts behaviour

src/views/pages/Swap/SwapPair.js

  1. Removed SPARTA logo to align the layout with other 'pool info' tiles in the DApp (like the home page)

Project Information

  • Website: https://spartanprotocol.org/
  • DApp: https://dapp.spartanprotocol.org/
  • GitBook (Docs): https://docs.spartanprotocol.org/
  • GitHub: https://github.com/spartan-protocol

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.β€Œ

Binance Smart Chain testnet Faucet

Engage with the community and contributors

Where to find out about all the latest updates or suggest improvements β€” get involved.