Skip to content

Sync#181

Merged
akiraonstarknet merged 9 commits intodevfrom
prod
Oct 9, 2025
Merged

Sync#181
akiraonstarknet merged 9 commits intodevfrom
prod

Conversation

@akiraonstarknet
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings October 9, 2025 03:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR appears to be a synchronization update that includes SDK version updates, protocol configuration changes, and new strategy functionality. The changes primarily focus on updating the Starknet Farm SDK and adjusting strategy configurations.

  • Updated @strkfarm/sdk from version 1.1.28 to 1.1.39
  • Added new solve method to HyperLSTStrategy with yield calculation logic
  • Disabled several protocols and strategies by commenting them out

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/strategies/hyper-lst.strat.ts Added solve method with LST yield calculation and strategy status management
src/store/strategies.atoms.tsx Added maxTVL configuration for LST tokens and disabled multiple strategies
src/store/protocols.ts Disabled several protocol imports and configurations by commenting them out
src/app/api/strategies/route.ts Modified strategy sorting logic with new priority system
src/app/api/lib.ts Set all maxRewardsPerDay values to 0 for various tokens
package.json Updated @strkfarm/sdk dependency from 1.1.28 to 1.1.39

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

async solve(pools: PoolInfo[], amount: string) {
const yieldInfo = await this.universalStrategy.netAPY();
// todo to deduct fee
const LSTYield = yieldInfo.splits.find((split) => split.id == 'lst_apy');
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use strict equality (===) instead of loose equality (==) for comparison.

Suggested change
const LSTYield = yieldInfo.splits.find((split) => split.id == 'lst_apy');
const LSTYield = yieldInfo.splits.find((split) => split.id === 'lst_apy');

Copilot uses AI. Check for mistakes.
Comment on lines +117 to +119
console.log(
`${this.metadata.name}::LST APY: ${LSTYield.apy}, net APY: ${yieldInfo.net}, fee factor: ${this.fee_factor}`,
);
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console.log statements should be removed from production code or replaced with proper logging.

Copilot uses AI. Check for mistakes.
);
this.netYield =
LSTYield.apy + (yieldInfo.net - LSTYield.apy) * (1 - this.fee_factor);
console.log('netYield2', this.netYield, Number(amount));
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console.log statements should be removed from production code or replaced with proper logging.

Copilot uses AI. Check for mistakes.
const aPriority = getPriority(a.status.number);
const bPriority = getPriority(b.status.number);

// if (aPriority !== bPriority) return aPriority - bPriority;
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code should be removed. The priority comparison logic is calculated but never used.

Suggested change
// if (aPriority !== bPriority) return aPriority - bPriority;
if (aPriority !== bPriority) return aPriority - bPriority;

Copilot uses AI. Check for mistakes.
@akiraonstarknet akiraonstarknet merged commit daf3ea0 into dev Oct 9, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants