Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EPIC] Switch from OCEAN -> ASI in Predictoor, DF, & rest #186

Open
41 tasks
trentmc opened this issue Jun 7, 2024 · 1 comment
Open
41 tasks

[EPIC] Switch from OCEAN -> ASI in Predictoor, DF, & rest #186

trentmc opened this issue Jun 7, 2024 · 1 comment
Labels

Comments

@trentmc
Copy link
Member

trentmc commented Jun 7, 2024

(This was moved from pdr-private#97.)

(This needs to be updated based on 2-phase approach of ASI alliance. But for this, we only care about phase 2 for here)

Background / Motivation

Key refs:

  • OCEAN -> ASI token-swap contract will be ready Jun 13, 2024. Blog: "Ocean et al Finalize Merger", May 28, 2024 link
  • Rate is 1 OCEAN --> 0.4333 ASI
  • Predictoor feeds contract: ERC20Template3.sol
  • We're currently in "DF Main 2" with Vesting Wallet B. "DF Main is Here" Mar 16, 2023 link.
  • We can remove OCEAN from Vesting Wallet B via renounceVesting(). This is good news - much simpler than having to use splitter contract

Timeline

Pre-requisites:

  • Tue Jun 11: $ASI created
  • Thu Jun 13: $OCEAN -> $ASI migration contract is ready, on Eth mainnet

Top-level Milestones

(Note: these are dates proposed by Trent, as of Thu Jun 4)

  • Fri Jun 14: Milestone {1}: announce plans for "Predictoor cutover & related" (ie this work)
  • Thu Jun 27: Milestone {2}: Eth <> Sapphire $ASI bridge is ready
  • Thu Jun 27: Milestone {3}: Sapphire $OCEAN -> $ASI migration contract ready
  • Fri Jun 28: Milestone {4}: lots of $ASI in Sapphire DEX
  • (start asap) Milestone {5}: DF & Predictoor code is ready, in branches & Sapphire testnet
  • Thu Jul 11: Milestone {6}: first payout of Predictoor DF rewards in $ASI
  • Thu Jul 18: Milestone {7}: old liquidity is removed; most of rest of OCEAN has been swapped
  • Milestone {8}: OceanDAO has swapped its OCEAN for ASI

Detailed TODOs, per milestone

(A = Alex, B = Berkay, T = Trent, N = Norbert)

Milestone {1}: announce plans for "Predictoor cutover & related" (ie this work)

  • [T] Write draft blog post; get it reviewed; publish blog; tweet

Milestone {2}: Eth <> Sapphire $ASI bridge is ready

Milestone {3}: Sapphire $OCEAN -> $ASI migration contract ready

(So that predictoors can migrate their OCEAN -> ASI, when they please)

  • [A] On Sapphire, deploy $OCEAN -> $ASI migration contract (a fork of the Eth mainnet one). BUT replace burn code with transfer to OPF.
  • [A] on Eth mainnet OceanDAO, send 5M OCEAN to DF Address1 (as a loan)
  • [A] on Eth mainnet DF Address1, migrate 5M $OCEAN to 2.1M $ASI
  • [A] from Eth mainnet DF Address1, bridge 2.1M $ASI to Sapphire
  • [N] make migration from Sapphire easy via a webapp. Put it in predictoor.ai, oceanprotocol.com, or other? It needs an approve, then a function call.
  • [T] Update docs.oceanprotocol.com, docs.predictoor.ai, pdr-backend READMEs for milestones 2 & 3

Q&A:

  • Q: Why is there "replace burn code with transfer to OPF" on the Sapphire contract? If it did that, wouldn't that grow the total equivalent # OCEAN tokens?
  • A: It doesn't grow the total equivalent # tokens on Eth mainnet. In Sapphire, it acts as a "simple swap" to make life easy for people on Sapphire. In OPF getting the OCEAN, it uses that to repay the loan from the earlier step. That is: when a user migrates OCEAN to get ASI, then OPF gets OCEAN; later, OPF bridges the OCEAN back to Eth mainnet, so we can convert it to ASI as well.

Milestone {4}: lots of $ASI in Sapphire DEX

  • [A] on Sapphire, on Illuminex, remove all OCEAN-ROSE liquidity
  • [A] on Sapphire, migrate recently-freed OCEAN to ASI
  • [A] on Sapphire, on Illuminex, create new ASI-ROSE pool
  • [A] on Sapphire, on Illuminex, add ASI-ROSE liquidity

Milestone {5}: DF & Predictoor code is ready, in branches & Sapphire testnet

(Can start asap)

  • [B] In contracts/ repo, do planned tweaks to DatatokenTemplate3. Test.
  • [A,B] Deploy 20 predictoor feeds to Sapphire testnet. Update contracts' address.json (keep old addrs too?)
  • [B] In df-py/ repo: deprecate all "Volume DF" code, since it's obsolete. This will help a lot for steps that follow (less code, way faster CI testing)
  • [B] Prep df-py/ repo: create a branch; change "OCEAN" -> "ASI" incl address, other changes as needed. Test.
  • [A,B] Prep barge/ repo: ""
  • [B] Prep pdr-backend/ repo: ""

Milestone {6}: first payout of Predictoor DF rewards in $ASI

(The timing for this is precise, it must jive with dates set at the top)

  • [A,B] Deploy 20 predictoor feeds to Sapphire mainnet. Update contracts' address.json (keep old addrs too?)
  • [B] Update df-py/ branch with new feed addresses, as needed
  • [B] Update barge/ ""
  • [B] Update pdr-backend/ ""
  • To VestingWallet B, call renounceVesting() "Splitter contract" such that $OCEAN in it goes back to DF treasury wallet, on Thu Jul 11
  • Add $ASI to Vesting Wallet B, such that DF Payouts are in $ASI, starting on Thu Jul 11
  • [T] Update docs.oceanprotocol.com, docs.predictoor.ai, pdr-backend READMEs

Milestone {7}: old liquidity is removed; most of rest of OCEAN has been swapped

  • [A] On Sapphire, in Illuminex, remove remaining OCEAN-ROSE liquidity
  • [A] on Sapphire, in Illuminex, add ASI-ROSE liquidity to use up rest of ROSE
  • [A] On Sapphire, in lizard.exchange, remove OCEAN-ROSE liquidity (if any)
  • [A] From Sapphire, bridge any OCEAN to Eth mainnet
  • Q: do we remove liquidity from OCEAN Uniswap pool here? Any other DEXes with OCEAN liquidity?

Milestone {8}: OceanDAO has swapped its OCEAN for ASI

  • [A] On Eth mainnet, swap OCEAN for ASI. This is a big one!

Appendix: Related : Wind down Passive DF etc

  • Announce: apps will switch from OCEAN --> ASI, including Predictoor. Blog: "Superintelligence Alliance Updates to Data Farming and veOCEAN", Mar 29, 2024 link
  • Passive & Volume DF Airdrop Has Completed; They Are Now Retired. May 3, 2024 link
  • Github issue df-private#97
@trentmc trentmc added the Epic label Jun 7, 2024
@KatunaNorbert
Copy link
Member

I created the following issues to cover the frontend updates, we could iterate on them if anything else is needed:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants