Skip to content

Conversation

@nialexsan
Copy link
Collaborator

@nialexsan nialexsan commented Dec 10, 2025

Closes: #???

Description

testnet txns for vaults with the collaterals:
https://testnet.flowscan.io/tx/2e3bf1756651d81fbf638d74faaf2685d26c474b7f4373ee995e0189b7d75d2f
https://testnet.flowscan.io/tx/b9154993f550dc85b1361cf59a2f3a5b0f1b8595c79e2f3e9a0350526cbe15e9

FlowYieldVaultsStrategies diff:
main...2d4e129#diff-3ca82892e3f3687d53c4df502a69e2b07e6f5a0038466d9792121979b51d2f32


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 7.74648% with 131 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...adence/contracts/FlowYieldVaultsStrategiesV1_1.cdc 7.74% 131 Missing ⚠️

📢 Thoughts on this report? Let us know!

@nialexsan nialexsan marked this pull request as ready for review December 22, 2025 19:23
@nialexsan nialexsan requested a review from a team as a code owner December 22, 2025 19:23
@nialexsan nialexsan requested a review from bthaile December 22, 2025 19:31
strategy: Type,
collateral: Type
): Bool {
let composerConfig = self.configs[composer]!
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested fix: The hasConfig function uses force-unwrap (!) on optional values which can panic. Should be changed to use optional binding:

access(all) view fun hasConfig(
    composer: Type,
    strategy: Type,
    collateral: Type
): Bool {
    if let composerConfig = self.configs[composer] {
        if let strategyConfig = composerConfig[strategy] {
            return strategyConfig[collateral] != nil
        }
    }
    return false
}

@liobrasil
Copy link
Contributor

Additional changes needed:

  1. New transaction file needed: cadence/transactions/flow-yield-vaults/admin/upsert_musdf_config.cdc - This transaction allows admins to upsert mUSDFStrategy config for different collateral types. It should be added to this PR.

  2. Fix relative paths in local/setup_mainnet.sh: The paths to upsert_musdf_config.cdc should be ./cadence/transactions/... instead of ../cadence/transactions/...

These changes are staged locally and can be reviewed.



# Setup UniV3 path tauUSDFv -> USDF -> WFLOW
flow transactions send ../cadence/transactions/flow-yield-vaults/admin/upsert_musdf_config.cdc \
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix relative path: This should be ./cadence/transactions/flow-yield-vaults/admin/upsert_musdf_config.cdc instead of ../cadence/... since the script runs from the repo root.

Copy link
Member

@Kay-Zee Kay-Zee left a comment

Choose a reason for hiding this comment

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

How easy is it to add new strategies to this setup? We will likely need to add a few more strategies compared to just the one mUSDF strategy, so if it's easy, then i'd almost want to "reset" the versioning, and go onto a new account, rather than having v1_1.

let composerType = Type<@FlowYieldVaultsStrategiesV1_1.mUSDFStrategyComposer>()
let strategyType = Type<@FlowYieldVaultsStrategiesV1_1.mUSDFStrategy>()

//issuer.purgeConfig()
Copy link
Member

Choose a reason for hiding this comment

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

not, if not needed, let's removed, if leaving, mentioned why with additional comments


//issuer.purgeConfig()
// === FLOW collateral ===
Copy link
Member

Choose a reason for hiding this comment

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

?? only flow?

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.

6 participants