SpartanDev: 11OCT - 17OCT21
Spartan Protocol's 2nd week of mainnet V2 is now wrapped up. The DAO is prepared for its next phase to begin, get ready for proposals.
TLDR: DAO proposals go live tomorrow, Tuesday the 19th. The contributors will begin the process of testing and enabling around 2.00 AM (GMT)
Community is a core mantra of Spartan Protocol & its shield wall, in line with this ethos and now that the following has been achieved, we can open up the DAO and begin making protocol-changing proposals in a more distributed manner!
- 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.
DAOs place the community participants in control of the platform transparently and programmatically. The power of contracts enforced by mathematics means that a large number of automated actions within a contract can be set up and voted on, the results of which will be automatically actioned.
This would mean when applied to the above example; the community would be able to propose and vote on which tokens they want to be listed for 'Bond' for instance. On a successful vote, these tokens would be automatically listed. Resistant to external entities, governments and bad actors getting in the way of that decision.
The community is already familiar with the Spartan Protocol ethos being; ‘birthed by the community, for the community’ with the initial community building the platform the way they wanted to see it within the Binance Smart Chain ecosystem. Chosen for its power, speed and low fees.
Having Spartan Protocol run by a DAO was a central pillar of its development.
If you want to read a little more into DAO’s check out the Binance Academy article below.
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.
A focus on proposals that will benefit the platform in the long run, means focusing on things that help it grow, develop and improve reach before focusing on individual benefit. Community value will drive results in individual benefit, it most likely won't work the other way around.
To learn more about the Spartan Protocol take on a Decentralised Autonomous Organisation head over to the SpartanProtocol.org page
Or check out this article for our OG DAO implementation in V1
YES, proposals do include the old fan favourite - 'Bond' - its time......
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)
COMPLETE ✅ - Enable the Vault incentives
TOMORROW - Enable the DAO proposals
DAO to manage the Bond program (list assets & release allocations)
IN PROGRESS - Work with aggregators to connect the SPARTA pools
IN PROGRESS - 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
Lending work has restarted with some fresh new ideas that have come about since the V2 refresh began. The current implementation leans towards utilizing our pools & liquidity providers instead of creating a more traditional 'separate pool' market. This brings some POL opportunities & significant potential revenue opportunities for our existing pools/liquidity providers which will also drive more TVL & help harden the goal to provide self-sustaining incentivised liquidity.
As a general explainer, what we might see is something like this:
- 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
orLendVault.
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
This implementation provides a lot of potential opportunities for the liquidity providers & therefore the whole ecosystem. It does however make it hard to provide any form of 'single staking' via the Lending contract like some of the previous implementations.
Whilst single-staking would be nice & will continue to be attempted to plug in somewhere in a sustainable protocol-benefitting way, it will not be the #1 priority when designing this lending system.
If single-staking works somewhere in the system, it will be plugged in. If it doesn't or the Lending model requires major nerfing to make it work, it will be pushed to be attempted in another feature instead.
Branch: LendingV1
contracts/Lend.sol
- Created new
Lend
contract - Setup structure and list of likely functions based on current implementation being worked on
contracts/Reserve.sol
- Modified
Reserve
contract with some proposed POL placeholders
contracts/lendRouter.sol
- Created new
LendRouter
contract - Setup structure and list of likely functions based on current implementation being worked on
contracts/lendVault.sol
- Created new
LendVault
contract - Setup structure and list of likely functions based on current implementation being worked on
- Padded out
lendLP()
&removeLP()
with some logic, similar to the DaoVault/mappings
GitHub Activity — Spartan DApp v2
Global Changes
- Changed the nav structure & urls/routes
- Changed the sitemap accordingly
- Updated some text/icon colours for lightMode
- Added some more injected translation IDs
- Forked the Assets repo to manually add token icons
- Changed number inputs to have a min of
0
src/components/AssetSelect/AssetSelect.js
- Changed the 'wallet type' check to use localStorage (wallet that the user selected) rather than
isMetaMask || isTrust
- Conditionally show TrustWallet icon if TrustWallet 'wallet type' is detected
src/components/Footer/Footer.js
- Removed RecentTxns component from the footer (only commented out; needs to be removed)
src/components/Icons/icons.js
- Added
TxnsHistory
&Trsh
icons - Updated
ArrowDownUp
&ArrowLeftRight
icons
src/components/Supply/Supply.js
- Added 'loading' states to all supply items
src/components/Tooltip/tooltip.js
- Added 3 new tooltips
src/components/WalletSelect/*.js
- Changed the 'wallet type' check to use localStorage (wallet that the user selected) rather than
isMetaMask || isTrust
- Conditionally show TrustWallet icon if TrustWallet 'wallet type' is detected
src/components/WalletSelect/Txns.js
- Created component for 'transaction history'
- Essentially the same as 'RecentTxns' component from the footer but with the formatting updated and is now located in the wallet modal
- Updated the pagination behaviour
- Changed the 'ClearTxns' button to a trash icon and added an alert/confirm when clearing
src/components/WalletSelect/WalletSelect.js
- Bumped up the
setTimeout()
inonWalletConnect()
to 35 to make this more reliable - Added a 'txns' tab with a 'history' style icon for the transactions history content
- 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
- Added a
Types
file for all transaction types (parsed transactions for the 'Txns History' component)
src/routes.js
- Culled all the old lines in the routes file
- Changed
Vault
toVaults
- Moved
Bond
into theVaults
- Changed
Overview
toPools
src/store/pool/actions.js
- Fixed the
newRate
/oldRate
logic to handle both directions the same
src/utils/math/nonContract.js
- Added
swapRate
helpers for swapping and zapping
src/utils/web3.js
- Added blacklist functionality to force a token icon to be the fallback img if it is broken (reactively)
- Pointed
getTwTokenLogo()
to our forked version of the repo instead of TrustWallet's API & repo
src/views/pages/Pools/PoolItem.js
- Added a visual pool ratio safety gauge/scale
- Added tooltip placeholder explaining the feature (could do with some rewriting/simplifying)
src/views/pages/Swap/Swap.js
- Refactored a lot of conditional logic out of the JSX
- Added in spot & swap rate logic
- Added in slip calc logic
- Added in 'revenue' logic inc dividends
src/views/pages/Vaults/BondVault.js
- Moved
Bond
->BondVault
inside theVaults
view
src/views/pages/Vaults/DaoVault.js
- Added option to view weights in $USD (click on it to flip back to SPARTA)
src/views/pages/Vaults/Overview.js
- 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
- Flipped the
network
over tobsc
(mainnet) - Updated the
poolFactory
contract address - Updated the
startBlock
to the deployment blockstamp - Updated the
eventHandlers
to match the new events
src/const.ts
- Updated relevant contract & token addresses
- Updated array of stablecoins
src/mapping.ts
- Made init value of SPARTA $0.60 for the first blocks before the BUSD pool takes over for internal pricing
src/mappingPool.ts
- Removed the 'create pool' logic in
handleAddLiquidity()
now that the events are emitted in an order that suits the subgraph - Fixed the wrong logic for
member.liqNetUSD
- 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
- Changed
updateSpartaPrice()
to only use stablecoin pools with at least 100K SPARTA depth - Changed
sync()
to only check for baseAmount to account for dividends
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.
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.
- Medium: https://medium.com/spartanprotocol
- Twitter: https://twitter.com/spartanprotocol
- Telegram Community: https://t.me/spartanprotocolorg
- Telegram Announcements: https://t.me/spartanprotocolann
- Discord Academy: https://discord.gg/wQggvntnGk