SpartanDev: June 2021
The big June 2021 contributor update. Everything prepared for CodeArena & V2 next steps!
CodeArena Audit | Token Upgrade Continues
Summary
Excitement abounds this week; as exchanges continue to finalise token upgrades from SPARTA V1 to V2. Binance is the main one this week with allowing deposits and withdrawals again.
Most excitingly is the listing and commencement of count down for the Spartan Protocol contract audit with codeArena, a timely reminder that the crowdfunding drive is ongoing and in need of your support.
Have a fantastic week and thank you loyal Spartans!
CodeArena Audit — Begins 15th July 2021
This week continues to see donations for the audit continue to roll in. We still need your support, all donations help ensure the V2 Protocol contracts get a thorough review from many angles.
Now that the SpartanProtocol v2 contracts are complete, a crowdfunding drive has begun to help fund extensive auditing via a codeArena contest.
If you can donate, big or small, every contribution helps this community project achieve its full goal of $96k as soon as possible to ensure that Spartan Protocol is in a prime position to release the V2 contracts and DApp onto mainnet.
Donate Here: — https://dapp.spartanprotocol.org/codearena
No problems; upgrade today
You can use the Spartan Protocol Upgrade DApp to upgrade your SPARTAv1 tokens to SPARTAv2 yourself.
Upgrade DApp — https://dapp.spartanprotocol.org/upgrade
Bit-Rush Crypto has created a video guide on using the SpartanProtocol Upgrade DApp — timestamp 3:20. Nice work SPARTANS!!
Token Transition Progress
Only ~7% of SPARTA tokens left to upgrade to V2
feeBurn Update
Over 200K SPARTAv2 burnt out of the supply permanently via the feeBurn function! Crazy to already see more than 1.5% of the fallenSpartans amount burnt without the v2 liquidity pools up to throw fuel on the bonfire; awesome to see the new deflationary aspect of SPARTA out in the wild doing it’s intended task.
SpartanProtocol.org
Community contributors have been putting in the time to update and refine the main webpage for Spartan Protocol. Feedback, suggestions and contributions are welcome. Reach out in the telegram channels if you want to help.
docs.SpartanProtocol.org
Some new & old community members have put their hands up recently to help get the Spartan Protocol GitBook to reflect current progress and iterations of the protocol — head over and check it out to learn more.
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!
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
No breaking changes here; mainly a focus on formatting/readability of the contracts & minor gas/compile-size optimizations this week.
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
- 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.
Engage with the community and contributors
Where to find out about all the latest updates or suggest improvements — get involved.
- Medium: https://medium.com/spartanprotocol
- Twitter: https://twitter.com/spartanprotocol
- Telegram Community: https://t.me/spartanprotocolorg
- Telegram Announcements: https://t.me/spartanprotocolann
- Community-Built Discord: https://discord.gg/wQggvntnGk
Community Bounty Wallet
Whilst there is no treasury nor contributor allocations, there was a public community bounty wallet set up a while ago to help handle donations from the community and other incentive programs (BNB from the Binance BUIDl program was sent here) which can be viewed here: