Synthetixio / synthetix

Synthetix Solidity smart contracts
https://synthetix.io/
MIT License
1.2k stars 594 forks source link

Add Synth Exchanges to Uniswap #213

Open kaiynne opened 5 years ago

kaiynne commented 5 years ago

Synthetix has launched a number of unique assets over the last six months, but the learning curve on synthetix.exchange is still fairly high. In order to make the full range of Synths more accessible we want to launch a fork of the Uniswap UI to enable any Synth to be purchased directly from the Uniswap interface. Uniswap is one of the most popular DeFI projects and thousands of users are now comfortable using it to access liquidity across a wide range of tokens. By making all Synths accessible in the Uniswap UI we will significantly expand the audience for Synths in the immediate term. Once users are comfortable holding Synths they may decide to test out synthetix.exchange, but even if they only ever trade Synths on Uniswap the Synthetix contract will still capture exchange fees and pay them to SNX holders.

In order to complete this bounty we need the following:

User Journey One:

  1. User hears about a new Synth sCEX and wants to hold it
  2. User navigates to Uniswap.synthetix.exchange
  3. User selects ETH - > sCEX
  4. User selects amount of sCEX
  5. The contract converts ETH to sETH via the Uniswap contract
  6. The contract converts sETH to sCEX via the Synthetix contract
  7. The user receives sCEX in their wallet

User Journey Two:

  1. User holds sCEX and wants to convert to ETH
  2. User navigates to Uniswap.synthetix.exchange
  3. User selects sCEX - > ETH
  4. User selects amount of sCEX
  5. The contract converts sCEX to sETH via the Synthetix contract
  6. The contract converts sETH to ETH via the Uniswap contract
  7. The user receives ETH in their wallet

User Journey Three:

  1. User holds sCEX and wants to convert to iCEX
  2. User navigates to Uniswap.synthetix.exchange
  3. User selects sCEX - > iCEX
  4. User selects amount of sCEX
  5. The contract converts sCEX to iCEX via the Synthetix contract
  6. The user receives iCEX in their wallet

Deliverables

Smart Contracts AtomicSynthetixUniswapConverter Working environment on TESTNET (Contact us for TESTNET SNX) Unit tests using truffle and JavaScript tests. See https://github.com/Synthetixio/synthetix

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 10000.0 SNX (2785.0 USD @ $0.28/SNX) attached to it as part of the Synthetixio fund.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 2 months ago. Please review their action plans below:

1) zyfrank has been approved to start work.

I'm familiar with Uniswap, also I'm interesed in Synth, I'd like to take this task 2) fatima-yo has applied to start work _(Funders only: approve worker | reject worker)_.

Hello, I am willing to complete this task.

I got ample experience in Ethereum programming and have wrote a book on it, I can point you to the relevant online references.

I will do the following:

  1. Write a contract to atomically convert ETH -> sETH -> Synths
  2. Fork the Uniswap UI and add all Synths
  3. Write unit tests for all functionality

This work will take into account your journeys as detailed on the issue.

I will need from you:

  1. to state your preference about which testnet to use
  2. SNX for the stated testnet

I will provide as deliverables:

  1. Smart Contract/s AtomicSynthetixUniswapConverter 2.. Working environment on TESTNET
  2. Unit tests using truffle and JavaScript tests

I am at your service to provide you with further details or discuss any project related issue.

Best regards, Fatima

Learn more on the Gitcoin Issue Details page.

zyfrank commented 5 years ago

Hi @kaiynne I think some work related to uniswap should be contained in https://github.com/Synthetixio/uniswap-frontend, is that right? do you need updated change from uniswap-frontend(seems https://github.com/Synthetixio/uniswap-frontend is outdate )? Also Tab “Send" and "Pool" should be removed, what do you think about it?

kaiynne commented 5 years ago

Ideally we want this work to be at least in principle mergeable into the main Uniswap repo so if you can fork the latest version to start the work that would be better.

kaiynne commented 5 years ago

@zyfrank can you ping me on discord/telegram (@kaiynne) please so we can sync up.

zyfrank commented 5 years ago

@kaiynne @Robbiesmo I'm from China, currently my VPN is not stable(So has access difficulty for Discord/Telegram ). Currently maybe github is the best communication channel.

Currently I have caught logic of synthetix's contracts basically and start to do work on Uniswap UI. After this work, will focus on smart contract.

kaiynne commented 5 years ago

WeChat is also kaiynne.

Sent from my iPhone

On 6 Sep 2019, at 12:07 am, Robbiesmo notifications@github.com wrote:

Op do 5 sep. 2019 15:25 schreef zyfrank notifications@github.com:

@kaiynne https://github.com/kaiynne @Robbiesmo https://github.com/Robbiesmo I'm from China, currently my VPN is not stable(So has access difficulty for Discord/Telegram ). Currently maybe github is the best communication channel.

Currently I have caught logic of synthetix's contracts basically and start to do work on Uniswap UI. After this work, will focus on smart contract.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Synthetixio/synthetix/issues/213?email_source=notifications&email_token=AM7F3RST2OI5B2X2EDVFXMTQIECFFA5CNFSM4IR6NYVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD57CUQY#issuecomment-528362051, or mute the thread https://github.com/notifications/unsubscribe-auth/AM7F3RTTS5DO2WAYN7NFTH3QIECFFANCNFSM4IR6NYVA .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

zyfrank commented 5 years ago

@kaiynne Were synthetixio depolyed on Kovan testnet? need some test tokens, also need sEth sXAU contract address on this network. My eth addr:0x7d258F3196B3225420E513a722f66E2eDBD9Fd15

zyfrank commented 5 years ago

@kaiynne can you send some sETH to my account on Kovan? I prepare set a sETH uniswap exchange and add some liquity for sETH, ETH , so I can continue to make some test

hav-noms commented 5 years ago

@zyfrank Here are all the deployed contracts on the testnets https://developer.synthetix.io/api/docs/deployed-contracts.html.

I can send you sETH on ROPSTEN or RINKEBY. We treat KOVAN as our DEV/alpha network

zyfrank commented 5 years ago

@hav-noms I can test my work on RINKEBY. My address is 0xB79A68A0a101b2B9737aABcFF3f2767536Cd3dbd

janus commented 5 years ago

@kaiynne , This is an interesting issue. But I would like to ask a couple of questions: ETH - > sCEX is it fixed rate or could it change?

gitcoinbot commented 4 years ago

@zyfrank Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 4 years ago

@zyfrank Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

zyfrank commented 4 years ago

@gitcoinbot almost done, under testing

gitcoinbot commented 4 years ago

@zyfrank Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 4 years ago

@zyfrank Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 10000.0 SNX (3814.0 USD @ $0.38/SNX) has been submitted by:

  1. @zyfrank

@kaiynne please take a look at the submitted work:


zyfrank commented 4 years ago

@kaiynne Do you have any feedback?

kaiynne commented 4 years ago

We will review this week and close it out.

Sent from my iPhone

On 29 Sep 2019, at 7:40 pm, zyfrank notifications@github.com wrote:

 @kaiynne Do you have any feedback?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

zyfrank commented 4 years ago

Hi @kaiynne Is this issue still tracked by your guys?

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 10000.0 SNX (4587.0 USD @ $0.46/SNX) attached to this issue has been approved & issued to @zyfrank.