Skip to content

Main sync - #67

Merged
kostyamospan merged 8 commits into
feat/new-audit-scopefrom
main
Jul 22, 2025
Merged

Main sync#67
kostyamospan merged 8 commits into
feat/new-audit-scopefrom
main

Conversation

@kostyamospan

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary of Changes

Hello @kostyamospan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the Midas protocol by integrating several new tokens and their associated infrastructure. It includes the addition of new smart contracts for token functionality, vaults, and data feeds, alongside comprehensive updates to the system's configuration and deployment scripts to ensure seamless operation and future scalability.

Highlights

  • New Midas Protocol Tokens: This pull request introduces four new Midas protocol tokens: mHYPER, mAPOLLO, lstHYPE, and liquidHYPE. Each token comes with its full suite of smart contracts, including the token itself, custom aggregator feeds, data feeds, deposit vaults, and redemption vaults with swappers.
  • Comprehensive Configuration Updates: Extensive configuration changes have been made across the codebase to support the new tokens. This includes updating address configurations, token type enumerations, contract name prefixes, and role definitions. Dedicated deployment configuration files have been added for each new token, detailing their specific parameters for various networks.
  • Integration of New Payment Tokens: New payment tokens, wsthype, khype, and whype, have been integrated into the system, complete with their respective data feed configurations.
  • Deployment and Upgrade Script Adjustments: Minor adjustments were made to hardhat.config.ts and a specific upgrade script (upgrade_RedemptionVaultSwapper.ts) was modified to facilitate the deployment and future upgrades of these new components, specifically changing the upgrade method for liquidHYPE's redemption vault swapper.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kostyamospan
kostyamospan merged commit d7cdf3c into feat/new-audit-scope Jul 22, 2025
11 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for four new tokens: mHYPER, mAPOLLO, lstHYPE, and liquidHYPE, along with their associated contracts, configurations, and helper scripts. The changes are extensive but consistently follow the established patterns in the codebase.

I've identified a few issues that require attention:

  • A critical placeholder address that must be corrected before any production deployment.
  • High-severity placeholder strings in deployment configurations that could lead to runtime failures.
  • A medium-severity maintainability issue in an upgrade script due to hardcoding.
  • A minor documentation typo.

Addressing these points will enhance the code's quality and prevent potential issues.

dataFeed: '0x5A55899f324bF45DD2dA0b97E145774a4668A9E4',
},
whype: {
token: '0x5555555555555555555555555555555555555555',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The token address for whype appears to be a placeholder value. Using such an address in a production environment would lead to contract failures. Please replace it with the correct address or ensure it's only used in a context where this placeholder is expected and handled (e.g., test environments).

Comment on lines +43 to +44
liquidityProvider: 'dummy',
swapperVault: 'dummy',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The values for liquidityProvider and swapperVault are set to the string 'dummy'. These appear to be placeholder values. If this configuration is intended for a production network, these must be replaced with valid addresses or configurations to prevent runtime errors. If this is for a testnet, consider adding a comment to clarify that these are placeholders.

Comment on lines +44 to +45
liquidityProvider: 'dummy',
swapperVault: 'dummy',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The values for liquidityProvider and swapperVault are set to the string 'dummy'. These appear to be placeholder values. If this configuration is intended for a production network, these must be replaced with valid addresses or configurations to prevent runtime errors. This is also present in liquidHYPE.ts.


/**
* @notice upgradeable pattern contract`s initializer
* @param _accessControl address of MidasAccessControll contract

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There is a typo in the @param documentation. MidasAccessControll should be MidasAccessControl.

     * @param _accessControl address of MidasAccessControl contract

Comment on lines +15 to +17
addresses?.liquidHYPE?.redemptionVaultSwapper ?? '',
await hre.ethers.getContractFactory(
getTokenContractNames('mBASIS').rvSwapper!,
getTokenContractNames('liquidHYPE').rvSwapper!,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This upgrade script is hardcoded to work only for liquidHYPE. This reduces its reusability and maintainability. Consider parameterizing the script to accept a token name, for example, via an environment variable or command-line argument.

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