BUIDL-Weekly: 19JUN23 - 25JUN23

Dev Update

BUIDL-Weekly: 19JUN23 - 25JUN23

Welcome to another weekly wrap-up, Spartans! Thanks to all the community contributors and friends who helped Buidl, promote and support during the week! Read on for the update

BUIDL-Weekly: 19JUN23 - 25JUN23

Community Mentions

CoinMarketLeague

Remember to cast your vote for SPARTA every day, Spartans!


‌SpartAnalytics Report

Our community creates a monthly PDF report that includes an overview of Spartan Protocol data from Google Search (impressions, clicks, devices, keywords, and geographical data) and Twitter analytics.


‌Community DApp‌

‌GitHub Repo: https://github.com/spartan-protocol/SpartanProtocol-DAppV2

Front-end: https://dapp.spartanprotocol.org/

binance wallet integration

  • fixed the binance wallet integration
  • not heavily tested for edge cases, just for expected functionality

‌Protocol Site

GitHub Repo: https://github.com/spartan-protocol/spartan-site

Front-end: https://spartanprotocol.org/

‌Protocol API

GitHub Repo: https://github.com/spartan-protocol/spartan-api

Front-end: https://api.spartanprotocol.org/api/v1/pools

‌Protocol Subgraph

GitHub Repo: https://github.com/spartan-protocol/spartan-subgraph

Front-end: https://thegraph.com/hosted-service/subgraph/spartan-protocol/pool-factory

‌Protocol Contracts V3

GitHub Repo: https://github.com/spartan-protocol/spartan-contracts

more cleanup + start testing structure

  • moved old/backup Pool contract outside the default contracts folder
  • added more discussion points/notes throughout the contracts
  • commented out the Pool's  ERC20Burnable & ERC20Permit for further discussion. Added some context around contract size/gas to help with these decisions
  • added Math.sol to the Pool contract (we should rename this contract as it conflicts with commonly used libraries)
  • Made error strings/revert messages much more compact throughout
  • Pool math converted to solidity native using its inbuilt/included safeMath instead (need someone to check this please!). Then removed the manual SafeMath lib
  • PoolFactory.createPool() fixed the mapping setter that was using the dangling/empty poolAddr return instead of newPoolAddr (fixed the return and did some gas optimization at the same time)
  • added contractSizer to the deps and set it up so we can check for wild roaming spurious dragons later
  • Completed the initial reusable deploy fixture along with setting up impersonators and retrieving mock mainnet balances to allow us to test with real mainnet deployed tokens & state
  • Completed the PoolFactory.createPool() checks tests
  • Started the PoolFactory.createPool() balances tests

ext testing + small fixes

  • added note about whether we need to make the getPool mapping internal and create an interfaced getPool() getting instead to translate address(0) into wrapped
  • fixed grabbing wrapped.symbol() instead of address0.symbol() in PoolFactory
  • added some global set variables in the tests for the convenience of anyone testing being able to plug in a different chain's token addresses (or just different ones on same chain) without having to search-replace
  • created a daisy-chained createPoolsFixture() to shortcut deploying one or two pools successfully during testing (save time when writing similar tests)
  • converted existing tests to use the new global vars && createPoolsFixture
  • extended tests to include deploying a native pool alongside the previous stablecoin pool (test native<>wrapped logic)
  • added btcb address (to pair with native coin)

refactor createPool address check

  • refactored the token addr checks in createPool() to be a little more readable and to reduce the two require() checks down to a single require()
  • gas is almost exactly the same but room to reduce it this way as we can probably remove the cached var with a little more time thinking about it. either way, readability is more important than gas in this rarely-called function
  • updated the tests accordingly

‌Protocol Resources

GitHub Repo: https://github.com/spartan-protocol/resources

‌Protocol Docs

‌GitHub Repo: https://github.com/spartan-protocol/spartan-docs

Frontend: https://docs.spartanprotocol.org/

‌Protocol Contracts V1 - V2

GitHub Repo: https://github.com/spartan-protocol/spartanswap-contracts


‌Ecosystem Project: SpartanSwap‌

SpartanSwap is a separate project currently in development with the goal of creating a user-friendly interface for interacting with Spartan Protocol pools. Initially, the focus will be on providing swap functionality, with the long-term aim of becoming a swap aggregator for BNB SmartChain and potentially other chains in the future

SpartanSwap Contracts

GitHub Repo: https://github.com/Spartan-Swap/SpartanSwapContracts

SpartanSwap DApp

GitHub Repo: https://github.com/Spartan-Swap/SpartanSwapDApp

SpartanSwap Resources

GitHub Repo: https://github.com/Spartan-Swap/SpartanSwapResources


‌Ecosystem Project: SpartanArena‌

SpartanArena is a separate project that focuses on developing subprojects related to gaming. Some ideas that are being considered for the future include an NFT looter game, a lottery, and a prediction/parimutuel game

SpartanArena Contracts

GitHub Repo: https://github.com/SpartanArena/SpartanArenaContracts

SpartanArena DApp

GitHub Repo: https://github.com/SpartanArena/SpartanArenaDApp

SpartanArena Resources

GitHub Repo: https://github.com/SpartanArena/SpartanArenaResources


‌Ecosystem Project: SpartanToolkit

Spartan Toolkit is an ecosystem project initiated by the Spartan Protocol community with the goal of improving tools for projects and users within the BNBChain ecosystem, including Beacon, Smart, and BAS chains

BepTools Fork

GitHub Repo: https://github.com/Spartan-Toolkit/beptools

Legacy BepTools Repo: https://gitlab.com/canyacoin/binancechain/beptools (will request a PR and/or mirror to GitHub)

Temp Frontend: https://beptools.netlify.app/

The contributors of Spartan Toolkit have forked and updated/fixed the wallet connections in the BepTools DApp to enable BinanceChain/BeaconChain/BEP2 users to freeze/unfreeze and batch send BEP2 tokens on the BNB Beacon Chain

Web3BNB Library

GitHub Repo: https://github.com/Spartan-Toolkit/web3-bnb

A React library with the intention of providing builders with a plug-and-play solution for any web3 wallet compatible with BNB ecosystem chains (Beacon, Smart, BAS etc)

BNB Beacon Chain Toolkit DApp

GitHub Repo: https://github.com/Spartan-Toolkit/beacon-chain-tools-dapp

A tooling user interface for users + projects on BNB Beacon Chain. Batch-send, freeze/unfreeze, deploy BEP2 token etc without touching the command line!

BNB Smart Chain Toolkit DApp

GitHub Repo: https://github.com/Spartan-Toolkit/beacon-chain-tools-dapp

Tooling and informational user interface for users + projects on BNB Smart Chain‌


Protocol Information

Project Community

Spartan Protocol and its related ecosystem is a 100% open-source community initiative. As an open organization, the community is responsible for building, running, and maintaining everything. If you are interested in contributing or learning more, please reach out in the community channels!