diff --git a/docs/concepts/fast-finality.md b/docs/concepts/fast-finality.md index 0050582e..a452eeb8 100644 --- a/docs/concepts/fast-finality.md +++ b/docs/concepts/fast-finality.md @@ -1,4 +1,4 @@ -# Fast Finality Solution on Manta Pacific +# Fast Finality on Manta Pacific Layer 2 networks have faced a frustrating problem: it takes way too long for transactions to settle onchain. Most current solutions make users wait up to a week before they can be completely sure their transaction is final and their assets are safe. This delay creates significant UX friction and capital inefficiency. Our solution minimizes finality time while preserving security and decentralization guarantees. diff --git a/docs/manta-fp/Manta Symbiotic Finality Provider/Setup.md b/docs/manta-fp/Manta Symbiotic Finality Provider/Setup.md new file mode 100644 index 00000000..c0de3b7e --- /dev/null +++ b/docs/manta-fp/Manta Symbiotic Finality Provider/Setup.md @@ -0,0 +1,174 @@ +## Deploy Manta SFP operator (Manta Symbiotic Finality Provider) + +Repo Link: [manta-fp](https://github.com/Manta-Network/manta-fp) + + +:::danger important +> The staking amount needs to be greater than 400,000 Manta to receive rewards. +> If the operator is deregistered, the operator name, address, and reward address can no longer be used. + +::: + +#### Steps to Deploy a SFP operator + +1. install go via [go doc](https://go.dev/doc/install) + +2. clone the `manta-fp` code, build, and generate the `sfpd.conf` config file under `/data/manta-fp-sfpd-1/home` + + ```sh + git clone https://github.com/Manta-Network/manta-fp + cd manta-fp + make build + mkdir -p /data/manta-fp-sfpd-1/home /data/manta-fp-sfpd-1/db + ./build/sfpd init --home /data/manta-fp-sfpd-1/home + ``` + +3. Adjust `sfpd.conf` for testnet: + `OperatorName` should be unique + `RewardAddress` is your address to receive fp rewards + `EnableKms` can be enabled to use kms to sign + `ChainId = 11155111` is the eth testnet ChainId + `StartHeight` The latest height from which we start polling the chain of eth testnet + `EthRpc` The rpc url of eth testnet + `L2OutputOracleAddr = 0x2dd44d1b04170C5623cCc55DD5ed43FAB08b0B46` The testnet L2OutputOracleAddr + `MantaStakingMiddlewareAddress = 0x63e3e4542315512d717cc0997b518ab00aa496f0` The testnet MantaStakingMiddlewareAddress + `SymbioticOperatorRegisterAddress = 0x6F75a4ffF97326A00e52662d82EA4FdE86a2C548` The testnet SymbioticOperatorRegisterAddress + `DBPath` The db path, need to be persistent + `Namespace = 00006d742d66702d746e` The celestia Mocha testnet namespace + `DaRpc` The celestia testnet rpc url. You can deploy a [celestia light node](https://docs.celestia.org/how-to-guides/light-node) of Mocha testnet. It also has a [helm chart](https://github.com/celestiaorg/helm-charts). + + ``` + [Application Options] + ; The interval between each attempt to submit finality signature or public randomness after a failure + SubmissionRetryInterval = 1s + + ; The interval between each finality signature(s) submission + SignatureSubmissionInterval = 1s + + ; The maximum number of retries to submit finality signature or public randomness + MaxSubmissionRetries = 20 + + ; The name of operator; The name needs to be registered in the contract + OperatorName = + + ; The manta address to receive fp rewards + RewardAddress = + + ; The custom commission, 10000 = 100% + Commission = 1000 + + ; Logging level for all subsystems + LogLevel = info + + EnableKms = false + + [opeventconfig] + ; The chain id of the chain + ChainId = + + ; The height from which we start polling the chain + StartHeight = + + ; The block step of chain blocks scan + BlockStep = 500 + + ; The maximum number of ethereum blocks that can be stored in the buffer + BufferSize = 500 + + ; The rpc uri of ethereum + EthRpc = + + ; Specifies how many blocks are need to consider a transaction confirmed. + NumConfirmations = 10 + + ; Specifies how many ErrNonceTooLow observations are required to give up on a tx at a particular nonce without receiving confirmation. + SafeAbortNonceTooLowCount = 3 + + ; The contract address of L2OutputOracle address + L2OutputOracleAddr = + + ; The interval between each polling of blocks; the value should be set depending on the block production time but could be set smaller for quick catching up + PollInterval = 5s + + ; Whether to use cloud hsm + EnableHsm = false + + ; The api name of hsm + HsmApiName = + + ; The creden of hsm + HsmCreden = + + ; The address of hsm + HsmAddress = + + ; the contract address of the manta-staking-middleware + MantaStakingMiddlewareAddress = + + ; the contract address of the symbiotic_operator_register_address + SymbioticOperatorRegisterAddress = + + [dbconfig] + ; The directory path in which the database file should be stored. + DBPath = /data/manta-fp-sfpd-1/db + + ; The name of the database file. + DBFileName = symbiotic-fp.db + + ; Prevents the database from syncing its freelist to disk, resulting in improved performance at the expense of increased startup time. + NoFreelistSync = true + + ; Specifies if a Bolt based database backend should be automatically compacted on startup (if the minimum age of the database file is reached). This will require additional disk space for the compacted copy of the database but will result in an overall lower database size after the compaction. + AutoCompact = false + + ; Specifies the minimum time that must have passed since a bolt database file was last compacted for the compaction to be considered again. + AutoCompactMinAge = 168h0m0s + + ; Specifies the timeout value to use when opening the wallet database. + DBTimeout = 1m0s + + [celestiaconfig] + ; Namespace ID for DA node + Namespace = + + ; Dial address of data availability grpc client + DaRpc = http://celstia-node:26658 + + ; Timeout for celestia requests + Timeout = 1m0s + + [metrics] + ; IP of the Prometheus server + Host = 0.0.0.0 + + ; Port of the Prometheus server + Port = 2113 + + ; The interval of Prometheus metrics updated + UpdateInterval = 100ms + + [api] + ; IP of the http server + Host = 0.0.0.0 + + ; Port of the http server + Port = 8080 + ``` + +4. Adjust `sfpd.conf` for mainnet: to be implemented + +5. Start SFP operator + + If EnableKms is false + ```sh + ./build/sfpd start --home /data/manta-fp-sfpd-1/home --auth-token $(CELESTIA_AUTH_TOKEN) --private-key $(FP_EVM_PRIVATE_KEY) + ``` + + If EnableKms is true + ```sh + ./build/sfpd start --home /data/manta-fp-sfpd-1/home --auth-token $(CELESTIA_AUTH_TOKEN) --kms-region $(KMS_REGION) --kms-id $(KMS_ID) + ``` + +6. Health check api: `http://localhost:8080/ping` + +7. Metrics: `http://localhost:2113/metrics` diff --git a/docs/staking/become-symbiotic-fp.md b/docs/staking/become-symbiotic-fp.md new file mode 100644 index 00000000..7400aeaa --- /dev/null +++ b/docs/staking/become-symbiotic-fp.md @@ -0,0 +1,176 @@ +# Become an Operator + +## Deploy Manta SFP operator (Manta Symbiotic Finality Provider) + +Repo Link: [manta-fp](https://github.com/Manta-Network/manta-fp) + + +:::danger important +> The staking amount needs to be greater than 400,000 Manta to receive rewards. +> If the operator is deregistered, the operator name, address, and reward address can no longer be used. + +::: + +#### Steps to Deploy a SFP operator + +1. install go via [go doc](https://go.dev/doc/install) + +2. clone the `manta-fp` code, build, and generate the `sfpd.conf` config file under `/data/manta-fp-sfpd-1/home` + + ```sh + git clone https://github.com/Manta-Network/manta-fp + cd manta-fp + make build + mkdir -p /data/manta-fp-sfpd-1/home /data/manta-fp-sfpd-1/db + ./build/sfpd init --home /data/manta-fp-sfpd-1/home + ``` + +3. Adjust `sfpd.conf` for testnet: + `OperatorName` should be unique + `RewardAddress` is your address to receive fp rewards + `EnableKms` can be enabled to use kms to sign + `ChainId = 11155111` is the eth testnet ChainId + `StartHeight` The latest height from which we start polling the chain of eth testnet + `EthRpc` The rpc url of eth testnet + `L2OutputOracleAddr = 0x2dd44d1b04170C5623cCc55DD5ed43FAB08b0B46` The testnet L2OutputOracleAddr + `MantaStakingMiddlewareAddress = 0x63e3e4542315512d717cc0997b518ab00aa496f0` The testnet MantaStakingMiddlewareAddress + `SymbioticOperatorRegisterAddress = 0x6F75a4ffF97326A00e52662d82EA4FdE86a2C548` The testnet SymbioticOperatorRegisterAddress + `DBPath` The db path, need to be persistent + `Namespace = 00006d742d66702d746e` The celestia Mocha testnet namespace + `DaRpc` The celestia testnet rpc url. You can deploy a [celestia light node](https://docs.celestia.org/how-to-guides/light-node) of Mocha testnet. It also has a [helm chart](https://github.com/celestiaorg/helm-charts). + + ``` + [Application Options] + ; The interval between each attempt to submit finality signature or public randomness after a failure + SubmissionRetryInterval = 1s + + ; The interval between each finality signature(s) submission + SignatureSubmissionInterval = 1s + + ; The maximum number of retries to submit finality signature or public randomness + MaxSubmissionRetries = 20 + + ; The name of operator; The name needs to be registered in the contract + OperatorName = + + ; The manta address to receive fp rewards + RewardAddress = + + ; The custom commission, 10000 = 100% + Commission = 1000 + + ; Logging level for all subsystems + LogLevel = info + + EnableKms = false + + [opeventconfig] + ; The chain id of the chain + ChainId = + + ; The height from which we start polling the chain + StartHeight = + + ; The block step of chain blocks scan + BlockStep = 500 + + ; The maximum number of ethereum blocks that can be stored in the buffer + BufferSize = 500 + + ; The rpc uri of ethereum + EthRpc = + + ; Specifies how many blocks are need to consider a transaction confirmed. + NumConfirmations = 10 + + ; Specifies how many ErrNonceTooLow observations are required to give up on a tx at a particular nonce without receiving confirmation. + SafeAbortNonceTooLowCount = 3 + + ; The contract address of L2OutputOracle address + L2OutputOracleAddr = + + ; The interval between each polling of blocks; the value should be set depending on the block production time but could be set smaller for quick catching up + PollInterval = 5s + + ; Whether to use cloud hsm + EnableHsm = false + + ; The api name of hsm + HsmApiName = + + ; The creden of hsm + HsmCreden = + + ; The address of hsm + HsmAddress = + + ; the contract address of the manta-staking-middleware + MantaStakingMiddlewareAddress = + + ; the contract address of the symbiotic_operator_register_address + SymbioticOperatorRegisterAddress = + + [dbconfig] + ; The directory path in which the database file should be stored. + DBPath = /data/manta-fp-sfpd-1/db + + ; The name of the database file. + DBFileName = symbiotic-fp.db + + ; Prevents the database from syncing its freelist to disk, resulting in improved performance at the expense of increased startup time. + NoFreelistSync = true + + ; Specifies if a Bolt based database backend should be automatically compacted on startup (if the minimum age of the database file is reached). This will require additional disk space for the compacted copy of the database but will result in an overall lower database size after the compaction. + AutoCompact = false + + ; Specifies the minimum time that must have passed since a bolt database file was last compacted for the compaction to be considered again. + AutoCompactMinAge = 168h0m0s + + ; Specifies the timeout value to use when opening the wallet database. + DBTimeout = 1m0s + + [celestiaconfig] + ; Namespace ID for DA node + Namespace = + + ; Dial address of data availability grpc client + DaRpc = http://celstia-node:26658 + + ; Timeout for celestia requests + Timeout = 1m0s + + [metrics] + ; IP of the Prometheus server + Host = 0.0.0.0 + + ; Port of the Prometheus server + Port = 2113 + + ; The interval of Prometheus metrics updated + UpdateInterval = 100ms + + [api] + ; IP of the http server + Host = 0.0.0.0 + + ; Port of the http server + Port = 8080 + ``` + +4. Adjust `sfpd.conf` for mainnet: to be implemented + +5. Start SFP operator + + If EnableKms is false + ```sh + ./build/sfpd start --home /data/manta-fp-sfpd-1/home --auth-token $(CELESTIA_AUTH_TOKEN) --private-key $(FP_EVM_PRIVATE_KEY) + ``` + + If EnableKms is true + ```sh + ./build/sfpd start --home /data/manta-fp-sfpd-1/home --auth-token $(CELESTIA_AUTH_TOKEN) --kms-region $(KMS_REGION) --kms-id $(KMS_ID) + ``` + +6. Health check api: `http://localhost:8080/ping` + +7. Metrics: `http://localhost:2113/metrics` diff --git a/docs/staking/overview.md b/docs/staking/overview.md new file mode 100644 index 00000000..1e605c0d --- /dev/null +++ b/docs/staking/overview.md @@ -0,0 +1,48 @@ +# Overview + +We're working with folks at [Symbiotic](https://symbiotic.fi/) and [Babylon](https://babylonlabs.io/) on a new secure, decentralized staking solution that enables MANTA token holders to participate in Manta Pacific's network security and earn rewards at the same time. Node runners can opt in as operators on the Symbiotic or Babylon layer and contribute to the network's fast finality architecture by generating proofs that will vastly increase the reliability of state transitions on Manta Pacific and bring down the finality times from days to mere minutes. Learn more about the dual-layer fast finality architecture here: [Fast Finality on Manta Pacific](../concepts/fast-finality) + +:::info About Symbiotic and Babylon + +[Symbiotic](https://symbiotic.fi/) is a decentralized security protocol that enables blockchain networks to access shared security from a pool of staked assets, creating an efficient marketplace for economic security. This helps optimize resource allocation, boosts staking returns for token delegators, and ensures robust security through a flexible, incentive-based design. + +[Babylon](https://babylonlabs.io/) is a decentralized protocol that allows native Bitcoin staking directly on the Bitcoin blockchain, without intermediaries. It uses a shared-security architecture to extend Bitcoin's security to other decentralized networks enabling BTC holders to engage in multi-staking while keeping their assets on the Bitcoin network, offering verifiable security for said networks. + +::: + +We're leveraging Symbiotic's restaking infrastructure and Babylon's shared security architecture to combine Ethereum's and Bitcoin's security with Manta Pacific's high-performance execution. This increases overall asset efficiency for MANTA and BTC token holders and helps enable [fast finality](../concepts/fast-finality) on Manta Pacific. + +## How it Works + +Simply put, Manta Pacific nodes have the option to become operators on the Symbiotic and Babylon layers. This enables MANTA and BTC token holders to delegate their tokens to these active node operators, establishing a dual-layer security framework. By merging Bitcoin's substantial liquidity with Manta Network's native asset, this approach significantly enhances the overall safety and robustness of the network. + +If you're keen to learn more, we recommend checking out the following docs: + +- [Symbiotic - What's restaking?](https://docs.symbiotic.fi/intro/stake) +- [Babylon - Bitcoin staking](https://docs.babylonlabs.io/guides/overview/bitcoin_staking/) +- [Fast finality architecture on Manta Network](../concepts/fast-finality#our-two-layer-solution) + +## Key Benefits of this Architecture + +- Added Security for Manta Pacific: The delegated MANTA and BTC incentivize operators to honestly verify the state transitions on Manta Pacific, and the validation results are relayed to Ethereum to be settled there. +- Token Rewards: Token delegators and node operators earn MANTA rewards. +- Decentralization: Both fast finality and native MANTA staking are enabled using decentralized infrastructure. + +## Reward Mechanism + +Staking rewards are calculated differently for operators and token delegators. + +- **Operators** earn rewards based on their contribution to the network through the submission of fast finality proofs. A fixed amount of $172,600$ MANTA is distributed every $3$ days, and the distribution is proportional to the number of proof submissions made by the operator during this period. Additionally, operators can choose set a commission rate, which denotes the portion of the rewards they will retain before distributing the remaining rewards to their respective delegators. +- **Delegators** receive rewards proportional to their staked amount in their chosen operator's vault. After the operator's commission is deducted, the remaining rewards are distributed among delegators based on their share of the total stake in that vault. + +## Get Started + +### Become an Operator + +If you run a Manta Pacific node and want to join as an operator, refer to the guides below. + +[TBD - Link to Symbiotic docs] + +### Delegate your MANTA Tokens + +Follow the guide showing [how to delegate your MANTA tokens - TBD](#placeholder) to an active operator. \ No newline at end of file diff --git a/docs/staking/staking-faqs.md b/docs/staking/staking-faqs.md new file mode 100644 index 00000000..1d0d9802 --- /dev/null +++ b/docs/staking/staking-faqs.md @@ -0,0 +1,21 @@ +# FAQs + +## How do I stake my MANTA tokens? + +Start by navigating to the [staking dashboard](#placeholder), and then choose an active operator of your choice. Follow our [step-by-step guide](./staking-howtos.md). + +## Are staking rewards compounded? + +No, your staking rewards will not be compounded automatically. Once you claim your rewards to your wallet, you can choose to delegate them manually to an operator. Check out the [How-to guides](./staking-howtos) for help. + +## What's the minimum token amount I can delegate to an operator? + +There is no lower limit on the token amount you can delegate to an operator. + +## Is there an unbonding period for the staked tokens? + +Yes. There is a *3 day waiting period* after you unstake your tokens before you can claim them on the [**My Stake**](#placeholder) page. + +## Is slashing currently active on the staking layer? + +Slashing is not active during the early stages of the staking layer. The operators that fail to contribute in the form of fast finality proofs will simply not receive any rewards. diff --git a/docs/staking/staking-howtos.md b/docs/staking/staking-howtos.md new file mode 100644 index 00000000..ceec441b --- /dev/null +++ b/docs/staking/staking-howtos.md @@ -0,0 +1,86 @@ +# How-to Guides for Manta Staking + +By delegating your tokens to a validator, you contribute to the security and stability of Manta Pacific. In this guide, we'll walk you through the steps required to delegate your MANTA tokens to an active operator on the staking layer. + +## Delegate MANTA Tokens + +:::tip Before you start +Follow the links below to take another look at how the native staking mechanism works and the rules for token delegators and node operators: + +- [Rules and roles - TBD](#placeholder) +- [Reward mechanism](./overview#reward-mechanism) +::: + +### Step 1: Access the staking dashboard + +[TBD - Screenshot here] + +Navigate to the [Manta Staking dashboard](#placeholder). Start by connecting your wallet to the platform. You'll be able to see your wallet balance and your previous staking stats if you've delegated tokens to an operator before. + +### Step 2: Choose an active operator + +[TBD - Screenshot here] + +You'll be able to see current stats such as the total staked amount, the APR offered, and the performance ratio of the available operators in the list displayed on the **Staking Pool** page. Choose an active operator from the list and select the **Stake** button. + +### Step 3: Enter staking amount + +[TBD - Screenshot here] + +Enter your desired staking amount in the empty field in the pop-up window. Select **Stake** to proceed. You'll be prompted to authorize the action by signing the transaction in your wallet. + +### Step 4: Check final status + +[TBD - Screenshot here] + +Navigate to the **My Stake** page from the navbar at the top. You'll see the operator you chose show up in the list at the bottom and the amount of MANTA tokens you delegated to them. + +## Claim Staking Rewards + +### Step 1: Access the staking dashboard + +[TBD - Screenshot here] + +Navigate to the [Manta Staking dashboard](#placeholder) and open the **My Stake** page. + +### Step 2: Check for claimable rewards + +[TBD - Screenshot here] + +Locate the **Rewards Claimable** box on the page. If you have any claimable MANTA token rewards, the respective amount will be displayed. + +### Step 3: Claim rewards + +[TBD - Screenshot here] + +If you have any claimable rewards available, select the **Claim** button, and then select **Confirm** in the pop-up window. + +## Unstake MANTA Tokens + +### Step 1: Access the staking dashboard + +[TBD - Screenshot here] + +Navigate to the [Manta Staking dashboard](#placeholder) and open the **My Stake** page. The list at the bottom displays operators and the respective token amounts you've delegated to them. + +### Step 2: Locate the operator + +[TBD - Screenshot here] + +Locate the operator you wish to unstake your tokens from and select the corresponding **Unstake** button on the right. + +### Step 3: Enter unstaking amount + +:::caution +Note that you will not be able to cancel the unstaking action once confirmed and you'll have to wait out the 7-day waiting period before your MANTA tokens arrive in your wallet. +::: + +[TBD - Screenshot here] + +Enter the token amount you're looking to unstake in the empty field in the pop-up window. Next, select the **Unstake** button to confirm the unstake action. + +### Step 4: Claim your unstaked tokens + +[TBD - Screenshot here] + +Once the 7-day waiting period ends, the tokens will be available to claim on the **My Stake** page. Simply select the **Claim** button to claim your unstaked tokens and confirm the action. \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index acc460c8..362d5644 100644 --- a/sidebars.js +++ b/sidebars.js @@ -68,6 +68,33 @@ module.exports = { }, ], }, + { + type: "category", + label: "Staking", + items: [ + + { + type: "doc", + label: "Overview", + id: "staking/overview", + }, + { + type: "doc", + label: "How-to Guides", + id: "staking/staking-howtos", + }, + { + type: "doc", + label: "Become an Operator", + id: "staking/become-symbiotic-fp", + }, + { + type: "doc", + label: "FAQs", + id: "staking/staking-faqs", + }, + ], + }, ], }, {