Skip to content
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
141 changes: 95 additions & 46 deletions docs/staking/become-symbiotic-fp.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Follow the official [Go installation guide](https://go.dev/doc/install) for your system.

Verify installation:

```bash
go version
```
Expand All @@ -37,17 +38,42 @@ mkdir -p /data/manta-fp-sfpd-1/home /data/manta-fp-sfpd-1/db

### 3. Configure SFP

Edit the generated `sfpd.conf` file in `/data/manta-fp-sfpd-1/home/`:
Edit the generated `sfpd.conf` file in `/data/manta-fp-sfpd-1/home/`. You'll need to configure the following _critical_ fields in `sfpd.conf` before running your node.

__(Scroll right to view complete table on smaller screens)__

| Field | Description | Testnet Value | Mainnet Value |
| ---------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| `OperatorName` | Unique operator identifier (needs to be registered in contract) | _Chosen name_ | _Chosen name_ |
| `RewardAddress` | Address to receive FP rewards (recommended: separate from operator address) | _Wallet address_ | _Wallet address_ |
| `EnableKms` | Enable AWS KMS for key management and signing (optional) | `true` or `false` | `true` or `false` |
| `ChainId` | Ethereum network chain ID | `11155111` (Sepolia) | `1` |
| `StartHeight` | Block height to begin polling from | _Latest block height_ | _Latest block height_ |
| `EthRpc` | Ethereum RPC endpoint URL | _Sepolia RPC_ | _Mainnet RPC_ |
| `L2OutputOracleAddr` | L2 Output Oracle contract address | `0x2dd44d1b04170C5623cCc55DD5ed43FAB08b0B46` | `0x30c789674ad3B458886BBC9abf42EEe19EA05C1D` |
| `MantaStakingMiddlewareAddress` | Manta Staking Middleware contract | `0x63e3e4542315512d717cc0997b518ab00aa496f0` | `0xb385a5412950c28144d74014f843189583a1d9fa` |
| `SymbioticOperatorRegisterAddress` | Symbiotic Operator Register contract | `0x6F75a4ffF97326A00e52662d82EA4FdE86a2C548` | `0xAd817a6Bc954F678451A71363f04150FDD81Af9F` |
| `DBPath` | Database storage path (must be persistent) | `/data/manta-fp-sfpd-1/db` | `/data/manta-fp-sfpd-1/db` |
| `Namespace` | Celestia namespace ID | `00006d742d66702d746e` (Mocha) | `00006d742d66702d6d6e` |
| `DaRpc` | Celestia RPC endpoint | _Mocha RPC_ | _Mainnet RPC_ |

:::info Celestia Light Node
- Quick setup for Celestia light node if you choose to deploy your own: https://docs.celestia.org/how-to-guides/light-node
- Link to the Helm chart: https://github.com/celestiaorg/helm-charts
:::

#### Complete Description (For reference only)

#### Testnet Configuration
<details><summary> Click me to view! </summary>
<p>

```toml
[Application Options]
# Operator identification (must be unique across the network). Needs to be registered in the contract
OperatorName =
OperatorName =

# Address to receive operator rewards. Recommended: use a different address from your operator address for better security
RewardAddress =
RewardAddress =

# Commission rate (10000 = 100%, 1000 = 10%)
Commission = 1000
Expand All @@ -72,7 +98,7 @@ MaxSubmissionRetries = 20
ChainId = 11155111

# Starting block height from where chain polling begins
StartHeight =
StartHeight =

# Block step for chain scanning
BlockStep = 500
Expand All @@ -87,7 +113,7 @@ NumConfirmations = 10
SafeAbortNonceTooLowCount = 3

# Ethereum RPC endpoint
EthRpc =
EthRpc =

# Contract addresses (Testnet)
L2OutputOracleAddr = "0x2dd44d1b04170C5623cCc55DD5ed43FAB08b0B46"
Expand All @@ -99,9 +125,9 @@ PollInterval = 5s

[cloudhsm]
EnableHSM = false
HsmApiName =
HsmCreden =
HsmAddress =
HsmApiName =
HsmCreden =
HsmAddress =

[dbconfig]
# Database configuration; path needs to be persistent
Expand All @@ -120,10 +146,10 @@ DBTimeout = 1m0s

[celestiaconfig]
# Celestia namespace ID for DA node
Namespace =
Namespace = 00006d742d66702d746e

# Dial address of data availability grpc client
DaRpc = http://celstia-node:26658
DaRpc =

# Timeout for Celestia requests
Timeout = 1m0s
Expand All @@ -139,19 +165,35 @@ UpdateInterval = 100ms
Host = 0.0.0.0
Port = 8080
```
:::info Celestia Light Node
- Quick setup for Celestia light node if you choose to deploy your own: https://docs.celestia.org/how-to-guides/light-node
- Link to the Helm chart: https://github.com/celestiaorg/helm-charts
</p>
</details>

### 4. Prepare your operator ETH private key

You'll need a fresh Ethereum private key for your operator node. You can use the Node.js script below to generate one.

```js
const { Wallet } = require("ethers");

const wallet = Wallet.createRandom();

console.log("Address:", wallet.address);
console.log("Private Key:", wallet.privateKey);
console.log("Mnemonic:", wallet.mnemonic.phrase);
```
:::caution Private Key Security
Store your private keys and mnemonics securely. Make sure to use a secure `.env` file when handling private keys and never share or commit them to version control.
:::

### 4. Start the SFP Operator

### 5. Start the SFP Operator

#### Option A: If `EnableKms = false`

```bash
# Set environment variables
export CELESTIA_AUTH_TOKEN="your-celestia-auth-token"
export FP_EVM_PRIVATE_KEY="your-operator-private-key"
export FP_EVM_PRIVATE_KEY="your-operator-eth-private-key"

# Start the operator
./build/sfpd start \
Expand Down Expand Up @@ -192,46 +234,50 @@ Check your total claimable rewards amount.

**Request Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `address` | string | Yes | Your operator's Ethereum address |
| `protocolType` | string | Yes | Must be `"symbiotic"` for Manta FP |
| `isOperator` | boolean | Yes | Set to `true` for operators |
| `isPending` | boolean | No | `false` for claimable rewards (default), `true` for pending rewards |
| Parameter | Type | Required | Description |
| -------------- | ------- | -------- | ------------------------------------------------------------------- |
| `address` | string | Yes | Your operator's Ethereum address |
| `protocolType` | string | Yes | Must be `"symbiotic"` for Manta FP |
| `isOperator` | boolean | Yes | Set to `true` for operators |
| `isPending` | boolean | No | `false` for claimable rewards (default), `true` for pending rewards |

**Example Request**:

```bash
curl -X POST https://prod.reward-api.pacific-staking.manta.network/reward/all-amount \
-H "Content-Type: application/json" \
-d '{
-d '[{
"address": "0x9e22e7f3ad7a800c6a4cd42f9f3bc3b36fe11ec3",
"protocolType": "symbiotic",
"isOperator": true,
"isPending": false
}'
}]'
```

**Example Response**:

```json
{
"success": true,
"data": [
{
"amount": "1677619047619047618631", // Amount in wei (18 decimals)
"rewardAddress": "0x9e22e7f3ad7a800c6a4cd42f9f3bc3b36fe11ec3",
"ownerAddress": "0x9e22e7f3ad7a800c6a4cd42f9f3bc3b36fe11ec3",
"lastUpdated": 1753370401000 // Unix timestamp in milliseconds
}
]
"success": true,
"data": [
{
"amount": "1677619047619047618631", // Amount in wei (18 decimals)
"rewardAddress": "0x9e22e7f3ad7a800c6a4cd42f9f3bc3b36fe11ec3",
"ownerAddress": "0x9e22e7f3ad7a800c6a4cd42f9f3bc3b36fe11ec3",
"lastUpdated": 1753370401000 // Unix timestamp in milliseconds
}
]
}
```

:::info Converting from wei to MANTA

```javascript
// Convert from wei to MANTA
const amountInWei = "1677619047619047618631";
const amountInManta = amountInWei / 1e18; // 1677.619 MANTA
```

:::

### 2. Claim Rewards
Expand All @@ -240,19 +286,20 @@ const amountInManta = amountInWei / 1e18; // 1677.619 MANTA

Fetch the signature required to claim your rewards.

- **Path:** `/reward/claim-all-data`
- **Path:** `/reward/claim-all-data`
- **Method:** `POST`
- **Content-Type:** `application/json`

**Request Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `address` | string | Yes | Your operator's Ethereum address |
| `protocolType` | string | Yes | Must be `"symbiotic"` for Manta FP |
| `isOperator` | boolean | Yes | Set to `true` for operators |
| Parameter | Type | Required | Description |
| -------------- | ------- | -------- | ---------------------------------- |
| `address` | string | Yes | Your operator's Ethereum address |
| `protocolType` | string | Yes | Must be `"symbiotic"` for Manta FP |
| `isOperator` | boolean | Yes | Set to `true` for operators |

**Example Request**:

```bash
curl -X POST https://prod.reward-api.pacific-staking.manta.network/reward/claim-all-data \
-H "Content-Type: application/json" \
Expand All @@ -264,14 +311,15 @@ curl -X POST https://prod.reward-api.pacific-staking.manta.network/reward/claim-
```

**Example Response**:

```json
{
"success": true,
"data": [
{
"calldata": "0x514302ca0000000000000000000000009e22e7f3ad7a800c6a4cd42f9f3bc3b36fe11ec374be214f4c1988163ca53f8d0b53c59e4d74a4c549975d6887444fdb8b8837f6000000000000000000000000000000000000000000000000bed1d0263d9f0000000000000000000000000000000000000000000000000000000000000000001cd704ba26bc476806be3381c49887bd28f1f5360ac195887dc7c245319efa740369db40b4520070f76e6b7a47cf69b04a27aac6a5fb4e3c4039835e3b27c354a2"
}
]
"success": true,
"data": [
{
"calldata": "0x514302ca0000000000000000000000009e22e7f3ad7a800c6a4cd42f9f3bc3b36fe11ec374be214f4c1988163ca53f8d0b53c59e4d74a4c549975d6887444fdb8b8837f6000000000000000000000000000000000000000000000000bed1d0263d9f0000000000000000000000000000000000000000000000000000000000000000001cd704ba26bc476806be3381c49887bd28f1f5360ac195887dc7c245319efa740369db40b4520070f76e6b7a47cf69b04a27aac6a5fb4e3c4039835e3b27c354a2"
}
]
}
```

Expand All @@ -290,6 +338,7 @@ cast send TODO_CONTRACT_ADDRESS \
"${CALLDATA_FROM_STEP_1}" \
--private-key $PRIVATE_KEY
```

Once the transaction is confirmed, rewards will be automatically transferred to the reward address you specified during registration.

## Monitoring and Maintenance
Expand All @@ -300,4 +349,4 @@ Once the transaction is confirmed, rewards will be automatically transferred to
## Support and Resources

- **Technical Support**: [Manta Network Discord](https://discord.gg/ktZWgwSu93)
- **GitHub Issues**: [manta-fp repository](https://github.com/Manta-Network/manta-fp/issues)
- **GitHub Issues**: [manta-fp repository](https://github.com/Manta-Network/manta-fp/issues)
2 changes: 1 addition & 1 deletion docs/staking/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you're keen to learn more, we recommend checking out the following docs:

Staking rewards are calculated differently for operators and token delegators.

- **Operators** earn rewards for submitting fast finality proofs to the network. Reward distribution occurs every $3$ days: $54,794$ \$MANTA for the first six months, then $109,588$ \$MANTA thereafter, allocated proportionally based on each operator's proof submissions during the period. Operators can set a commission rate to retain a portion of rewards before distributing the remainder to their delegators.
- **Operators** earn rewards for submitting fast finality proofs to the network. Reward distribution occurs every $3$ days with $18,264$ \$MANTA in total, allocated proportionally based on each operator's proof submissions during the period. Operators can set a commission rate to retain a portion of rewards before distributing the remainder to their 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
Expand Down