Skip to content

Commit

Permalink
new Migration Tool scenario (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
kremalicious authored Jul 1, 2024
1 parent 59c0faa commit fc23958
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
10 changes: 8 additions & 2 deletions content.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

The **ASI rows** show what you would get with the given token amount at the moment of the ASI swap, along with the converted USD value based on the current price of FET.

The _All Markets_ scenario uses current spot prices fetched from [Coingecko](https://coingecko.com), ignoring the actual liquidity situation but these values should be pretty close to what you would get on big centralized exchanges like Coinbase or Binance. The swap estimations for _Uniswap_ scenario are fetched directly from [Uniswap](https://uniswap.org) v3 routes on-chain, reflecting the actual liquidity situation for direct swaps between shown tokens.
The _All Markets_ scenario uses current spot prices fetched from [Coingecko](https://coingecko.com), ignoring the actual liquidity situation but these values should be pretty close to what you would get on big centralized exchanges like Coinbase or Kraken, who continue to trade OCEAN/AGIX/FET.

Since July 1st, the official migration tool can be used to guarantee fixed ratios independent of any market forces. The _Migration Tool_ scenario uses these ratios for showing the FET amount:

- [singularitydao.ai/migrate-asi](https://singularitydao.ai/migrate-asi)

The swap estimations for _Uniswap_ scenario are fetched directly from [Uniswap](https://uniswap.org) v3 routes onchain, reflecting the actual liquidity situation for direct swaps between shown tokens.

All displayed values should be seen as estimates. Except for the fixed ASI exchange rate, all other values are constantly changing based on market conditions. There is no guarantee the displayed values reflect the value of your investment once the actual ASI swap mechanism is released. Use at your own risk.

## Merge Details

The merge happens between **June 11th-13th, 2024**. The ASI website and docs provide insights into most key points:
The merge happens between **July 1st-15th, 2024**. The ASI website and docs provide insights into most key points:

- [superintelligence.io](https://www.superintelligence.io)
- [ASI Vision Paper](https://docs.superintelligence.io/artificial-superintelligence-alliance/artificial-superintelligence-asi-alliance-vision-paper)
Expand Down
1 change: 1 addition & 0 deletions features/strategies/components/FormMarket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { type Market } from '@/features/strategies'

const options = [
{ value: 'market', label: 'All Markets' },
{ value: 'migration', label: 'Migration Tool' },
{ value: 'uniswap-v3', label: 'Uniswap v3' }
]

Expand Down
8 changes: 5 additions & 3 deletions features/strategies/components/Swap/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function SwapResults({
market: Market
}) {
const isUniswap = market === 'uniswap-v3'
const isMigration = market === 'migration'

const {
prices,
Expand All @@ -41,13 +42,14 @@ export function SwapResults({
const amountToAgix = amountInUsd / prices.agix.usd

// As of July 1st, use fixed ratios instead of FET market price
// as the markets for OCEAN & AGIX are limited
const amountToFet =
tokenSelected === 'ocean'
// for Migration Tool scenario
const amountToFet = isMigration
? tokenSelected === 'ocean'
? amount * ratioOceanToAsi
: tokenSelected === 'agix'
? amount * ratioAgixToAsi
: amount
: amountInUsd / prices.fet.usd

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion features/strategies/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type Market = 'all' | 'uniswap-v3'
export type Market = 'all' | 'migration' | 'uniswap-v3'

0 comments on commit fc23958

Please sign in to comment.