Skip to content

Commit 8ebfc11

Browse files
committed
update
1 parent 4b04c70 commit 8ebfc11

File tree

1 file changed

+38
-32
lines changed

1 file changed

+38
-32
lines changed

src/content/quickstarts/ccip-direct-staking.mdx

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -95,66 +95,72 @@ The following contract addresses are for the **Lido protocol** as an example imp
9595

9696
### Available Use Cases
9797

98-
The [chainlink-csr repository](https://github.com/Aphyla/chainlink-csr) provides protocol-agnostic implementations for direct staking operations. These implementations include fee encoding, allowance management, and cross-chain tracking functionality:
98+
The [chainlink-csr repository](https://github.com/Aphyla/chainlink-csr) provides protocol-agnostic implementations for direct staking operations. These implementations include fee encoding, allowance management, and cross-chain tracking functionality.
9999

100100
#### Core Estimation Functions
101101

102-
- **[`estimateFastStake()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/fastStake/estimate.ts)** - Calculate expected outputs, validate pool liquidity, and get fee breakdowns for fast stake operations
103-
- **[`estimateSlowStakeFees()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/slowStake/estimate.ts)** - Estimate cross-chain fees (CCIP + bridge) with automatic encoding for all supported bridge types
102+
| Function | Purpose |
103+
| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
104+
| **[`estimateFastStake()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/fastStake/estimate.ts)** | Calculate expected outputs, validate pool liquidity, and get fee breakdowns for fast stake operations |
105+
| **[`estimateSlowStakeFees()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/slowStake/estimate.ts)** | Estimate cross-chain fees (CCIP + bridge) with automatic encoding for all supported bridge types |
104106

105107
#### Pool Monitoring & Analysis
106108

107-
- **[`getPoolBalances()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/pool/balance.ts)** - Monitor TOKEN_IN/TOKEN_OUT liquidity across all supported chains with pool health indicators
108-
- **[`getTradingRate()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/pool/trading-rate.ts)** - Get current exchange rates, oracle pricing, and effective rates users receive after fees
109+
| Function | Purpose |
110+
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
111+
| **[`getPoolBalances()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/pool/balance.ts)** | Monitor TOKEN_IN/TOKEN_OUT liquidity across all supported chains with pool health indicators |
112+
| **[`getTradingRate()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/pool/trading-rate.ts)** | Get current exchange rates, oracle pricing, and effective rates users receive after fees |
109113

110114
#### Transaction Execution
111115

112-
- **[`executeSlowStake()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/slowStake/execute.ts)** - Complete slow staking flow with automatic allowance management for both WETH and LINK tokens
113-
- **[`executeFastStakeReferral()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/fastStake/execute.ts)** - Fast stake execution with automatic allowance management for both native ETH and wrapped token payments
116+
| Function | Purpose |
117+
| -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
118+
| **[`executeSlowStake()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/slowStake/execute.ts)** | Complete slow staking flow with automatic allowance management for both WETH and LINK tokens |
119+
| **[`executeFastStakeReferral()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/fastStake/execute.ts)** | Fast stake execution with automatic allowance management for both native ETH and wrapped token payments |
114120

115121
#### Allowance Management
116122

117-
- **[`checkTokenAllowance()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/allowance/check.ts)** - Token allowance checking that detects staking tokens and provides status analysis
123+
| Function | Purpose |
124+
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
125+
| **[`checkTokenAllowance()`](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/useCases/allowance/check.ts)** | Token allowance checking that detects staking tokens and provides status analysis |
118126

119-
#### Complete Integration Examples
127+
### Complete Integration Examples
120128

121129
The [chainlink-csr repository](https://github.com/Aphyla/chainlink-csr) provides **[comprehensive implementation examples](https://github.com/Aphyla/chainlink-csr/tree/main/offchain/src/examples/lido)** demonstrating different patterns:
122130

123131
<br />
124132

125-
##### Fast Stake Implementation
133+
#### Fast Stake Implementation
126134

127-
- **[Native ETH Fast Stake](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/fastStakeNativeExample.ts)** - Complete implementation using native ETH payment (no allowance management required)
128-
- **[WETH Fast Stake](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/fastStakeWrappedExample.ts)** - Complete implementation using WETH tokens with automatic allowance checking and approval
135+
| Example | Description |
136+
| ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
137+
| **[Native ETH Fast Stake](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/fastStakeNativeExample.ts)** | Complete implementation using native ETH payment (no allowance management required) |
138+
| **[WETH Fast Stake](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/fastStakeWrappedExample.ts)** | Complete implementation using WETH tokens with automatic allowance checking and approval |
129139

130140
<br />
131141

132-
##### Slow Stake Implementation
142+
#### Slow Stake Implementation
133143

134-
_Native ETH Staking:_
144+
Complete implementations covering all four payment combinations:
135145

136-
- **[Native ETH + Native CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeNativeExample.ts)** - Staking ETH with CCIP fees paid in ETH
137-
- **[Native ETH + LINK CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeNativeLinkExample.ts)** - Staking ETH with CCIP fees paid in LINK
138-
139-
_WETH Staking:_
140-
141-
- **[WETH + Native CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeWrappedNativeExample.ts)** - Staking WETH with CCIP fees paid in ETH
142-
- **[WETH + LINK CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeWrappedLinkExample.ts)** - Staking WETH with CCIP fees paid in LINK
146+
| Example | Payment Method | CCIP Fees | Description |
147+
| ---------------------------------------------------------------------------------------------------------------------------------------- | -------------- | --------- | ------------------------------------------ |
148+
| **[Native ETH + Native CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeNativeExample.ts)** | ETH | Native | Most efficient - no token approvals needed |
149+
| **[Native ETH + LINK CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeNativeLinkExample.ts)** | ETH | LINK | ETH payment with LINK for cross-chain fees |
150+
| **[WETH + Native CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeWrappedNativeExample.ts)** | WETH | Native | Wrapped tokens with native CCIP fees |
151+
| **[WETH + LINK CCIP](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeWrappedLinkExample.ts)** | WETH | LINK | Full wrapped token implementation |
143152

144153
<br />
145154

146-
##### Utility and Analysis
147-
148-
_Pool and Rate Analysis:_
149-
150-
- **[Pool Balance Check](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/poolBalanceExample.ts)** - Query liquidity across all supported chains with health indicators
151-
- **[Trading Rate Analysis](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/tradingRateExample.ts)** - Real-time exchange rates, oracle pricing, and effective rates after fees
152-
- **[Allowance Management](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/allowanceExample.ts)** - Comprehensive token allowance checking across all chains with detailed status analysis
153-
154-
_Fee Estimation and Analysis:_
155+
#### Utility and Analysis
155156

156-
- **[Fast Stake Estimation](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/estimateExample.ts)** - Detailed fee breakdown, liquidity validation, and exchange rate analysis
157-
- **[Slow Stake Fee Estimation](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeEstimateExample.ts)** - Multi-chain fee comparison and optimization analysis for both ETH and LINK payment methods
157+
| Category | Example | Purpose |
158+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
159+
| **Pool Analysis** | **[Pool Balance Check](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/poolBalanceExample.ts)** | Query liquidity across all supported chains with health indicators |
160+
| **Rate Analysis** | **[Trading Rate Analysis](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/tradingRateExample.ts)** | Real-time exchange rates, oracle pricing, and effective rates after fees |
161+
| **Allowance** | **[Allowance Management](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/allowanceExample.ts)** | Comprehensive token allowance checking across all chains with detailed status analysis |
162+
| **Fee Estimation** | **[Fast Stake Estimation](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/estimateExample.ts)** | Detailed fee breakdown, liquidity validation, and exchange rate analysis |
163+
| **Fee Estimation** | **[Slow Stake Fee Estimation](https://github.com/Aphyla/chainlink-csr/blob/main/offchain/src/examples/lido/slowStakeEstimateExample.ts)** | Multi-chain fee comparison and optimization analysis for both ETH and LINK payment methods |
158164

159165
### Key Implementation Details
160166

0 commit comments

Comments
 (0)