You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Real-Time Staking Rewards Estimation
This feature enables users to estimate their staking rewards by fetching the current APR from the Lido protocol's StakingRouter contract and calculating future rewards based on their balance and time period. It also retrieves historical reward distributions via Lido's subgraph API.
Key Components getCurrentAPR : Fetches the APR using getStakingFeeAggregateDistributionE4Precision from the StakingRouter contract. estimateRewards : Estimates rewards based on the user's stETH or wstETH balance and a specified time period. getHistoricalRewards : Queries Lido's subgraph API to fetch past reward distributions for a given account. Impact
This feature enhances the SDK by providing users with actionable insights into their staking performance, ensuring compatibility with the latest Lido protocol updates.
2. Transaction Simulation
This feature allows users to simulate transactions before executing them on-chain. It uses callStatic to validate transaction success and estimateGas to calculate gas usage without broadcasting the transaction.
Key Components simulateTransaction : Simulates a transaction by calling its sendTransaction function with callStatic and estimates gas usage using estimateGas. Impact
By simulating transactions, users can avoid failed transactions and wasted gas fees, improving the reliability and cost-effectiveness of their interactions with the Lido protocol.
The text was updated successfully, but these errors were encountered:
1. Real-Time Staking Rewards Estimation
This feature enables users to estimate their staking rewards by fetching the current APR from the Lido protocol's StakingRouter contract and calculating future rewards based on their balance and time period. It also retrieves historical reward distributions via Lido's subgraph API.
Key Components
getCurrentAPR : Fetches the APR using getStakingFeeAggregateDistributionE4Precision from the StakingRouter contract.
estimateRewards : Estimates rewards based on the user's stETH or wstETH balance and a specified time period.
getHistoricalRewards : Queries Lido's subgraph API to fetch past reward distributions for a given account.
Impact
This feature enhances the SDK by providing users with actionable insights into their staking performance, ensuring compatibility with the latest Lido protocol updates.
2. Transaction Simulation
This feature allows users to simulate transactions before executing them on-chain. It uses callStatic to validate transaction success and estimateGas to calculate gas usage without broadcasting the transaction.
Key Components
simulateTransaction : Simulates a transaction by calling its sendTransaction function with callStatic and estimates gas usage using estimateGas.
Impact
By simulating transactions, users can avoid failed transactions and wasted gas fees, improving the reliability and cost-effectiveness of their interactions with the Lido protocol.
The text was updated successfully, but these errors were encountered: