Skip to content

Conversation

@AGMASO
Copy link
Collaborator

@AGMASO AGMASO commented Oct 8, 2025

General Changes

  • feat: added hardcoded incentives for PYUSD

Developer Notes


Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

@vercel
Copy link

vercel bot commented Oct 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
interface Ready Ready Preview Comment Oct 8, 2025 4:43pm

Copy link
Contributor

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 adds hardcoded incentive data for PYUSD (PayPal USD) stablecoin in the Aave protocol. The change enables display of specific incentive information for PYUSD suppliers without relying on external API data.

  • Adds hardcoded incentive configuration for PYUSD A_TOKEN
  • Implements conditional logic to return hardcoded data when PYUSD is the rewarded asset
  • Includes custom messaging about PYUSD program requirements

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

const protocolIncentivesAPR = protocolIncentives.reduce((sum, inc) => {
return sum + (inc.incentiveAPR === 'Infinity' ? 0 : +inc.incentiveAPR);
}, 0);
const merklIncentivesAPY = convertAprToApy(0.1);
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The hardcoded value 0.1 (10%) should be extracted as a named constant to improve maintainability and make the source of this value clear.

Copilot uses AI. Check for mistakes.
Comment on lines +110 to +121
breakdown: {
protocolAPY: 0,
protocolIncentivesAPR: 0,
merklIncentivesAPR: 0,
totalAPY: 0,
isBorrow: false,
breakdown: {
protocol: 0,
protocolIncentives: 0,
merklIncentives: 0,
},
},
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The breakdown object in the hardcoded incentives appears to be duplicated and potentially inconsistent with the dynamically calculated breakdown returned later. Consider removing the hardcoded breakdown since it's recalculated anyway.

Suggested change
breakdown: {
protocolAPY: 0,
protocolIncentivesAPR: 0,
merklIncentivesAPR: 0,
totalAPY: 0,
isBorrow: false,
breakdown: {
protocol: 0,
protocolIncentives: 0,
merklIncentives: 0,
},
},

Copilot uses AI. Check for mistakes.
Comment on lines +193 to +194
} as MerklIncentivesBreakdown,
} as ExtendedReserveIncentiveResponse;
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

Using type assertions with 'as' can bypass TypeScript's type checking. Consider ensuring the object structure matches the expected types or use proper type guards to validate the structure.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@foodaka foodaka merged commit 700658a into main Oct 8, 2025
19 of 21 checks passed
@foodaka foodaka deleted the feat/PYUSD-hardcoded-apr branch October 8, 2025 17:25
foodaka added a commit that referenced this pull request Oct 9, 2025
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.

4 participants