SpartanDev: June 2021

Summary

CodeArena Audit — Begins 15th July 2021

Donations for the Audit Continue to Come In =D the more the merrier

feeBurn Update

SpartanProtocol.org

docs.SpartanProtocol.org

Spartan Socials — Twitter

Top Impressions:

Top Engagement:

Top Community Mention:

SpartanSocials — Medium

SpartanSocials — Telegram

Contributor’s Focus

Phase 1 — SPARTA V2 (Token) — Completed!

Phase 2 — Spartan Protocol V2 (Protocol) — In Progress

SPARTA V2 (Token)

  • COMPLETED & ONGOING — Work with the centralised exchanges (CEX) listing SPARTA to ensure that SPARTA holders all have their tokens upgraded as simply as possible. It is expected that CEX holders will not need to perform any specific actions to have their tokens exchanged for V2 tokens (Binance, BKEX, MXC etc)
  • ONGOING — Work with DEXs & aggregators to ensure the new SPARTA token address is added to their lists as the primary address for SPARTA (retiring the previous contract address) (1inch, PancakeSwap etc)
  • COMPLETED & ONGOING — Work with token-tracking informational websites to ensure new token info is added and verified (BSCscan, CoinGecko, CoinMarketCap etc)

SpartanContracts

  • COMPLETED & ONGOING — Continued updating and stringent testing of V2 contracts to suit the changes made against the base token contract, and ensure the V2 contract suite is in a complete and stable position ready for a CodeArena community review and bounty period
  • BOOKED: 15/07/2021 — Put the contracts through a code review process on CodeArena.
  • COMPLETED & ONGOING — Continue the code review process within the community

DAppV2

  • COMPLETED — Update the V2 DApp to suit any required contract changes/upgrades
  • COMPLETED — Create DAO hub for proposal management (This was extended to a complete DAO instead of simple-DAO)
  • COMPLETED — Test bond process from start to finish via UI (propose bond allocation, vote it in, finalise it, and then proceed to bond assets and test the weight from that in the DAOVault, and other proposals)
  • COMPLETED — Rip out all the old libraries and rebuild using one component library; refactor and cleanup style sheets as we go to reduce the overall project size ready for larger-scale community contribution on mainnet
  • COMPLETED— Add a calculable APY figure to the SynthVault
  • IN PROGRESS—Set up a reliable index of history scoped to contracts (use this for positions page etc)

Phase 3 — Deploy & Iterate (Dependent on CodeArena Completion)

  • Assess codeArena audit and make changes where required
  • Deploy Protocol V2 to Binance Smart Chain mainnet
  • Enable Bond allocations to replenish TVL into the V2 pools
  • Deploy Lending to testnet
  • March onwards with our original goals of building the decentralised, yield-generating, solo staking, leveraged synthetics and derivatives + lending protocol on Binance Smart Chain

GitHub Activity — SpartanContractsV2

contracts/BondVault.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons

contracts/Dao.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons
  • Remove unused variables from CancelProposal() event
  • Changed all public functions to external where they weren't called internally to reduce gas and combat spurious dragons

contracts/DaoVault.sol

  • Formatting cleanup

contracts/Pool.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons
  • Changed all public functions to external where they weren’t called internally to reduce gas and combat spurious dragons
  • _addPoolMetrics — changed lastMonth to be set to block.timestamp

contracts/Reserve.sol

  • Formatting cleanup

contracts/Router.sol

  • Formatting cleanup
  • Changed all public functions to external where they weren’t called internally to reduce gas and combat spurious dragons
  • revenueDetails— changed lastMonth to be set to block.timestamp

contracts/Synth.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons
  • Changed all public functions to external where they weren’t called internally to reduce gas and combat spurious dragons
  • constructor — inherit decimals from the synth’s layer1 token (future-proofing)

contracts/Utils.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons

contracts/poolFactory.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons
  • Changed all public functions to external where they weren’t called internally to reduce gas and combat spurious dragons

contracts/synthFactory.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons
  • Changed all public functions to external where they weren’t called internally to reduce gas and combat spurious dragons

contracts/synthVault.sol

  • Formatting cleanup
  • Reduce require() returns to combat spurious dragons
  • Remove blockDelay variable + all refs
  • setParams() — shift four -> three due to blockDelay removal
  • _addVaultMetrics() — changed lastMonth to be set to block.timestamp

test/CheckPreMainnet.md

  • Added checklist for settable variables; confirm these are all intended mainnet values before mainnet deploy

GitHub Activity — SpartanDAppV2

.github/workflows/*

  • Workflow only deploys PRs to hosting if they have the ‘deploy’ tag now

package.json

  • “bootstrap” — upgraded from “4.5.3” -> “5.0.1”
  • “react-bootstrap” — upgraded from “1.4.3” -> “2.0.0-beta.0”
  • “bootstrap-icons” — removed
  • “chart.js” — removed
  • “classnames” — removed
  • “match-sorter” — removed
  • “mdb-react-ui-kit” — removed
  • “moment” — removed
  • “nouislider” — removed
  • “react-big-calendar” — removed
  • “react-bootstrap-sweetalert” — removed
  • “react-bootstrap-wizard” — removed
  • “react-chartjs-2” — removed
  • “react-datetime” — removed
  • “react-jvectormap” — removed
  • “react-notification-alert” — removed
  • “react-select” — removed
  • “react-table” — removed
  • “reactstrap” — removed

*.scss

  • Removed majority of the .scss style classes; simplify for new Bootstrap
  • Created new base styles for all used bootstrap components; will need to be iterated towards what we want ongoing
  • Created a base style for .white-content for each component too to handle being in light-mode theme

*.svg

  • Renamed all icons and recategorised the assets folder layout
  • Edited all used .svgs to make them compatible with React as an object to hand variables to (height, fill, stroke etc)

src/components/Approval/Approval.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/components/AssetSelect/AssetSelect.js

  • Convert reactstrap -> react-bootstrap
  • Convert mdb -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/components/Common/AddressConn.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to ReactComponents

src/components/Common/LanguageDropdown.js

  • Convert reactstrap -> react-bootstrap
  • Changed Polskie -> Polski

src/components/Common/ThemeSwitcher.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/components/Common/WrongNetwork.js

  • Convert reactstrap -> react-bootstrap

src/components/Footer/Footer.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/components/Header/Header.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Cleaned up the header structure & added new custom Sidebar

src/components/Icons/icons.js

  • Converted this into a custom Icon component for handling our custom SVGs and dynamic properties (colour, size etc)

src/components/Notifications/Notifications.js

  • Convert reactstrap -> react-bootstrap

src/components/RecentTxns/RecentTxns.js

  • Convert reactstrap -> react-bootstrap

src/components/Share/SharePool.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/components/Sidebar/Sidebar.js

  • Completely rebuilt the sidebar using Bootstrap Offcanvas + useState
  • Much more lightweight without overlapping behaviours from different screen sizes etc; we can add in a compact static sidebar for bigger screen sizes if we like; for now its a simple ‘click-to-open’
  • Ready for the style contributors to make it pretty!

src/components/Supply/Supply.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/components/Tooltip/tooltip.js

  • Created a custom Tooltip component for easier management of tooltips/simple popovers; ready for the style contributors to make it pretty

src/components/WalletSelect/WalletSelect.js

  • Split WalletSelect into some subcomponents to make it more manageable; ‘Assets’, ‘LPs’ & ‘Synths’
  • Added ‘ranks’ for some gamification fun
  • For the ranks; a total value of SPARTA needed to be calculated based on users SPARTA value held, staked, bonded etc

src/components/WalletSelect/Assets.js

  • Created subcomponent for normal layer 1 assets

src/components/WalletSelect/LPs.js

  • Created subcomponent for LP tokens

src/components/WalletSelect/Synths.js

  • Created subcomponent for Synthetic assets

src/components/WalletSelect/walletTypes.js

  • Converted icons to use custom <Icon / > component

src/components/layout/Common.js

  • Ripped out all the old code; made this component more simple; it’s purpose is now to be the parent of the app’s structure instead of housing that and a bunch of class management

src/locales/en/translation.json

  • Added a bunch of missing translation ids from throughout the dapp
  • Fixed some broken translations and some broken IDs
  • Translator contributors; this is now ready for you to build off

src/routes.js

  • Simplified and changed to suit the new Icon component

src/utils/web3.js

  • Plug in new SynthVault contract address + update ABI

src/store/synth/actions.js

  • Added calls to get new variables required for SynthVault APY calculation

src/views/pages/Bond/Bond.js

  • Convert reactstrap -> react-bootstrap

src/views/pages/Bond/BondItem.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/views/pages/CodeArena/Overview.js

  • Convert MDB -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/views/pages/Dao/NewProposal.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Fix default-selected proposal type bug
  • Added check for existing ‘open’ proposal; if true it wont let you make a new proposal (gas saver / UX)
  • Injected new translation IDs

src/views/pages/Dao/Overview.js

  • Convert reactstrap -> react-bootstrap
  • Injected new translation IDs

src/views/pages/Dao/ProposalItem.js

  • Convert reactstrap -> react-bootstrap
  • Injected new translation IDs

src/views/pages/Dao/components/AssetSelect.js

  • Convert reactstrap -> react-bootstrap

src/views/pages/Home/NewPool.js

  • Convert reactstrap -> react-bootstrap
  • Convert MDB -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/views/pages/Home/Overview.js

  • Convert MDB -> react-bootstrap

src/views/pages/Home/PoolItem.js

  • Convert MDB -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Converted tooltips to use custom <Tooltip / > component

src/views/pages/PU/EmptyPools.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/views/pages/PU/Overview.js

  • Convert reactstrap -> react-bootstrap

src/views/pages/Pools/LiqAdd.js

  • Convert reactstrap -> react-bootstrap
  • Added MAX button

src/views/pages/Pools/LiqBond.js

  • Convert reactstrap -> react-bootstrap
  • Added MAX button

src/views/pages/Pools/LiqRemove.js

  • Convert reactstrap -> react-bootstrap
  • Added MAX button

src/views/pages/Pools/Overview.js

  • Convert MDB -> react-bootstrap

src/views/pages/Swap/Swap.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Added MAX button

src/views/pages/Swap/SwapPair.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Converted tooltips to use custom <Tooltip / > component

src/views/pages/Synths/NewSynth.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/views/pages/Synths/Overview.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Added MAX button

src/views/pages/Synths/components/AssetSelect.js

  • Convert reactstrap -> react-bootstrap

src/views/pages/Upgrade/Overview.js

  • Convert reactstrap -> react-bootstrap

src/views/pages/Upgrade/Upgrade.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

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

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

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

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component

src/views/pages/Vault/DaoVault.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Added check for if incentives are disabled; show different button stating so if true

src/views/pages/Vault/Overview.js

  • Convert reactstrap -> react-bootstrap

src/views/pages/Vault/SynthVault.js

  • Convert reactstrap -> react-bootstrap
  • Added check for if incentives are disabled; show different button stating so if true

src/views/pages/Vault/SynthVaultItem.js

  • Convert reactstrap -> react-bootstrap
  • Converted icons to use custom <Icon / > component
  • Converted tooltips to use custom <Tooltip / > component
  • Added APY functionality

GitHub Activity — SpartanSite

.html

  • Update Discord link to new permanent link

Project Information

Official Links

Community Contribution

Engage with the community and contributors

Community Bounty Wallet

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Space to Everyone!

The world’s first NFT auction on the Opensea.io of digitized pottery

TAFToken Thanks you

Week 1 | Drip Network passive income progress

Cactus Custody Crypto Management System launches 2.0 Version with Six Enhancements

Late Night Derivatives — Mainnet

SuperDoge, Leme & Hollywood reward the Community — Coming to a Digital Wallet near you!

Ultra Protocol UPdate №8

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

SpartanProtocol

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

More from Medium

BLOCKCHAIN TECHNOLOGY EXPLAINED

#REMINDER: ONLY 2 DAYS LEFT TO OUR CALO RUN APP BETA LAUNCH

UTILITY, LAUNCH DATE and MINT PRICE!

Fireside Chat #5 (ft. Engineering)