SpartanDev: 27SEP-03OCT21

Dev Update

SpartanDev: 27SEP-03OCT21

Mainnet is ready to be launched Spartans! Prepare yourselves for the 5th of October @ 2.00AM (GMT)!

SpartanDev: 27SEP-03OCT21

ITS MAINNET TIME

Thank you to those members of the Shield Wall that took the time to give the testnet a solid run through and have provided feedback for the Spartan contributors.

Tomorrow, Tuesday the 5th @ 2.00AM (GMT), is time to pick up your spear, dust off your shield and take your place in the shield wall. Spartan Protocol v2 goes LIVE.

From this article contributor, I want to express the deepest gratitude to the contract & DApp contributors for their relentless drive forward to get us to where we are now. Thank you!

And thank you to all those in the community who have provided support with encouragement and feedback; it has been priceless!

Mainnet V2 Phase 1 Info:

When: 5th of October 2021 @ ~2.00AM (GMT)

The V2 contracts will be deployed to mainnet for phase 1 functionality. Read the below general outline to get an idea of what the next steps look like:

  • Deploy V2 to mainnet
  • Deploy 4 pools & curate 3 of them
  • Enabled Dividends to further incentivise LPers
  • Wait for some distributed TVL
  • Enable incentives to direct most of that weight into the DaoVault
  • Wait for more distributed TVL & weight
  • Enable Dao proposals
  • The Dao can then handle listing Bond assets + allocations
  • Bond can pull in some more TVL & weight
  • Enable SynthYield tokens
  • Wait for some distributed SynthVault weight
  • Enable SynthVault incentives

A longer version of the above with more info per step will be published by the article contributors tomorrow on launch


Without further ado; i present this week's lovely contributor update:

Wednesday feeBurn Updateβ€Œ

Spartan Socials - Twitterβ€Œ

Tweet of the Week:β€Œ

SpartanSocials - Mediumβ€Œ

SpartanSocials - Telegramβ€Œ


β€ŒContributor's Focus

CodeArena Contest

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

IN PROGRESS β€” Post-contest article on the top issues

SPARTA V2 (Token)

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

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

PENDING - Deploy V2 to BSC mainnet

DAppV2

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

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

COMPLETED βœ… - Continue updating during public testnet

PENDING Β - Continue updating during mainnet

After Mainnet

(Side-Task) β€” Work with aggregators to connect to the SPARTA pools

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

Build a 'positions' page for V2

Enable the incentives

Enable the Dao proposals

Dao to list Bond assets & release allocations

(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

contracts/BondVault.sol

  1. Change bondingPeriodSeconds to mainnet value (6 months)

contracts/Dao.sol

  1. Add globalFreeze check to bond action
  2. _increaseSpartaAllocation() changed to 2M instead of 2.5M
  3. _handleTransferIn() change allowance check to match changed Bond allocation amount

contracts/Pool.sol

  1. Changed oneWeek to mainnet value (1 * week in seconds)

contracts/poolFactory.sol

  1. Changed minBASE to lower default for initial mainnet setup

contracts/synthVault.sol

  1. Changed minimumDepositTime to mainnet value (1 hour)

test/CheckPreMainnet.md

  1. Updated checklist of variables

GitHub Activity β€” Spartan DApp v2

src/components/Approval/Approval.js

  1. Plugged in Notification component for testing
  2. Added 'enough BNB for gas' checks

src/components/AssetSelect/AssetSelect.js

  1. Fixed/updated 'add to metamask' functionality & filtered out BNB from this function (it is in web3 wallets by default)

src/components/Common/AddressConn.js

  1. Added 'wallet not connected' alert functionality

src/components/DataManager/DataManager.js

  1. Removed addNetworkMM() & addNetworkBC() that were previously triggered on network change/check (trigger only the relevant wallet & only if its connected & only once; see updates in another component)

src/components/Footer/Footer.js

  1. Centered the 'Latest transactions' button

src/components/Notifications/Notifications.js

  1. Updated the Notifications component using Toasts from react-bootstrap

src/components/Supply/Supply.js

  1. Added simple Global Freeze indicator to the 'Supply' dropdown

src/components/WalletSelect/Assets.js

  1. Changed structure to suit more screen widths
  2. Hide 'add to metamask' button for BNB (see notes in AssetSelect)
  3. Added a total row for value in USD
  4. Added badges by asset type

src/components/WalletSelect/LPs.js

  1. Changed structure to suit more screen widths
  2. Added a total row for value in USD
  3. Added badges by asset type

src/components/WalletSelect/Synths.js

  1. Changed structure to suit more screen widths
  2. Added a total row for value in USD
  3. Added badges by asset type

src/components/WalletSelect/WalletSelect.js

  1. Moved the addNetworkBC() & addNetworkMM() logic here (from DataManager)
  2. These popups are now only triggered onWalletConnect which is only ever triggered once on page load (if the users had a wallet connected still when they finished their last visit) or manually by the user when they select and attempt to connect their wallet
  3. Cleaned up some loading logic for count of assets & disabled it on mainnet temporarily (until launch)

src/locales/tr/translation.json

  1. Turkish translations update (Thank you Hikmet!)

src/store/bond/actions.js

  1. Fixed incorrect conditional check when bonding bnb

src/store/web3/actions.js

  1. Moved the .substring() here to avoid a long string being added to Metamask even if it is not handled in the parent function

src/utils/math/router.js

  1. Updated the dynamic synth cap check logic to hand back an accurate bool for synthCapped

src/views/pages/Bond/BondItem.js

  1. Added 'enough BNB for gas' checks
  2. Added checkValid logic for disabled and dynamic button label

src/views/pages/Dao/NewProposal.js

  1. Added 'enough BNB for gas' checks
  2. Added globalFreeze checks

src/views/pages/Dao/Overview.js

  1. Updated isLoading conditions
  2. Trigger allListedAssets() action here as that data is required for NewProposal when in the Delist bond Asset section

src/views/pages/Dao/ProposalItem.js

  1. Added 'enough BNB for gas' checks
  2. Fixed missing conditional in canPoll()
  3. Changed 2.5M to 2.0M for bond allocation label
  4. Made the tiles fixed-height for now (better UI until the UI phase)
  5. Disable certain actions if the user doesn't have a wallet connected (for instance the 'vote' button)

src/views/pages/Home/NewPool.js

  1. Added 'enough BNB for gas' checks
  2. Added isLoading logic
  3. Added checkValid logic for disabled and dynamic button label

src/views/pages/Home/PoolItem.js

  1. Added token for each type to the 'swap' button's link (to ensure the swap button auto-selects normal tokens instead of zap/synth assets)
  2. Disabled 'Stake' button if the asset is not curated (this is better UX when there are curated pools, but worse if there are no curated pools which shouldn't really be the case anyway)

src/views/pages/PU/Overview.js

  1. Added isLoading handling to this less-used PU page

src/views/pages/Pools/LiqAdd.js

  1. Added 'enough BNB for gas' checks
  2. Moved the translation hook to the checkValid() level
  3. Added checkWallet() to trigger a 'Connect Wallet First' alert if you are trying to interact with the inputs without a wallet connected

src/views/pages/Pools/LiqBond.js

  1. Added 'enough BNB for gas' checks
  2. Added checkWallet() to trigger a 'Connect Wallet First' alert if you are trying to interact with the inputs without a wallet connected
  3. Moved the translation hook to the checkValid() level
  4. Added globalFreeze checks
  5. Updated progress bar to use the new Bond allocation size (2M)

src/views/pages/Pools/LiqRemove.js

  1. Added 'enough BNB for gas' checks
  2. Added checkWallet() to trigger a 'Connect Wallet First' alert if you are trying to interact with the inputs without a wallet connected
  3. Added Pool.freeze checks

src/views/pages/Swap/Swap.js

  1. Added 'enough BNB for gas' checks
  2. Added checkWallet() to trigger a 'Connect Wallet First' alert if you are trying to interact with the inputs without a wallet connected
  3. Added globalFreeze checks
  4. Added Pool.freeze checks
  5. Added Notifications component for testing

src/views/pages/Synths/NewSynth.js

  1. Added 'enough BNB for gas' checks
  2. Added checkValid logic for disabled and dynamic button label

src/views/pages/Synths/Overview.js

  1. Added 'enough BNB for gas' checks
  2. Added checkWallet() to trigger a 'Connect Wallet First' alert if you are trying to interact with the inputs without a wallet connected

src/views/pages/Upgrade/Upgrade.js

  1. Updated thresholds for 'enough BNB for gas' checks

src/views/pages/Vault/Components/DaoDepositModal.js

  1. Added 'enough BNB for gas' checks
  2. Added checkValid logic for disabled and dynamic button label
  3. Disabled if no wallet is connected (kind of redundant here but still helps edge cases)
  4. Added symbol to the modal's header
  5. Added globalFreeze checks

src/views/pages/Vault/Components/DaoWithdrawModal.js

  1. Created component for a DaoVault withdrawal modal
  2. There are some caveats with withdrawing from the vault that are better served up with a dedicated modal
  3. Followed the format of the other similar components with checkValid and the gas checks etc

src/views/pages/Vault/Components/SynthDepositModal.js

  1. Added 'enough BNB for gas' checks
  2. Added checkValid logic for disabled and dynamic button label
  3. Changed the '24 hours' label to be dynamic based on minTime
  4. Added globalFreeze checks

src/views/pages/Vault/Components/SynthHarvestAllModal.js

  1. Created modal component for SynthVault harvest all
  2. Followed the format of the other similar components with checkValid and the gas checks etc

src/views/pages/Vault/Components/SynthHarvestModal.js

  1. Also created a modal component for SynthVault harvest (single asset)
  2. Followed the format of the other similar components with checkValid and the gas checks etc

src/views/pages/Vault/Components/SynthWithdrawModal.js

  1. Created modal component for SynthVault withdraw
  2. Followed the format of the other similar components with checkValid and the gas checks etc

src/views/pages/Vault/DaoVault.js

  1. Added 'enough BNB for gas' checks
  2. Added checkValid logic for disabled and dynamic button label

src/views/pages/Vault/DaoVaultItem.js

  1. Moved some of the logic out of this component and to their own components
  2. Added 'Connect Wallet' alerts in various areas

src/views/pages/Vault/SynthVault.js

  1. Moved some of the logic out of this component and to their own components
  2. Added 'Connect Wallet' alerts in various areas

src/views/pages/Vault/SynthVaultItem.js

  1. Moved some of the logic out of this component and to their own components
  2. Added 'Connect Wallet' alerts in various areas

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.