Gyrosoft All-Weather Simulator Level 2: Gyrobatics

Ariah Klages-Mundt
gyroscope-protocol
Published in
6 min readApr 29, 2021

We’ve released Level 2 of the Gyrosoft All-Weather Simulator, April 30.

In Level 2, Gyro users will perform arbitrage trades with the goal to make enough Gyro Dollars to buy their Gyronaut Corps membership NFT. To do this, Gyro users will navigate the arbitrage markets that maintain the secondary market liquidity and price peg. They will perform arbitrage loops between these markets and use their earnings in the first economic usage of Gyro Dollars.

How to play Level 2

If you’re just starting the game, start with Level 1, described here. For a full beginner tutorial (what is Metamask?), first check out our walk-through here to set up Metamask and then start with level 1.

Step 0: How to get test-tokens

If you have some leftover test-tokens from level 1, you don’t need to worry about this step. If you don’t have any leftover, you can return to our faucets to receive some more. We’ve revamped our Twitter faucet to distribute both Kovan ETH and our other test tokens (USDC, Dai, sUSD, BUSD, WETH). To use this faucet, tweet like this, inserting your own ETH address (you can also try our secondary faucet on Discord: join our Discord and post your address in the #testnet-faucet channel).

The next several steps are the aerobatics portion of the level. In this part, you will perform arbitrage loops when the S-AMM (secondary market) is out of sync with the P-AMM (primary market).

Step 1: Swap USDC→GYD when the S-AMM price is low

The first stage of today’s arbitrage loop is to monitor the Gyro Dollar (GYD) Price on the S-AMM in terms of USDC (the GYD/USDC price). You can check the GYD/USDC swap rate on Balancer’s exchange (Update 1: the Balancer v1 UI may be down, in which case you should use the new v2 UI here instead. Update 2: the Balancer UI is sometimes buggy on Kovan; if you run into trouble swapping, try this workaround). You will need to manually import the tokens:

  1. Click on the input token menu, paste the USDC address 0x17D484e98402321551d39CF4A0050B18a343780F, and select USDC
  2. Click on the output token menu, paste the GYD address 0xd0474aEBA181987A81352842d446Fc6c65481417, and select GYD

When the GYD/USDC price falls below $1 (or more generally, the redemption rate offered in the P-AMM), the arbitrage loop is profitable. Note that if the rate is 1 USDC = 1.08 GYD, then this means the GYD/USDC price is <1. To begin the loop, buy GYD using USDC by swapping in the S-AMM pool using the same Balancer interface (you will be prompted to unlock USDC and, after that transaction confirms, then confirm the swap transaction) — don’t forget to do both! If done correctly, for every 1 USDC that you swap, you should end up with >1 GYD.

Step 2: Complete the arbitrage loop by redeeming GYD for USDC

To complete the arbitrage loop, you will need to redeem your GYD from the previous step for USDC in the P-AMM. You can do this in the Gyroscope App using the “Redeem” menu (you will need to redeem for USDC in the output basket). If done correctly, you should end up with more USDC than you started with at the beginning of the loop.

Note that the USDC input to your first transaction must be lower than the USDC output of the second to pass the verification step next.

To recap what we learned in the last level, the S-AMM (secondary market) is intended to handle most of the trading volume for Gyro Dollars, with the P-AMM (primary market) filling the liquidity gap when the Gyro Dollar supply needs to expand or contract. The P-AMM offers mint and redeem quotes around the peg, with the S-AMM concentrating liquidity primarily within this pricing band (this is a feature in our next implementation under development — similar to liquidity concentration in Uniswap v3).

Because the P-AMM quotes change as the health of the system changes, the pricing band in the S-AMM will still extend a portion beyond the current P-AMM quotes to account for how the P-AMM quotes could shift. The arbitrage loops you’ve performed in this level keep the S-AMM balanced with the P-AMM within the mint and redeem quote bands and, in a healthy system, near the Gyro Dollar peg.

Step 2.5: Verify your arbitrage loop

To proceed in the game, you will need to verify your arbitrage loop with our system. To do this, you will need to submit your transaction hashes from Steps 1 and 2. You can find these in your Metamask activity list (see the screenshot below):

  • The Step 1 transaction is the “Multihop Batch Swap” on balancer.exchange
  • The Step 2 transaction is the “Contract Interaction” on test.gyro.finance

To copy each transaction hash, click on the relevant transaction and then copy the “Transaction ID” (see the screenshot below).

Then, on the Gyroscope game page, you can click the “Verify Arbitrage” button, fill in the two transaction hashes, and submit. You will need to confirm a transaction in Metamask, which may not show a prompt if you already have a Metamask window open, and wait for the arbitrage to be verified (~1–2 minutes).

Step 3: Continue the arbitrage loops until you have enough GYD to buy your Gyronaut Corps NFT

You can continue performing arbitrage loops at times when the P-AMM and S-AMM are out of sync to compound your token balances. Continue your Gyrobatics until you have enough GYD (mid-loop before redeeming for USDC) to buy your own Gyronaut Corps membership NFT. You can find the current price of this NFT on the Gyroscope game page. Note that this NFT purchase price will increase over time with popularity, so get in early!

Step 4: Use your GYD stash to buy your Gyronaut Corps NFT from the Gyro Store

When you have earned enough GYD, go to the Gyroscope game page and buy your own Gyronaut Corps membership NFT. You will first have to click “approve Gyro Dollars” and wait for the approval transaction to confirm, and then click “Buy NFT”.

You have now participated in the first economic usage of Gyro Dollars and are a certified member of the Gyronaut Corps!

Congratulations, you’ve earned your Gyronaut certification!

View your progress in the Gyroscope App.

Level 2 covered essential gyrobatics and culminated in earning your Gyronaut Corps certification. Stick around for the coming levels, where you will be able to apply your gyrobatic skills in adversarial contexts as we ascend to the Gyrosphere!

About Gyroscope

Gyroscope is an all-weather stablecoin for the DeFi of tomorrow. It’s built for power users who want the best decentralized stability. Gyroscope stabilizes by having a reserve of other assets, with carefully balanced risks, and applying it to balance the market for Gyro Dollars. Gyroscope combines three primary innovations to make this feasible in DeFi. The first line of defense is a risk-stratified reserve, aiming to fully cover Gyro Dollars. The second line of defense builds on new AMM designs for liquidity boosting and resilience around the peg. Gyroscope also builds in revolutionary mechanisms for safe governance, with Conditional Cash-flows and Optimistic Approvals, which align governance incentives with the vision of Gyro Dollar users.

What to do next

--

--