Skip to content

Commit

Permalink
chore: update FAQ for phase-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab committed Jan 2, 2025
1 parent f72682d commit 5a7e7c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 207 deletions.
9 changes: 2 additions & 7 deletions src/app/components/FAQ/FAQ.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
import { Heading } from "@babylonlabs-io/bbn-core-ui";

import { useNetworkInfo } from "@/app/hooks/client/api/useNetworkInfo";
import { getNetworkConfigBTC } from "@/config/network/btc";

import { questions } from "./data/questions";
import { Section } from "./Section";
interface FAQProps {}

export const FAQ: React.FC<FAQProps> = () => {
const { coinName, networkName } = getNetworkConfigBTC();
const { data: networkInfo } = useNetworkInfo();
const confirmationDepth =
networkInfo?.params.btcEpochCheckParams?.latestParam
?.btcConfirmationDepth || 10;
const { coinName } = getNetworkConfigBTC();

return (
<div className="container mx-auto flex flex-col gap-2 p-6">
<Heading as="h3" variant="h4" className="mb-8 text-primary-dark">
FAQ’s
</Heading>
<div className="flex flex-col gap-4 bg-warning-contrast border border-primary-light/20 rounded divide-y p-6">
{questions(coinName, networkName, confirmationDepth).map((question) => (
{questions(coinName).map((question) => (
<Section
key={question.title}
title={question.title}
Expand Down
201 changes: 1 addition & 200 deletions src/app/components/FAQ/data/questions.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import { ReactNode } from "react";

import { shouldDisplayTestingMsg } from "@/config";

export interface Question {
title: string;
content: ReactNode;
}

export const questions = (
coinName: string,
networkName: string,
confirmationDepth?: number,
): Question[] => {
export const questions = (coinName: string): Question[] => {
const questionList = [
{
title: "What is Babylon?",
Expand Down Expand Up @@ -79,119 +73,6 @@ export const questions = (
</p>
),
},
{
title: `Is my ${coinName} safe? Could I get slashed?`,
content: (
<>
<p>
You are not required to sign any PoS slashing-related
authorizations. Thus, in theory, the ${coinName} in your
self-custodial contract cannot be slashed due to the absence of your
authorization.
</p>
<br />

<p>
However, there are still risks associated with your ${coinName}:
</p>
<br />

<ol>
<li>
1. Code security
<br />
There is an inherent risk that the code developed for Bitcoin
Staking has vulnerabilities or bugs. The Babylon team has
open-sourced the code, and it is under security audits.
</li>
<br />
<li>
2. System reliability
<br />
The Bitcoin Staking system may be slow, unavailable, or
compromised, which may cause the staking service to be unavailable
or compromised, potentially leading to ${coinName} not being
unbondable or not withdrawable.
</li>
</ol>
<p>
The Babylon Labs team has open-sourced the code which has been
audited by{" "}
<a
href="https://docs.babylonlabs.io/assets/files/coinspect-phase1-audit.pdf"
target="_blank"
rel="noopener noreferrer"
className="text-primary"
>
<u>Coinspect</u>
</a>
,{" "}
<a
href="https://docs.babylonlabs.io/assets/files/zellic-phase1-audit.pdf"
target="_blank"
rel="noopener noreferrer"
className="text-primary"
>
<u>Zellic</u>
</a>
, and through a{" "}
<a
href="https://docs.babylonlabs.io/assets/files/cantina-phase1-competition.pdf"
target="_blank"
rel="noopener noreferrer"
className="text-primary"
>
<u>public security campaign facilitated by Cantina</u>
</a>
.
</p>
</>
),
},
{
title: "How long will it take for my stake to become active?",
content: (
<>
<p>
A stake’s status demonstrates the current stage of the staking
process. All stake starts in a <i>Pending</i> state, which denotes
that the ${coinName} Staking transaction does not yet have
sufficient ${coinName} block confirmations. As soon as it receives $
{confirmationDepth || 10} ${coinName} block confirmations, the
status transitions to <i>Overflow</i> or <i>Active</i>.{" "}
</p>
<br />

<p>
In an amount-based cap, a stake is <i>Overflow</i> if the system has
already accumulated the maximum amount of ${coinName} it can accept.
</p>
<br />
<p>
In a time-based cap, where there is a starting block height and an
ending block height, a stake is <i>Overflow</i> if it is included in
a ${coinName} block that is newer than the ending block.
</p>
<br />
<p>
Otherwise, the stake is <i>Active</i>.
</p>
<br />
<p>
You should unbond and withdraw a stake that is <i>Overflow</i>.
</p>
</>
),
},
{
title: "Do I get rewards for staking?",
content: (
<p>
No. This is a locking-only phase without a PoS chain. There is no PoS
staking reward nor incentives for participation.
</p>
),
},
{
title: "Are there any other ways to stake?",
content: (
Expand All @@ -210,61 +91,6 @@ export const questions = (
</p>
),
},
{
title: "Will I pay any fees for staking?",
content: (
<>
<p>
You will need to pay {networkName} network fees to have transaction
messages delivered and results recorded on the Bitcoin blockchain.
Examples include staking, unbonding, and withdrawal transactions.
This interface may provide estimates of network fees. However, the
actual network fee may be higher. <br />
<b>
If you lock your {coinName} in a staking transaction without the
necessary amount of {coinName} in the staked amount to pay for the
unbonding and withdrawal transactions, you won’t be able to unbond
or withdraw (although that also means the staked amount is less
than those transaction fees). The stake will remain locked unless
the {networkName} network fees come down sufficiently.
</b>{" "}
Here are more details about the network fees:
</p>
<br />
<ol>
<li>
1. <b>Staking Transaction Fee (Fs)</b>: This fee is for the
staking transaction. To stake amount S, you need at least S + Fs
in your wallet. It is calculated in real-time based on current
network conditions.
</li>
<br />
<li>
2. <b>Unbonding Transaction Fee (Fu)</b>: If you unbond your stake
before it expires, this fee is deducted from your stake S,
resulting in a withdrawable amount of S - Fu. Fu is a calculated
static value to ensure inclusion in busy network conditions.
</li>
<br />
<li>
3. <b>Withdraw Transaction Fee (Fw)</b>: This fee is for the
withdrawal transaction that transfers the stake back to your
wallet. It is deducted from your withdrawable stake, which is
either S (if you wait until expiration) or S - Fu (if unbonded
early). This fee ensures fast inclusion based on current network
conditions.
</li>
</ol>
<br />
<p>
In summary, to stake S, you need S + Fs, and upon completion, you
get S - Fw or S - Fu - Fw back, depending on whether you wait for
expiration or unbond early.
</p>
,
</>
),
},
{
title:
"Is it ok to use a wallet holding fungible tokens built on Bitcoin (e.g. BRC-20/ARC-20/Runes)?",
Expand All @@ -279,31 +105,6 @@ export const questions = (
</p>
),
},
{
title: "Are hardware wallets supported?",
content: (
<p>
Keystone via QR code is the only hardware wallet supporting Bitcoin
Staking. Using any other hardware wallet through any means (such as
connection to a software/extension/mobile wallet) can lead to
permanent inability to withdraw the stake.
</p>
),
},
];
if (shouldDisplayTestingMsg()) {
questionList.push({
title: "What is the goal of this testnet?",
content: (
<p>
The goal of this testnet is to ensure the security of the staked
Bitcoins by testing the user&apos;s interaction with the {coinName}{" "}
network. This will be a lock-only network without any PoS chain
operating, meaning that the only participants of this testnet will be
finality providers and {coinName} stakers.
</p>
),
});
}
return questionList;
};

0 comments on commit 5a7e7c9

Please sign in to comment.