What to do when under Peg?

MATT 0X
5 min readMar 28, 2022

There comes a time in every tomb fork when the peg token ($CODE7), may fall beneath the price of the coin to which it is algorithmically stabilized.

Today we’re going to go over what to do when this occurs, and how a community can work together to bring the protocol back “over peg”.

What does it mean to be under peg?

If you are investing in tomb forks, more formally known as an algorithmic stablecoin protocol, you are going to want to know what each of the 3 tokens does, and how they work together.

I am going to save us some time and assume that we all know about the 3 tokens.

Now in our case today we are going to focus on our peg token, $CODE7.

When a protocol is under peg, the protocol goes into debt, and the boardroom stops printing. In simple terms, whatever of the share token ($7SHARE) you have in the board room, it’s not earning rewards.

Until the price of $CODE7 is above the price of $FTM, and TWAP is below 1.01, there will be no $CODE7 minted from your $7SHAREs.

What is the debt phase in a tomb fork?

The debt phase happens during the expansionary epochs that start after there are still $7BONDs to be redeemed, this is considered a contraction period.

The expansionary epoch is the amount of $CODE7 that is printed by the share token, $7SHARE in order to increase the total circulating supply. (For more on expansionary epochs click here)

65% of the expansion during the debt phase is allocated to the Treasury Fund, in preparation for the $7BOND that will be redeemed.

This amount is still reserved whether $7BOND holders are redeeming bonds or not.

Once the $CODE7 in the treasury is sufficiently full, to even out with all circulating bonds that were needed to be redeemed, expansion rates will resume to normal.

What is TWAP?

TWAP (Time-Weighted Average Price)

By definition: An algorithmic trade execution strategy that aims to achieve an average execution price close to the time-weighted average price of 24 hours.

In the case of Code 7, and Tomb Forks, the TWAP calculates the ratio above Peg, with peg being algorithmically stabilized with a 1:1 ratio to FTM.

  • 7BOND (bond tokens) are available for purchase when CODE7 falls below the 1 FTM peg. If CODE7’s TWAP is between 1.00 and 1.01, neither 7BOND nor Code7 will be issued. [e.g. if CODE7’s TWAP < 1, exchange CODE7 for 7BOND will be in a 1:1 ratio.]
  • 7BOND (bond tokens) are available for redemption when CODE7 goes above the 1 FTM peg.
  • To encourage the redemption of 7BOND for CODE7 when CODE7 TWAP > 1.1 and incentivize users to redeem at a higher price, 7BOND redemption will be more profitable with a higher CODE7 TWAP value, of which 7BOND to CODE7 ratio will be 1:R, where R can be calculated in the formula as shown below: R=1+[(CODE7(twapprice)−1)∗coeff)]

In simple terms; your TWAP is a calculated average taken from the prices of $CODE7 compared to $FTM in a 24hr period.

Now for the juicy part…

How to get back above peg?

  1. DON’T SELL YOUR CODE7 REWARDS! Obviously…

For the convenience of everyone invested in the protocol, it is best to keep your beg at least at 1.5 above peg. Not 1.05, not 1.1, but 1.5.

The first thing to make sure of is to NOT sell your $CODE7. Luckily here we do have a Single-Sided-Staking pool. This allows you to re-stake all of your Code 7, compounding on your investment, and keeping the buying pressure on $CODE7.

2. ONLY SELL $CODE7 REWARDS IF THE PEG IS OVER 1.5 TWAP

I want to clear one thing up here, it is totally 100% acceptable and OKAY to TAKE PROFIT. We encourage taking a 10% profit every chance you can. But, we must keep in mind when is the best time to do that.

DO NOT take profit when we are below 1.5 TWAP. DO NOT sell your $CODE7 if we are below 1.5 TWAP. Continue to re-stake. You will come out stronger on the other side, and you will thank us for insisting on this practice.

3. BUY $CODE7 IF THE PEG IS UNDER 1.5 TWAP

If you have any extra powder left in the bag…if you've been taking profits in small increments and saving up in FTM on the side…if you just happened to get paid yesterday and you've spent all that's needed, use your leftover cash to help us get back over peg!

Just kidding, use only whatever extra cash you have left and never use any money you're not willing to lose.

But seriously, when we go below peg, the best you can do is just buy fresh $CODE7.

4. SELL $7SHARES REWARDS IF 7SHARES PRICE IS 120–150x HIGHER THAN $CODE7.

A general rule should be; anytime when under peg, sell all SHARE rewards for the peg token. The real ones know that the best way to compound is to sell your $7SHARES rewards for $CODE7 when we are working to get above peg.

Take your rewards, swap $7SHARE to $CODE7, add to the single stake pool, or form a CODE7-FTM LP.

Afterward, once back to a healthy state, we can continue to loop our shares into the boardroom and those rewards into the $CODE7-FTM LP.

5. BREAK CODE7-FTM LP, SWAP REMAINING FTM FOR CODE 7, SSS

If you have your bags split between both liquidity pools. You can start by breaking your CODE7-FTM LP and swapping the 50% $FTM, making your bag a 100% CODE7.

Then add this $CODE7 to the Single-Sided-Staking pool.

6. BREAK 7SHARES-FTM LP & SLOWLY PHASE OVER TO CODE7 SSS

Conversely, with the 7SHARES-FTM LP you can withdraw your LP from the site and break the LP in SpookySwap. Next, swap your $FTM for $CODE7, and slowly phase shift your $7SHARE value into $CODE7.

7. STAKE IN YIELDWOLF

The YieldWolf auto-compounder is a great asset for the investor who is looking to just let his money sit and grow without touching it.

In this case, we can use this auto-compounder to apply buy pressure on $CODE7.

We can follow steps 5 or 6, but instead of staking in the single-sided pool, you can create an LP with CODE7-FTM and add it to YieldWolf!

I hope this helps us all understand a little more how the “peg” works, and how to react when it is needed. As Code7 wants the best for every supporter and investor, we are working tirelessly to create the proper content to help educate the community so we can all be making PROactive choices and not REactive choices.

--

--

MATT 0X

Cruising down the west coast of portuGAL in a 1965 Volkswagen T1 Van, slow-life cruiser writing about fast moving cryptocurrency and the journey from my side.