SpartanProtocol
Published in

SpartanProtocol

  • Mainnet V2 protocol up and running for 2 weeks
  • TVL building steadily with confidence
  • The DaoVault weight is looking strong & distributing further each day

What is a DAO?

Decentralised Autonomous Organisation

DAOs are unlike traditional organisations that have a hierarchical control structure, generally private and inaccessible to a community. Centralised exchanges are an example of this; you might want a token listed on the project’s platform, but besides a Twitter barrage, you have very little influence on that decision coming to fruition.

What is best for SPARTA!?

At this point it is super important to reiterate that the community continues to drive SpartanProtocol for the benefit of the community and if you want to join the DAO it is hoped that you join it with the intent to see it succeed, grow and prosper for the LONG TERM.

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

ONGOING — Continue updating DApp during mainnet (‘functional’ priority)

GitHub Activity — Spartan Contracts v2

  • Liquidity providers supply liquidity to the pools & receive LP tokens (just like normal)
  • There is an option for another form of utility for your LP tokens with a LendVault
  • The liquidity provider has a choice between staking them in the DaoVault or LendVault. Each with its own dynamic yield & utility advantages
  • The LP tokens staked in the LendVault will be added to a lending pool ready to be borrowed out by users
  • They can borrow a safe amount of a base asset (BUSD, BNB etc) and provide SPARTA as collateral
  • The LP tokens held in the LendVault are redeemed for the underlying assets, swapped if required (to the chosen asset) and sent to the borrower
  • When the borrower is ready to close their CDP and get their collateral back, they bring the chosen assets back and send in the full amount & receive their collateral minus the interest
  • There will obviously be liquidation opportunities

contracts/Lend.sol

  1. Created new Lend contract
  2. Setup structure and list of likely functions based on current implementation being worked on

contracts/Reserve.sol

  1. Modified Reserve contract with some proposed POL placeholders

contracts/lendRouter.sol

  1. Created new LendRouter contract
  2. Setup structure and list of likely functions based on current implementation being worked on

contracts/lendVault.sol

  1. Created new LendVault contract
  2. Setup structure and list of likely functions based on current implementation being worked on
  3. Padded out lendLP() & removeLP() with some logic, similar to the DaoVault/mappings

GitHub Activity — Spartan DApp v2

Global Changes

  1. Changed the nav structure & urls/routes
  2. Changed the sitemap accordingly
  3. Updated some text/icon colours for lightMode
  4. Added some more injected translation IDs
  5. Forked the Assets repo to manually add token icons
  6. Changed number inputs to have a min of 0

src/components/AssetSelect/AssetSelect.js

  1. Changed the ‘wallet type’ check to use localStorage (wallet that the user selected) rather than isMetaMask || isTrust
  2. Conditionally show TrustWallet icon if TrustWallet ‘wallet type’ is detected

src/components/Footer/Footer.js

  1. Removed RecentTxns component from the footer (only commented out; needs to be removed)

src/components/Icons/icons.js

  1. Added TxnsHistory & Trsh icons
  2. Updated ArrowDownUp & ArrowLeftRight icons

src/components/Supply/Supply.js

  1. Added ‘loading’ states to all supply items

src/components/Tooltip/tooltip.js

  1. Added 3 new tooltips

src/components/WalletSelect/*.js

  1. Changed the ‘wallet type’ check to use localStorage (wallet that the user selected) rather than isMetaMask || isTrust
  2. Conditionally show TrustWallet icon if TrustWallet ‘wallet type’ is detected

src/components/WalletSelect/Txns.js

  1. Created component for ‘transaction history’
  2. Essentially the same as ‘RecentTxns’ component from the footer but with the formatting updated and is now located in the wallet modal
  3. Updated the pagination behaviour
  4. Changed the ‘ClearTxns’ button to a trash icon and added an alert/confirm when clearing

src/components/WalletSelect/WalletSelect.js

  1. Bumped up the setTimeout() in onWalletConnect() to 35 to make this more reliable
  2. Added a ‘txns’ tab with a ‘history’ style icon for the transactions history content
  3. Added a ‘clear wallet’ button if no wallet is connected to clear the local storage item in case a user has corrupted local storage selection for their lastWallet

src/components/WalletSelect/txnTypes.js

  1. Added a Types file for all transaction types (parsed transactions for the 'Txns History' component)

src/routes.js

  1. Culled all the old lines in the routes file
  2. Changed Vault to Vaults
  3. Moved Bond into the Vaults
  4. Changed Overview to Pools

src/store/pool/actions.js

  1. Fixed the newRate / oldRate logic to handle both directions the same

src/utils/math/nonContract.js

  1. Added swapRate helpers for swapping and zapping

src/utils/web3.js

  1. Added blacklist functionality to force a token icon to be the fallback img if it is broken (reactively)
  2. Pointed getTwTokenLogo() to our forked version of the repo instead of TrustWallet's API & repo

src/views/pages/Pools/PoolItem.js

  1. Added a visual pool ratio safety gauge/scale
  2. Added tooltip placeholder explaining the feature (could do with some rewriting/simplifying)

src/views/pages/Swap/Swap.js

  1. Refactored a lot of conditional logic out of the JSX
  2. Added in spot & swap rate logic
  3. Added in slip calc logic
  4. Added in ‘revenue’ logic inc dividends

src/views/pages/Vaults/BondVault.js

  1. Moved Bond -> BondVault inside the Vaults view

src/views/pages/Vaults/DaoVault.js

  1. Added option to view weights in $USD (click on it to flip back to SPARTA)

src/views/pages/Vaults/Overview.js

  1. Added BondVault

GitHub Activity — Spartan Subgraph

It’s time for work to resume on the positions page. Before that, we need a reliable scoped index of relevant data from the chain. Makes sense to at least initially do this with the help of a subgraph

subgraph.yaml

  1. Flipped the network over to bsc (mainnet)
  2. Updated the poolFactory contract address
  3. Updated the startBlock to the deployment blockstamp
  4. Updated the eventHandlers to match the new events

src/const.ts

  1. Updated relevant contract & token addresses
  2. Updated array of stablecoins

src/mapping.ts

  1. Made init value of SPARTA $0.60 for the first blocks before the BUSD pool takes over for internal pricing

src/mappingPool.ts

  1. Removed the ‘create pool’ logic in handleAddLiquidity() now that the events are emitted in an order that suits the subgraph
  2. Fixed the wrong logic for member.liqNetUSD
  3. Added sync() at the end of the swap event to ensure pool balances are synced for internal subgraph pricing (dividends aren't accounted for via any events so a sync needs to be performed instead)

src/utils.ts

  1. Changed updateSpartaPrice() to only use stablecoin pools with at least 100K SPARTA depth
  2. Changed sync() to only check for baseAmount to account for dividends

Project Information

Official Links

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.

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.

--

--

--

The Spartan Protocol incentivises the formation of capital in liquidity pools, such that they can be used for synthetic token generation, lending, derivatives and more.

Recommended from Medium

Merry Meris Botnet?

FIXED: EU Only Ad Issue

UpCake Success!

Database Security as the Main Priority

Credit Union CTO explains how Cryptyk's Hybrid Blockchain technology changes security paradigm

PIZZA Sale on Dark web —  13TB Internal files & 1Million credit card data being sold

Avarta X fiance.vote

How To Stay Anonymous: Smartphone Edition

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

SpartanProtocol

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

More from Medium

Introducing Event Tracking

Crypto Bonding and Staking Web Application

(JaiChai) More domain extensions available on “Unstoppable Domains”

How To Buy SWD on Polygon via Matcha & MetaMask