Strips Finance

Nov 5, 2021

6 min read

AMM Deep Dive 3/3: Technical Heavy Lifting

Staking Profit Composition & Distribution

takers: all the AMM stakers will share the following benefits and risks proportionally to their staking amount, as percentage % of total staking liquidity.

  • 75% trading fees, denominated in USDC
  • 95% Realized profits and 100% Realized loss from closed and liquidated positions, denominated in USDC
  • 100% Unrealized PnL from traders’ open positions, denominated in USDC
  • 100% withdrawal fee, denominated in STRP-USDC LP tokens

nsurance Staking Profits and Risks

  • 5% trading fee, denominated in USDC
  • 5% realized profits from closed and liquidated positions, denominated in USDC, and need to share 0.2% to liquidator.
  • 100% liquidation fee from liquidated positions, denominated in USDC
  • 100% withdrawal fee, denominated in STRP-USDC LP token
Summary: Revenue Structure of Strips Liquidity Providers

Fair Distribution

  • Stakers should only receive the benefits and bear the risks that occurred during the period of time of staking.
  • During the time of staking, each staker will share the benefits proportionally to his/her share percentage of total staking liquidity.
  • Over the period of staking, because each staker’s share percentage will change due to other people’s staking activities, we will accumulate the change of profits every time when there are staking or unstaking events. Each staker will accumulate their staking profits as a product of profit growth multiplied with staking share%. Below is the example of matrix implementation:

hy should we use PnL Growth Accumulation instead of Pricing Method?

  • From example above, staker B with 2000 LP tokens staked should share the increment 1000 LP profits with staker A with 1000 LP token staked: at ratio of 66.66% : 33.33% instead of 50% : 50%. This is because staker B’s staked LP tokens are as twice as of staker A’s. However, using pricing method as many other protocols do, it will lead to lower staking profit for the late staker B, as we only minted less SLP tokens (which means lower staking share%) for staker B with SLP price at $2.
  • Put into more extreme example, if we have 3 stakers, and each of them staked 1000 LP tokens with total supply of 3000 LP tokens, and after that, market received 1 million LP tokens profit. Based on PnL Growth Accumulation method, to acquire 25% of the staking pool, you would need to stake another 1000 LP tokens at current prevailing LP token price, and you will be eligible to start receiving 25% of future profits. However, if we use pricing method, then to acquire same 25% of the pool, you will need to stake more than 300,000 LP tokens. This is because:

which means you will need to stake LP Amount = 334 ∗ 1000 = 334, 000 LP tokens in order to share only 25% of the future profit of the liquidity pool.

  • The reason why many protocol’s APY falls so quickly for liquidity providers is because pricing method unfavors the late stakers. Pricing method penalizes late stakers twice: first they have to spend more USDC to be LP staker. Second,early stakers’ profits are counted as their staking share% at the price when the early stakers staked. Late staker not only need to pay higher price to obtain same amount of LP tokens, but also have to buy much larger amount of LP tokens to catch up with early stakers’ shares accumulated from their staking profit at historical price.
  • Strips shall treat any LP token staked in the past the same way as any LP token just staked, in terms of receiving future profits as liquidity provider. Strips’s mission is to resolve all these technical hurdles to innovate a more fair and long-lasting mechanism for DeFi.

Withdrawal fee is charged when stakers choose to unstake when staking time is less than 7 days with linear decay. The withdrawal fee income will be shared with all remaining stakers proportionally, and hence the longer a staker providing liquidity, the more free LP tokens will collect as part of staking profit.

Unrealized PnL of AMM

We also include Unrealized PnL as part of staking profits, because when stakers unstake, they can share any gains from trading revenue and Realized PnL accrued during the staking time period. If Unrealized PnL of AMM is not included into AMM’s Revenue, then a trader with a bleeding position will try to borrow a fortune and try to be 99% of the staking amount, and then if the trader closes down the position, the loss will be realized. However, he will also receive 99% of the Realized profit from this closed position and then unstake. By doing so, trader with losing position will be able to hedge off his loss by being the counterparty, aka the AMM. We found this problem with some other derivatives protocols.

Based on the example above, in order to make loss-saving non-material, AMM has to set the withdrawal fee above 5% which might resist growth of staking liquidity. In addition, such threshold is only applicable to assumptions of trader’s loss and AMM’s staking liquidity, and hence it is not a universally optimal threshold for all markets. Furthermore, we believe it is not fair to apply penalty on all stakers to average out the negative externalities from a single user. As a result, we decide to include not only the PnL crystallised and paid during staking period for each staker, but also the PnL accrued but yet paid during the same period. Below is the example, how Unrealized PnL change together with Realized PnL change will capture this concept:

From the example above, staker A will not be able to share any of the realized PnL from his own losing position as this loss is accrued before staker A staked, even staker A is 90% of the staking liquidity.

  • From time 1 to time 2, staker A should receive 90% × (100 − 0) + 90% × ( −80 − 20) = 0.

On the other hand, trader B’s unrealized profit decreased by $10 from $80 to $70, and hence staker A should be able to share the reduction when Unrealized PnL is crystallised to Realized PnL.

  • From time 2 to time 3, staker A should receive 90% × (30 − 100) + 90% × (0+80) = 9.


Any past performance, projection, forecast or simulation of results is not necessarily indicative of the future or likely performance of any investment.
The information and publications are not intended to be and do not constitute financial advice, investment advice, trading advice or any other advice or recommendation of any sort offered or endorsed by Strips Finance.