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

docs: create BOB Stake page #368

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions docs/docs/build/bob-sdk/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ This SDK makes it possible to do steps 2, 3, and 4 in your application's front e

This is an example implementation of our SDK. You will need to decide how you handle asking your user to sign a partially-signed Bitcoin transaction (PSBT). We recommend using our [sats-wagmi](./sats-wagmi.md) package to connect to your users' wallets.

:::warning Staking only on testnet
BOB Gateway's newest functionality (i.e. staking for LSTs) is only available on testnet. We will update this page once mainnet is upgraded.
:::

### Install the BOB SDK

Add `@gobob/bob-sdk` to your project using your preferred package manager.
Expand Down Expand Up @@ -82,7 +78,9 @@ The SDK will handle automatically when the `toToken` has a fungible ERC20 token,

```ts
const strategies = await gatewaySDK.getStrategies();
const strategy = strategies.find(contract => contract.integration.name === "pell-wbtc")!;
const strategy = strategies.find(
(contract) => contract.integration.name === "pell-wbtc"
)!;
const quoteParamsStaking: GatewayQuoteParams = {
...quoteParams,
toChain: strategy.chain.chainId,
Expand Down Expand Up @@ -124,8 +122,14 @@ Please refer to the [OKX docs](https://www.okx.com/web3/build/docs/sdks/chains/b
In this example, instead of signing the `psbtBase64` we instead use the in-built wallet methods to directly send the BTC.

```ts
const { uuid, bitcoinAddress, satoshis, opReturnHash } = await gatewaySDK.startOrder(quote, quoteParams);
const { txhash } = await window.okxwallet.bitcoin.send({ from: quoteParams.fromUserAddress, to: bitcoinAddress, value: satoshis.toString(), memo: opReturnHash })
const { uuid, bitcoinAddress, satoshis, opReturnHash } =
await gatewaySDK.startOrder(quote, quoteParams);
const { txhash } = await window.okxwallet.bitcoin.send({
from: quoteParams.fromUserAddress,
to: bitcoinAddress,
value: satoshis.toString(),
memo: opReturnHash,
});
await gatewaySDK.finalizeOrder(uuid, txhash);
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/learn/guides/bob-gateway/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Check out our guide to see how you can [integrate BOB Gateway into your dapp](..

<iframe width="560" height="315" src="https://www.youtube.com/embed/xExdId-s4xA?playlist=xExdId-s4xA" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

## Step-by-step Guide
## Step-by-Step Guide

1. Open the [BOB Gateway website](https://bob-fusion-git-feat-external-bridges-interlay.vercel.app/bridge?type=deposit).

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/learn/guides/bob-stake/bob-stake-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/learn/guides/bob-stake/bob-stake-06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/learn/guides/bob-stake/bob-stake-07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/learn/guides/bob-stake/bob-stake-08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/learn/guides/bob-stake/bob-stake-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/learn/guides/bob-stake/bob-stake-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/learn/guides/bob-stake/bob-stake-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/docs/learn/guides/bob-stake/bob-stake.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
img {
max-width: 400px;
}
96 changes: 96 additions & 0 deletions docs/docs/learn/guides/bob-stake/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
sidebar_position: 0
sidebar_label: BOB Stake
---

# BOB Stake

## One-Click BTC Staking

[BOB Stake](https://app.gobob.xyz/stake?type=stake&stakeWith=solv-solvbtcbbn) is a new 1-click Bitcoin staking portal and [SDK](../../../build/bob-sdk/gateway.md) for Bitcoin liquid staking. Harvest BOB Spice points in the final season of BOB Fusion by using BOB Stake and exploring the growing Bitcoin staking ecosystem on BOB.

It's built on a trustless, RFQ-based cross-chain [swap protocol](../../../build/examples/btc-swap/) that connects professional LPs with users through a seamless swapping experience. LPs handle the complexities of bridging and staking on behalf of users in exchange for a fee.

All you need is a Bitcoin wallet with some BTC to send and an EVM-compatible wallet to receive your Bitcoin LST on BOB. We'll even send you some ETH to cover the fees of your first few transactions on BOB.

## Bonus Spice Points with Intract

You can harvest extra Spice by competing any of these [Intract Campaign](https://www.intract.io/explore?query=BOB&hideCompleted=true&hideExpired=true&sortBy=rankingB&entity_type=CAMPAIGN) tasks with BOB Stake.

| Task Name | Description | Reward |
| ------------------ | ------------------------------------------------------------------- | ----------------------------- |
| Stake with Solv | Stake 0.0003 BTC (~$20) with SolvBTC.BBN | 200 Intract XP (20,000 Spice) |
| Stake with Bedrock | Stake 0.0003 BTC (~$20) with uniBTC | 200 Intract XP (20,000 Spice) |
| Restake with Pell | Restake 0.0003 BTC (~$20) with Pell (either solv.btc.bbn or uniBTC) | 200 Intract XP (20,000 Spice) |

## Step-by-Step Guide

1. Open the [BOB Stake website](https://app.gobob.xyz/stake?type=stake&stakeWith=solv-solvbtcbbn).

1. Click `Connect Wallet` in the top-right corner.

![Click Connect Wallet](./bob-stake-01.png)

2. Click `Connect your EVM Wallet (Mandatory)`.

![Click Connect your EVM Wallet](./bob-stake-02.png)

3. Choose your EVM wallet provider.

![Select EVM Wallet](./bob-stake-03.png)

:::tip Choosing your EVM address
You will receive your assets at the EVM address you connect at this step.
:::

4. Click `Wallet` in the top-right corner again to connect your Bitcoin wallet.

![Click Connect Wallet](./bob-stake-04.png)

5. Click `Connect your Bitcoin Wallet (Optional)`.

![Click Connect your Bitcoin Wallet](./bob-stake-05.png)

6. Select your Bitcoin wallet provider.

![Select Bitcoin Wallet](./bob-stake-06.png)

7. Type the amount of BTC that you would like to stake. The minimum for [Intract Campaign](https://www.intract.io/explore?query=BOB&hideCompleted=true&hideExpired=true&sortBy=rankingB&entity_type=CAMPAIGN) tasks is 0.0003 BTC.

![Amount field with 0.0003 BTC typed in](./bob-stake-07.png)

8. Click the "Stake with" box to open a menu of staking options.

![Choosing the box labelled Stake with](./bob-stake-08.png)

9. Choose a BTC yield source. BOB has [Intract Campaign](https://www.intract.io/explore?query=BOB&hideCompleted=true&hideExpired=true&sortBy=rankingB&entity_type=CAMPAIGN) tasks for uniBTC, SolvBTC.BBN, and Pell restaking.

![Bitcoin staking options](./bob-stake-09.png)

10. Toggle on "Top-up Gas" to convert a small amount of your BTC to ETH for transaction fees on BOB. You must do this if your EVM wallet has no ETH to make sure you can transact on BOB. If you already have ETH on BOB, this is optional.

![Turn on top-up gas](./bob-stake-10.png)

11. Click “Stake”, then Confirm the transaction in your wallet.

![Click the Stake button](./bob-stake-11.png)

12. Click "Close".

![Click the Close button](./bob-stake-12.png)

:::tip You're done!
The next steps are optional and show how to monitor the progress of your transaction.
:::

13. Click "Bridge".

![Click Bridge](./bob-stake-13.png)

14. Look in the "Activity" box to see the status of your transaction. After a few Bitcoin blocks your BTC will be finalized on BOB. You can also verify the bridging is complete by opening your EVM wallet and seeing that your balance of wrapped BTC on BOB has increased.

![Activity box](./bob-stake-14.png)

## Contact Us

If you have any questions, please reach out to us on [Discord](https://discord.gg/gobob) or [Telegram](https://t.me/+CyIcLW2nfaFlNDc1). Welcome to the Bitcoin Renaissance on BOB!
Loading