GoGo Protocol - UST Deposited


    1. Introduction


    GoGo Protocol is a DeFi protocol built on top of the Polygon blockchain which was affected by the UST depeg back in may. This dashboard aims to look at the total amount of USDC both the protocol and users had deposited, which leveraged Anchor protocol’s APY for a stable return. Going through now outdated docs we see (link here) :

    What stable staking services GOGO is providing?

    From now on you can stake USDC on the GOGO app and you’ll receive 13% APY paid in USDC plus an additional GOGO community rewards for early users.

    What is Orion Money?

    Orion’s Money vision is to be a cross-chain stablecoins bank - the best place in DeFi for stablecoin saving, lending and spending. One of their solutions is staking USDC on their platform with good APY returns.

    How is it technically possible to provide 13% APY on USDC?

    Orion Money uses Anchor protocol to obtain this high APY. First Orion Money deposits stablecoins with EthAnchor. EthAnchor converts stablecoins (USDC, USDT) in UST (the stablecoin of Anchor, which is deployed on Terra). Further on, EthAnchor deposits UST to Anchor on Terra.

    How is GOGO connected to Orion Money?

    GOGOcoin app is connected to Orion Money through secured smart-contracts and everything users deposit on GOGO app it’s sent to Orion Money Protocol and it’s staking as in the mechanism described above.


    2. Methodology and results


    Here we find the StakeOrion contract, where the path flow is the following:

    wallet -> StakeOrionManager -> StakeOrion -> Orion

    Each user has an individual StakeOrion contract that is deployed for them by StakeOrionManager the first time they stake StakeOrionManage.

    Exploring more into depth all six message calls, we see the following options:

    • Stake

    A wallet calls the contract 0x7FCf0f2dcEc385FCCEd98240A8A4bEC8e91da7D1. Funds (USDC) are sent to an address which is linked to the original from wallet. The funds end up in 0x465862772f9c2e9d71982627bcfdc721a47deb22.

    • Get reward

    Users which have deposited USDC get rewards both in $GOGO and USDC. This signature represents the rewards in $GOGO, so I will not analyze it since it’s not relevant to the subject.

    • Get stable reward

    As mentioned above, users can get rewards both in $GOGO and USDC. This signature represents rewards in USDC. As far as I’ve been able to analyze, a wallet calls 0x7FCf0f2dcEc385FCCEd98240A8A4bEC8e91da7D1 and typically the following flow occurs:

    1. Address 0x465862772f9c2e9d71982627bcfdc721a47deb22 sends USDC to wallet X, which is the one linked in the stake call to the wallet initiating the transaction.
    2. X sends typically (and I specify typically because there are a few exceptions) 87% of the total amount to the wallet initiating the transaction.
    3. X sends the rest of the funds (13%) to address 0x6e4e1498d8dad16c573ad83589f761a0e3dcdee7 which appears to be the contract deployer.
    • Withdraw

    A wallet calls the contract 0x7FCf0f2dcEc385FCCEd98240A8A4bEC8e91da7D1 and the transaction is initiating following the path:

    1. 0x465862772f9c2e9d71982627bcfdc721a47deb22 sends the total amount withdrawn to wallet X, which is the one linked in the stake call to the wallet initiating the transaction.
    2. X sends the total amount to the wallet initiating the transaction.
    • Exit

    A wallet calls the contract 0x7FCf0f2dcEc385FCCEd98240A8A4bEC8e91da7D1 and the transaction is initiating following the path:

    1. 0x465862772f9c2e9d71982627bcfdc721a47deb22 sends the total amount withdrawn to wallet X, which is the one linked in the stake call to the wallet initiating the transaction.
    2. X sends almost of the total amount to the wallet initiating the transaction.
    3. X sends a small amount (fees maybe?) to 0x6e4e1498d8dad16c573ad83589f761a0e3dcdee7 which appears to be the contract deployer.
    4. $GOGO Tokens are sent from a different address to the one initiating the transaction. We will not take these into account.
    • Withdraw pending

    The withdraw call withdraws USDC directly if Orion has enough in their polygon pool. If not, it registers the withdrawal and notifies Orion so they can bridge from Terra. Once Orion bridges to polygon, users can call withdraw pending to finalize their withdrawals. A wallet calls the contract 0x7FCf0f2dcEc385FCCEd98240A8A4bEC8e91da7D1 and the transaction is initiating following the path:

    1. It’s a one step transaction. a wallet X, which is the one linked in the stake call to the wallet initiating the transaction, sends the total amount to the wallet initiating the transaction

    From all the above, as stated at the start of our approach section, we’re interested on the wallets created when staking.

    User wallet -> StakeOrionManager -> StakeOrion contract -> Orion

    • We're interested in stake orion contract, amount UST pre depeg, amount UST post depeg
    • I've found all original address + created address (stakeorion contract for said address) pairs, shown on the right.
    Loading...
    Loading...
    Loading...
    Loading...

    I've calculated stakeorion contract address amount UST pre depeg (block height 28036183 on polygon) and post depeg (block height 28799165 on polygon)

    • Total amount PRE depeg = 0
    • Total amount post depeg = 137569.257009 UST
    • I've also looked at the original wallets UST holdings just in case, and a few of them had some amount, but that should not be related to Gogo, added for consistency.

    Analysis below. First two tables:

    • Left: stakeorion contract address (list of all addresses created when a user first stakes with Gogo), and the UST amount POST depeg.
    • Right: original address (not the created when staking, but the ones that staked), and UST amount POST depeg. As stated above, not sure this has something to do with Gogo, yet I’ve looked into it for consistency.
    • You can link both wallets with the table on the upper right side.

    Same for PRE depeg, yet only the original wallets hold any UST, although insignificant amounts. Posted both for consistency too.

    Loading...
    Loading...
    Loading...

    Lastly, the SUM of both total PRE and POST depeg, only for the Stakeorion contract addresses created, since those are the points of study.

    • Pre depeg: 0 UST
    • Post depeg: 137,589.26 UST