SpartanProtocol
Published in

SpartanProtocol

SpartanContracts — Router V2 Dividends

Breaking down the concept of ‘Dividends’ in RouterV2

Router V2 Dividends

RouterV2 has been enabled on MainNet for public testing. As touched on in the November wrap-up article, Router V2 proposed to shift the incentive from being paid out to LP token-lockers in the DAO (earn) to directly injecting them into the pools via the ROUTER. These direct pool injections we will refer to as ‘dividends’ for now.

Dividends will reward the liquidity providers at the base level, instead of driving users to lock LP tokens up in search of yield. Liquidity providers will no longer have to regularly ‘harvest’ their SPARTA, they simply add liquidity and upon removal of liquidity later down the track, their rewards will be baked in.

Benefits

Offset Impermanent Loss

‘Impermanent loss’ is a term that has a not-so-accurate name. It refers to a reduced return when comparing the value of your liquidity assets to simply holding the tokens over that time period instead. Please start with this article to gain some comprehension of this; it is very important all AMM users have some level of understanding of what most refer to as ‘impermanent loss’.

The SPARTA dividends being injected into the pools will help offset some concerns that liquidity providers might have about impermanent loss, especially if they are expecting large price appreciation specifically in SPARTA (as SPARTA is being added one-sided via the dividends).

Increase Swap-Demand

Over time with SPARTA being added one-sided to the pools via the dividend, the ratio between SPARTA and the other token in the pools becomes unbalanced vs market price and creates an arbitrage opportunity.

This should create more demand for swapping in the pools and therefore more fees going into the pools for liquidity providers… and more dividends being directed at the pool… and more arb opportunities leading to more swapping, leading to more fees, leading to more dividends… and so on.

There are obviously limits to this and dilution will occur especially in the early stages before the ROUTER reserve is filled up, but the point here is; it will help direct the emissions towards better incentivizing liquidity providers for adding liquidity to the SpartanPools.

SPARTA-driven ratio imbalance creating arbitrage opportunities

Provide Greater Benefit for Bonders

Previous to RouterV2, any users interested in taking part in the new ‘Bond’ program who already had LP tokens had a decision to weigh up. Do they unlock their tokens from the DAO, giving up their harvest rewards in exchange for significant SPARTA gains over 12 months? Or do they continue to stake and reap the harvest rewards instead?

As described above, RouterV2 shifts these rewards to the pools directly without the need to ‘stake’ to acquire them. This means that the Bonders begin reaping the benefits of emissions rewards from the moment they Bond+Mint SPARTA into the pools.

Free Up Utility of LP Tokens

The LP token holders must be empowered to freely use them for their utility in the future features coming to Spartan Protocol, whether that is voting in the DAO for proposals, or locking in a contract to collateralise a loan/mint synthetics.

How Dividends are Calculated

Emissions to RouterV2 Contract

  • BASE emissions continue as usual but now go to the ROUTER contract instead of the DAO
  • The ROUTER’s SPARTA reserve builds up over time

Step #1: Let’s say 100,000 SPARTA is the Router’s reserves (RESERVES)

Calculate Daily Allocation from RouterV2 Reserves

The amount of SPARTA allocated each day for dividends is based on an expected 100 swaps per day

  • Daily Allocation = RESERVES / DAYS / MAXTRADES
  • RESERVES are dynamic (SPARTA reserves remaining in the ROUTER contract)
  • DAYS are set at 30
  • MAXTRADES is set at 100 but can be changed by DAO/deployer and will be fine-tuned throughout MainNet testing

Step #2: 100,000 / 30 / 100 = 33.3 SPARTA (ALLOCATION)

Calculate Swap Fee

  • When a ‘swap’ is performed, there is a swap fee that is awarded directly to the pools total balance as shown in the example below:
Swap fee going directly to the pool’s balances = 5.256 SPARTA

Step #3: Swap fee = 5.256 SPARTA (FEES)

Calculate Average Swap Fees

  • ARRAYFEES / ARRAYFEESIZE
  • ARRAYFEES is an array/group of the last ARRAYFEESIZE occurring FEES (previous step)
  • ARRAYFEESIZE is set at 20 but can be changed by DAO/deployer and will be fine-tuned throughout MainNet testing

Step #4: Let’s assume the last 20 txns resulted in an average of 5 SPARTA (AVGFEE)

Calculate Dividend from RouterV2 Contract to Pool

The dividend will be calculated and sent with the first 100 transactions of the day (again; this will be adjustable by the DAO) based on the fee and the other variables calculated above

  • FEE * ALLOCATION / (FEE + AVGFEE)
  • FEE = Swap fee (Step #3)
  • ALLOCATION = Daily allocation (Step #2)
  • AVGFEE = The average fee value from the last 20 swaps (Step #4)

Step #5: 5.256 * 33.3 / (5.256 + 5)

Step #6: 175.0248 / 10.256

Step #7: Dividend of 17.0656 SPARTA

DAO Management

Change Fee Array Size

  • The DAO will be able to adjust the size of the ‘arrayFeeSize’ (currently 20) which is used to calculate the average fee
  • If the majority feels that the avgFee isn’t taking account of the right scope for a good average this may come in handy

Change Max Trades Size

  • The ‘maxTrades’, currently set at 100, should roughly represent the average amount of expected legitimate swaps per day
  • This can be adjusted up or down by the DAO to allow the dividend to be split up over greater or fewer trades throughout the era

Change Era Length

  • The ‘eraLength’, currently set at 30, can be raised to deplete the reserves at a faster rate, or lowered to a more conservative incentives approach
  • 1 ‘era’ is set to be equal to about ~1 day
  • 30 is the same rate that the reserves get filled at, so keeping this variable at 30 is the common-sense approach if all else stays equal with emissions

Road Map

SpartanContracts

  • DAO V2
  • Utils V2
  • Router V3
  • Pool V2
  • SynthRouter V1
  • Synth V1

Community Contribution

SpartanProtocol at is at its core a community project. In this vein, the more contributors the better. There is a great opportunity for community members to contribute in all facets of the project from development to community guides/tools.

If you have an idea, share it in the community channels.

Engage with the community and developers

Where to find out about all the latest updates or suggest improvements — get involved.

--

--

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