SpartanDEV: 27DEC21-02JAN22
Xmas metaverse promotions kick-off, Positions page expanded to include Synths, new DApp analytics tools, guides & much more in today's weekly project update
Summary
Happy New Year Spartans!
Community contributor activity showed no signs of rest throughout the silly season, it is fair to say... Spartans do not sleep.
- SecondLive Christmas metaverse promotion kicked off
- 'Positions' now expanded to support Synths (Subgraph & DApp)
- Pool revenue history data improved (More 'current' APYs in DApp)
- New tooling & guide to learn how to assess pool revenue
- New weekly #LearnToEarn quiz
SecondLive Xmas Metaverse Promotion
With the recent grant to the community wallet supporting promotional/marketing activity, we were presented with an opportunity to join in on a Binance Smart Chain ecosystem promotion that we otherwise would not have had the capital to be a part of. Over the past week, Spartans have been completing tasks to try to get on the exclusive early access whitelist for the gift box lucky draw & metaverse festivities.
Tune in between January 6th and 12th to join Spartan Protocol, SecondLive & many other BSC projects in giving away many gifts & knowledge in true festive fashion!
Synths Position Page
The much-requested upgrade to the position page has now been delivered. Spartans can now check their Synth positions in 4 scopes via the community DApp:
- All Synth positions vs holding $USD
- All Synth positions vs holding $SPARTA
- Individual Synth position vs holding $USD
- Individual Synth position vs holding $SPARTA
The guide in the Docs has not yet been updated to include explanations for 'Synth View'. Spartans are always welcome to join in on updating and enhancing our documentation material!
Historical Revenue Data Changes
Previously we were using mainly on-chain calls to build the dataset used to display 'revenue' & 'dividends' in the DApp & to calculate the APYs. This meant that most data being used was up to 30 days old at any time. This week the subgraph was updated to give us a rolling 30-day tally of revenue & dividends to give us data that is between 3 seconds and 24 hours old all the time.
This means that if there is an increase in a pool's activity & general metrics, it will begin showing in the APY & front-end within 24 hours instead of rolling into the average ~30 days later. This obviously leads to better analytics & more 'current' APY figures in the DApp. For instance, the USDT pool was at ~3% APY before the update and is now around 17% because it is using data from when the pool's TVL bumped up and became a lot more active recently vs still being a relatively inactive pool 20+ days ago.
Become an Analysis Warrior!
Along with the above changes to the historical data, some new features, metrics and tools were added to the DApp to help users scope that data and assess each pool on a more granular level on the 'Liquidity' page.
Following those changes, a community guide was built & published to help understand & navigate these new features to become an analysis warrior!
New #FridayFor300 Quiz
We went for a more 'guess the number' style event to close out the year with a bit of fun. But it's not without its ulterior motive, to lean Spartans towards reading the new 'pool analysis' guide (see above) and using the new tools in the DApp to make an educated guess instead of a wild guess.
Spartan Socials - Twitter
Community Tweet of the Week:
SpartanSocials - Telegram
GitHub Activity - Spartan <> Bram NFTs
Completed, all that remains is distribution! Please be patient and allow the contributors time to work out how these NFTs will be distributed. In the meantime please check out Bram on Twitter and show your support!
To Do:
- Plan & distribute the NFTs
GitHub Activity - Spartan UI Library
No Github activity on this repo for the week.
GitHub Activity - Spartan DApp
Changed Over Fees/Revenue/APY to Subgraph:
- DApp now uses rolling 30day dividend & revenue from the Subgraph instead of on-chain calls (more 'current' & fewer RPC calls)
- Removed all
map30DPoolRevenue
&mapPast30DPoolRevenue
logic / on-chain calls - Pulled in the
fees
data from subgraph instead now insidegetMonthIncentives
- Updated the
calcAPY
function to hand inrecentFees
separately now that it is not in the pool object.
Extended Positions to Include Synths:
- Created a
getMemberSynthPositions
external call to the subgraph to acquire all data the user needs to assess their Synth positions - Created a helper function to get the spot value of an array of synth objects in USD & SPARTA
- Changed structure of the Positions view to have the actual positions logic as a component and added a similar synths component here
- Added a 'Synth View' button to the Positions page to toggle between 'Synths' & 'Liquidity' positions
- Set up, padded out & completed the whole Synths position component (this is now public, live & being tested by the community)
Extended Liquidity Analytics Tooling:
- Added an argument to the
calcAPY
function - adays
arg tocalcAPY
to adjust the calculation based on a selected time period (time-scoped functionality) - Added logic to detect when the asset has been changed to clear the chart before rebuilding the data instead of having a short period showing the previous pool's data
- Added functions to get the accumulative fees & dividends for a pool based on the time period selected by the user (to hand in as
days
to the updatedcalcAPY
function)
Minor UI Fixes:
- Partners page injected fixed heights for the card-headers (make all tiles same size/balanced)
- Fixed some alignment issues in each wallet section's total row
- BondVault fixed secondary (LP) icon positioning
To Do:
GitHub Activity - Spartan Subgraph
Commented-Out Unused Entities
In an attempt to make the subgraph less bloated and faster at syncing after a change, all singular transaction index logic has been commented out. This means that we won't be able to call up a list of every one of a wallet's transactions regardless of the type anymore. That data hasn't been used thus far anyway and isn't critical to positions nor pool assessments (the whole point of the subgraph) so shouldn't be considered a drawback as such.
In doing so, the subgraph now fully syncs 3x faster.
Positives definitely outweigh the negatives!
Added Synth-related Metrics
A push was made to set the subgraph up to be able to pull in any Synth-related data that would be critical to assessing a Synth position.
- Added NET 'forge' tallies by wallet in SPARTA & internally derived $USD values
- Added NET 'melt' tallies by wallet in SPARTA & internally derived $USD values
- Added NET 'synth harvest' tallies by wallet in SPARTA & internally derived $USD values
- Added 'SynthPositions' entity-links to the
Member
entity - Created a
SynthPosition
entity that also tracks the above metrics but by wallet->synth scope instead
Added Rolling 30-Day Revenue Metrics
Revenue & therefore APYs that were shown in the DApp were based on the last full 30 days of complete data (not rolling) from on-chain calls. Which meant when there is a significant uptick in pool activity it would take up to 30 days for it to be reflected in the APY & revenue sections throughout the DApp.
A move was made to become even more reliant on the Subgraph this week in changing over those relevant datasets to be called from the Subgraph instead:
- Added a
fees30Day
metric to theMetricsGlobalDay
entity - Added
fees30Day
calculation logic toupdateDayMetrics
(culm tally) - Added
prevFees
logic to handle establishing the '29 day' base each day to build on top of incheckMetricsDay
General Cleanup/Refactor
- Refactored a bunch of logic to higher levels throughout the codebase
GitHub Activity - Spartan Resources
No Github activity on this repo for the week, however, some graphics & other relevant resources were created, they should be merged in soon.
GitHub Activity - Spartan Site
An initial playground branch was set up for the new landing page using a Gatsby + Contently combination this week.
- Created the new branch
- Selected headless CMS setup (no dedicated CMS, just Gatsby + Custom Contently integration)
- Created basic templated sections with modular SCSS styling structure
- Filled out initial section-info in Contently to pull in and get ready for the next phase
- Filled out all the CTA links + button labels also ready to go
To Do:
GitHub Activity - Spartan Arena Contracts
Chance Contract Changes
- Changed
setStakeTime
arg touint
- Padded out the
rollDice
function
Staking Contract Changes
- Imported in
SafeERC20
depository instead of forking it in locally - Added in setter in
initChanceContract
Tests Setup
- Set up some initial tests
GitHub Activity - Spartan API
No Github activity on this repo for the week.
To Do:
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.
- Twitter: https://twitter.com/spartanprotocol
- Telegram Community: https://t.me/spartanprotocolorg
- Telegram Announcements: https://t.me/spartanprotocolann
- Discord Academy: https://discord.gg/wQggvntnGk