Closed otsalex closed 5 days ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
sommelier-web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 2, 2024 6:00pm |
The recent updates focus on refining the calculation of APY for merkle rewards by differentiating between ETH and USD values based on the cellar name key. Additionally, function parameters have been renamed and adjusted to reflect this new logic. These modifications aim to enhance accuracy in reward calculations and streamline the function interactions.
Files/Paths | Change Summaries |
---|---|
src/data/actions/common/getMerkleRewardsApy.ts |
Updated calculations to distinguish between ETH and USD, renamed constants, and adjusted function parameters and calls accordingly. |
src/data/actions/common/getStrategyData.ts |
Altered the function to pass cellarContract instead of stakerContract to getMerkleRewardsApy based on strategy slugs. |
sequenceDiagram
participant User
participant StrategyDataFunction
participant MerkleRewardsFunction
participant CellarContract
User->>StrategyDataFunction: Call getStrategyData()
StrategyDataFunction->>MerkleRewardsFunction: Call getMerkleRewardsApy(cellarContract)
MerkleRewardsFunction->>CellarContract: Call fetchTotalValueStaked()
CellarContract->>MerkleRewardsFunction: Return totalAssets
MerkleRewardsFunction->>MerkleRewardsFunction: Calculate APY
MerkleRewardsFunction->>StrategyDataFunction: Return APY
StrategyDataFunction->>User: Return strategy data with APY
In the basement of code where changes bloom,
APY calculations sing a new tune.
With ETH and USD now separate in flight,
Cellars whisper softly in the quiet night.
Contracts and strategies find their way,
Rewards more precise at the break of day.
🎉✨
[!TIP]
AI model upgrade
## `gpt-4o` model for reviews and chat is now live OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide any feedback or to report any issues.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
ARB tokens in period ->30000 for REAL_YIELD_ETH_ARB and 7500 for REAL_YIELD_USD_ARB.
Replaced stakerContract.totalDeposits() call to cellarContract.totalAssets()
Summary by CodeRabbit
New Features
Bug Fixes
Refactor