README.md 9.09 KB
Newer Older
XFT-dev's avatar
XFT-dev committed
1
![Offshift Logo](./assets/logo-2.png)
XFT-dev's avatar
XFT-dev committed
2

offshiftXFT's avatar
offshiftXFT committed
3 4 5 6 7 8
----

Read The Offshift Yellowpaper [here](https://offshift.io/content/Yellowpaper.pdf). 

----

XFT-dev's avatar
XFT-dev committed
9 10 11
Offshift provides a private derivatives platform that supports the following functions:

* [Shifting](#Shifting) - Convert XFT to zkAssets, which are the confidential tokens that enable anonymous transactions.
XFT-dev's avatar
XFT-dev committed
12 13
* [Staking](#Staking) - Provide XFT liquidity on SushiSwap and/or PancakeSwap and earn rewards on your tokens.
* [Bridging](#Bridging) - Move XFT between Ethereum (ERC-20) and Binance Smart Chain (BEP-20).
XFT-dev's avatar
XFT-dev committed
14 15 16

## Benefits

XFT-dev's avatar
XFT-dev committed
17
Our shifting, staking and bridging functions can lead to the following benefits for users:
XFT-dev's avatar
XFT-dev committed
18 19 20

* Anonymity - Anonymous transactions on multiple blockchains.
* Zero Knowledge Assets - Private derivatives with prices pegged to any asset with a market and a price feed.
XFT-dev's avatar
XFT-dev committed
21
* Rewards - Rewards paid in XFT and SUSHI on SushiSwap, and rewards paid in XFT on PancakeSwap, for providing liquidity to the pool.
XFT-dev's avatar
XFT-dev committed
22 23 24

## Implementation

XFT-dev's avatar
XFT-dev committed
25
We currently support staking LP tokens on Ethereum and Binance Smart Chain, and shifting on both the Ethereum and Moonbeam Testnets.
XFT-dev's avatar
XFT-dev committed
26 27 28

This repo includes the following resources:

XFT-dev's avatar
XFT-dev committed
29 30 31
* [Ethereum](./Ethereum)- Backend scripts and a frontend UI for shifting on Ethereum's Rinkeby Testnet, and backend scripts and a frontend UI for staking SushiSwap LP tokens on the Ethereum mainnet.
* [Moonbeam](./Moonbeam)- Backend scripts and a frontend UI for shifting on the Moonbase Alpha testnet.
* [BSC](./BSC) - Backend contracts and a frontend UI for staking PancakeSwap LP tokens on Binance Smart Chain.
XFT-dev's avatar
XFT-dev committed
32 33 34 35 36 37 38 39 40 41
* [Confidential Tokens](./Confidential_Tokens) - Detailed analysis of our approach to confidential contracts.

See the README file for the specific component you are implementing for installation and configuration details.

## Support

For support, contact us on [Telegram](https://t.me/OffshiftXFT) or [Discord](https://discord.gg/vkXQ3wW84w). Our team monitors these channels and will respond to your questions as fast as possible.

## Additional Resources

XFT-dev's avatar
XFT-dev committed
42
We provide our own front ends for obtaining test assets, shifting, staking and bridging:
XFT-dev's avatar
XFT-dev committed
43 44 45

* [Ethereum xftT Faucet](https://offshift.io/xftT-faucet.html#) - Obtain test XFT that you can use to develop your Ethereum-based application.
* [Ethereum Shifting UI](https://offshift.io/xftT-shift.html#) - Burn XFT to create zkAssets with the price pegged to one of several existing underlying assets.
offshiftXFT's avatar
offshiftXFT committed
46
* [Ethereum Shifting CLI scripts](https://open.offshift.io/offshiftXFT/protocol-main/-/tree/master/Ethereum/Shifting/frontend/scripts) - Use the Offshift dapp in the CLI without the need of a web browser.
XFT-dev's avatar
XFT-dev committed
47 48
* [Moonbeam xftT Faucet](https://offshift.io/moonbeam-faucet.html#) - Obtain test XFT that you can use to develop applications on Moonbeam, which supports interoperability between the Polkadot and Ethereum blockchains.
* [Moonbeam Shifting UI](https://offshift.io/moonbeam-shift.html#) - Shift between XFT and zkAssets that can be transferred on Polkadot and Ethereum.
offshiftXFT's avatar
offshiftXFT committed
49
* [Moonbeam Shifting CLI scripts](https://open.offshift.io/offshiftXFT/protocol-main/-/tree/master/Moonbeam/Shifting/frontend/scripts) - Use the Offshift dapp in the CLI without the need of a web browser.
XFT-dev's avatar
XFT-dev committed
50 51 52
* [Offshift SushiSwap Staking Dashboard](https://dashboard.offshift.io/stake-now) - Supply liquidity for XFT on SushiSwap to earn XFT and SUSHI tokens.
* [Offshift ETH<>BSC Bridge Dashboard](https://offshift.io/bridge/) - Move XFT tokens between Ethereum and Binance Smart Chain.
* [Offshift PancakeSwap Staking Dashboard](https://offshift.io/stake/) - Supply liquidity for XFT on PancakeSwap to earn XFT tokens.
XFT-dev's avatar
XFT-dev committed
53

XFT-dev's avatar
XFT-dev committed
54
See our articles on the Offshift Blog for detailed, step-by-step descriptions of shifting, staking and bridging using our dashboards with MetaMask:
XFT-dev's avatar
XFT-dev committed
55

XFT-dev's avatar
XFT-dev committed
56 57 58 59 60
* [Shifting on Ethereum Testnet](https://offshift.io/public/blog/2020-09-30-offshift-testnet-guide-phase-two/)
* [Shifting on Moonbeam Testnet](https://offshift.io/public/blog/2021-01-04-offshift-testnet-guide-moonbase-alpha/)
* [Staking LP tokens on SushiSwap](https://offshift.io/public/blog/2021-03-19-offshift-sushiswap-dual-liquidity-mining-goes-live/)
* [Staking LP tokens PancakeSwap](https://offshift.io/public/blog/2021-07-15-offshift-lists-xft-on-pancakeswap-launches-pancake-lp-rewards-bolsters-lp-rewards-on-sushiswap/)
* [Bridging between ETH and BSC](https://offshift.io/public/blog/2021-05-27-offshift-eth-bsc-bridge-goes-live-on-mainnet/)
XFT-dev's avatar
XFT-dev committed
61

XFT-dev's avatar
XFT-dev committed
62
The sections below provide an overview of how to use our [shifting](#shifting), [staking](#staking) and [bridging](#bridging) tools. By using the code in this repository, you can add the functionality described below to your own application.
XFT-dev's avatar
XFT-dev committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91

## Shifting

Shifting converts XFT to zkAssets and vice versa. zkAssets are private synthetic derivatives that can be anonymously transferred on the Ethereum blockchain. The value of a zkAsset is pegged to the price of any asset with a market and an available price feed. When you mint a zkAsset by shifting from XFT, you choose the underlying asset that sets the price of the zkAsset.

This repo includes resources for using the shifting tool in two different ways:

* Website - Use our prebuilt web apps and MetaMask to obtain test tokens and convert XFT to zkAssets.
* Scripts - Use our backend scripts to shift tokens using the command line. The README files in the [Ethereum](./Ethereum) and [Moonbeam](./Moonbeam) directories provide more details about installing and running the shifting scripts. 

The steps below provide an overview of how to use our shifting resources with the website frontend.

1. Set up MetaMask and obtain test tokens. You will need Rinkeby ETH and XFT Test Assests (xftT) to test shifting.
   1. In MetaMask, select the Rinkeby Test Network and obtain Rinkeby ETH from the [Rinkeby faucet](https://faucet.rinkeby.io/).
   2. Use the token addresses below to add the Offshift test tokens to MetaMask:
      * xftT - 0x1190fb1b00d20656549cdff689e55d072ba764f3
      * zkB - 0x0e1bff82509994170026f47f1d0857fb275c3003
2. Install the backend scripts. See the [Ethereum](./Ethereum) or [Moonbeam](./Moonbeam) README files for details.
3. Open the `faucet.html` file in the `frontend/website` directory and follow the prompts to connect MetaMask to the app.
4. Click the xftT(testnet) Faucet button and follow the instructions in MetaMask to obtain xftT that you can use to perform a test shift.
5. Open the `shift.html` file in the `frontend/website` directory.
6. In the first dropdown menu, select XFT. This is the asset that you will burn to mint zkB.
7. In the second dropdown, select the underlying asset that will set the price for the zkB that you are about to mint. For example, if you select BTC, you will mint zkBTC, which is a zkAsset price-pegged to BTC.
8. Click the Approve button.
9. Follow the prompts in MetaMask and the shifting UI to complete the shift. 
10. MetaMask will notify you when the transaction is complete, and your asset balance will update to show an amount of zkB.

## Staking

XFT-dev's avatar
XFT-dev committed
92
Staking provides a way for users holding XFT to earn rewards for providing liquidity on either SushiSwap or PancakeSwap.
XFT-dev's avatar
XFT-dev committed
93

XFT-dev's avatar
XFT-dev committed
94
#### Staking on SushiSwap
XFT-dev's avatar
XFT-dev committed
95

XFT-dev's avatar
XFT-dev committed
96 97 98
Before staking, you must have equal amounts (in USD) of XFT and ETH in your wallet.

The steps below provide an overview of how to use our staking resources. The README file in the [Ethereum](./Ethereum) directory provides more details about installing and running the scripts:
XFT-dev's avatar
XFT-dev committed
99 100 101 102 103 104 105

1. Use the [SushiSwap Add Liquidity XFT-ETH page](https://app.sushi.com/add/0xabe580e7ee158da464b51ee1a83ac0289622e6be/ETH) to exchange XFT and ETH for SushiSwap Liquidity Pool (SLP) tokens.
2. Clone this repository and add the files to your project.
3. Install the dependencies.
4. Start the server.
5. Open [`http://localhost:4200/`](http://localhost:4200/) in your web browser to launch the staking dashboard.
6. Follow the onscreen prompts or see the [staking] information at the root of this repository to connect to your MetaMask wallet and stake the SLP you obtained in step 1.
XFT-dev's avatar
XFT-dev committed
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
7. Rewards accrue every block and are paid in XFT and SUSHI. Claim your rewards in the Rewards tab on the staking dashboard.

#### Staking on PancakeSwap

Before staking, you must have equal amounts (in USD) of (BEP-20) XFT and BNB in your wallet.

To bridge ERC-20 XFT on Ethereum to BEP-20 XFT on Binance Smart Chain, see [Bridging](#Bridging).

The steps below provide an overview of how to use our staking resources. The README file in the [BSC](./BSC) directory provides more details.

1. Use the [PancakeSwap Add Liquidity XFT-BNB page](https://exchange.pancakeswap.finance/#/add/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c/0xe138c66982fd5c890c60b94fdba1747faf092c20) to exchange XFT and BNB for PancakeSwap Liquidity tokens (Cake-LP).
2. Open the [PancakeSwap Staking Dashboard](https://offshift.io/stake/) to stake and unstake your Cake-LP.
3. Rewards accrue every block and are paid in XFT. Claim your rewards in the Rewards tab on the staking dashboard.

## Bridging

XFT can be moved between Ethereum (ERC-20) and Binance Smart Chain (BEP-20) using the [Offshift ETH<>BSC Bridge](https://offshift.io/bridge/). Step-by-step [bridging instructions](https://offshift.io/public/blog/2021-05-27-offshift-eth-bsc-bridge-goes-live-on-mainnet/) can be found on the Offshift Blog.