Skip to content

Feature/osu 1516 a report on the technical side for what we can accomplish#398

Open
skimaharvey wants to merge 2 commits intodevelopfrom
feature/osu-1516-a-report-on-the-technical-side-for-what-we-can-accomplish
Open

Feature/osu 1516 a report on the technical side for what we can accomplish#398
skimaharvey wants to merge 2 commits intodevelopfrom
feature/osu-1516-a-report-on-the-technical-side-for-what-we-can-accomplish

Conversation

@skimaharvey
Copy link
Contributor

Summary

  • Add integration fork test suite for KPK (karpatkey) USDC Prime and ETH Prime vaults on Morpho
  • KPK vaults are standard ERC-4626 MetaMorpho vaults, so the generic ERC4626Strategy works out of the box — no new strategy contract needed
  • Tests reuse the existing BaseYieldDonatingIntegrationTest infrastructure for maximum DRYness

What was added

File Purpose
test/integration/strategies/config/KpkTestConfig.sol Config library with KPK vault addresses and test constants
test/integration/strategies/YieldDonating/KpkERC4626Strategy.t.sol Main test contract (defaults to USDC)
test/integration/strategies/YieldDonating/kpk/KpkUSDCPrimeStrategy.t.sol USDC Prime variant (no overrides)
test/integration/strategies/YieldDonating/kpk/KpkETHPrimeStrategy.t.sol ETH Prime variant (WETH config overrides)

KPK vault addresses (Ethereum mainnet)

Vault Address
KPK USDC Prime 0xe108fbc04852B5df72f9E44d7C29F47e7A993aDd
KPK ETH Prime 0xd564F765F9aD3E7d2d6cA782100795a885e8e7C8

Test coverage (17 tests per vault, 34 total)

  • Fuzz deposit / withdraw / emergency withdraw / harvest with profit donation
  • Deposit limit edge cases (idle assets, cap exceeded)
  • Withdraw limit overflow safety (uint256 boundary)
  • Harvest overflow guard
  • Multi-user concurrent flow
  • Constructor asset validation
  • Basic configuration checks

Key finding

All KPK vaults are ERC-4626 (built on Morpho MetaMorpho). There are no ERC-7540 vaults in their ecosystem. The existing ERC4626Strategy + ERC4626StrategyFactory handles integration completely with zero new production code.

Test plan

  • forge test --match-contract KpkUSDCPrimeStrategyTest — 17/17 pass
  • forge test --match-contract KpkETHPrimeStrategyTest — 17/17 pass

@linear
Copy link

linear bot commented Mar 3, 2026

@skimaharvey skimaharvey force-pushed the feature/osu-1516-a-report-on-the-technical-side-for-what-we-can-accomplish branch from 593d551 to 1625510 Compare March 3, 2026 11:19
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Code Coverage Report for src/ files

File % Lines % Statements % Branches % Funcs
src/core/BaseStrategy.sol ✅ 100.00% (54/54) ✅ 100.00% (39/39) ✅ 100.00% (2/2) ✅ 100.00% (19/19)
src/core/MultistrategyLockedVault.sol ✅ 100.00% (117/117) ✅ 100.00% (121/121) ✅ 100.00% (22/22) ✅ 100.00% (18/18)
src/core/MultistrategyVault.sol ✅ 100.00% (593/593) ✅ 100.00% (617/617) ✅ 98.49% (196/199) ✅ 100.00% (88/88)
src/core/PaymentSplitter.sol ✅ 100.00% (55/55) ✅ 100.00% (52/52) ✅ 100.00% (18/18) ✅ 100.00% (16/16)
src/core/Privileged.sol ✅ 100.00% (13/13) ✅ 100.00% (12/12) ✅ 100.00% (0/0) ✅ 100.00% (4/4)
src/core/TokenizedStrategy.sol ✅ 99.35% (308/310) ✅ 99.64% (275/276) ✅ 95.60% (87/91) ✅ 98.81% (83/84)
src/core/libs/DebtManagementLib.sol ✅ 100.00% (76/76) ✅ 100.00% (80/80) ✅ 100.00% (20/20) ✅ 100.00% (2/2)
src/core/libs/ERC20SafeApproveLib.sol ✅ 100.00% (4/4) ✅ 100.00% (5/5) ✅ 100.00% (1/1) ✅ 100.00% (1/1)
src/factories/AaveV3StrategyFactory.sol ✅ 100.00% (13/13) ✅ 100.00% (19/19) ✅ 100.00% (2/2) ✅ 100.00% (2/2)
src/factories/AddressSetFactory.sol ✅ 100.00% (15/15) ✅ 100.00% (15/15) ✅ 100.00% (0/0) ✅ 100.00% (4/4)
src/factories/BaseERC4626StrategyFactory.sol ✅ 100.00% (15/15) ✅ 100.00% (19/19) ✅ 100.00% (0/0) ✅ 100.00% (3/3)
src/factories/BaseStrategyFactory.sol ✅ 100.00% (14/14) ✅ 100.00% (14/14) ✅ 100.00% (1/1) ✅ 100.00% (4/4)
src/factories/ERC4626StrategyFactory.sol ✅ 100.00% (2/2) ✅ 100.00% (1/1) ✅ 100.00% (0/0) ✅ 100.00% (1/1)
src/factories/LidoStrategyFactory.sol ✅ 100.00% (12/12) ✅ 100.00% (17/17) ✅ 100.00% (2/2) ✅ 100.00% (2/2)
src/factories/MorphoCompounderStrategyFactory.sol ✅ 100.00% (13/13) ✅ 100.00% (19/19) ✅ 100.00% (2/2) ✅ 100.00% (2/2)
src/factories/MultistrategyVaultFactory.sol ✅ 100.00% (74/74) ✅ 100.00% (64/64) ✅ 100.00% (31/31) ✅ 100.00% (18/18)
src/factories/PaymentSplitterFactory.sol ✅ 100.00% (58/58) ✅ 100.00% (69/69) ✅ 100.00% (22/22) ✅ 100.00% (10/10)
src/factories/RegenEarningPowerCalculatorFactory.sol ✅ 100.00% (14/14) ✅ 100.00% (14/14) ✅ 100.00% (0/0) ✅ 100.00% (4/4)
src/factories/RegenStakerFactory.sol ✅ 100.00% (32/32) ✅ 100.00% (29/29) ✅ 100.00% (2/2) ✅ 100.00% (10/10)
src/factories/SkyCompounderStrategyFactory.sol ✅ 100.00% (12/12) ✅ 100.00% (17/17) ✅ 100.00% (2/2) ✅ 100.00% (2/2)
src/factories/SparkStrategyFactory.sol ✅ 100.00% (2/2) ✅ 100.00% (1/1) ✅ 100.00% (0/0) ✅ 100.00% (1/1)
src/factories/yieldDonating/YearnV3StrategyFactory.sol ✅ 100.00% (12/12) ✅ 100.00% (16/16) ✅ 100.00% (0/0) ✅ 100.00% (2/2)
src/factories/yieldSkimming/RocketPoolStrategyFactory.sol ✅ 100.00% (12/12) ✅ 100.00% (17/17) ✅ 100.00% (2/2) ✅ 100.00% (2/2)
src/guards/KeeperBotGuard.sol ✅ 100.00% (32/32) ✅ 100.00% (30/30) ✅ 100.00% (8/8) ✅ 100.00% (6/6)
src/mechanisms/AllocationMechanismFactory.sol ✅ 100.00% (50/50) ✅ 100.00% (53/53) ✅ 100.00% (4/4) ✅ 100.00% (10/10)
src/mechanisms/BaseAllocationMechanism.sol ✅ 97.01% (65/67) ✅ 97.18% (69/71) ✅ 100.00% (7/7) ✅ 95.83% (23/24)
src/mechanisms/TokenizedAllocationMechanism.sol ✅ 99.76% (422/423) ✅ 99.57% (466/468) ✅ 95.38% (124/130) ✅ 100.00% (81/81)
src/mechanisms/mechanism/OctantQFMechanism.sol ✅ 100.00% (37/37) ✅ 100.00% (37/37) ✅ 100.00% (14/14) ✅ 100.00% (7/7)
src/mechanisms/mechanism/QuadraticVotingMechanism.sol ✅ 100.00% (69/69) ✅ 100.00% (87/87) ✅ 100.00% (17/17) ✅ 100.00% (17/17)
src/mechanisms/voting-strategy/ProperQF.sol ✅ 100.00% (85/85) ✅ 100.00% (104/104) ✅ 100.00% (13/13) ✅ 100.00% (15/15)
src/regen/RegenEarningPowerCalculator.sol ✅ 100.00% (35/35) ✅ 100.00% (31/31) ✅ 100.00% (6/6) ✅ 100.00% (8/8)
src/regen/RegenStaker.sol ✅ 100.00% (16/16) ✅ 100.00% (14/14) ✅ 100.00% (1/1) ✅ 100.00% (5/5)
src/regen/RegenStakerBase.sol ✅ 99.59% (241/242) ✅ 99.59% (242/243) ✅ 97.33% (73/75) ✅ 100.00% (34/34)
src/regen/RegenStakerWithoutDelegateSurrogateVotes.sol ✅ 100.00% (20/20) ✅ 100.00% (17/17) ✅ 100.00% (4/4) ✅ 100.00% (5/5)
src/strategies/periphery/BaseHealthCheck.sol ✅ 100.00% (32/32) ✅ 100.00% (24/24) ✅ 100.00% (14/14) ✅ 100.00% (9/9)
src/strategies/periphery/BaseYieldSkimmingHealthCheck.sol ✅ 100.00% (41/41) ✅ 100.00% (39/39) ✅ 100.00% (18/18) ✅ 100.00% (10/10)
src/strategies/periphery/UniswapV3Swapper.sol ✅ 100.00% (23/23) ✅ 100.00% (30/30) ✅ 100.00% (7/7) ✅ 100.00% (4/4)
src/strategies/yieldDonating/AaveV3Strategy.sol ✅ 100.00% (39/39) ✅ 100.00% (48/48) ✅ 100.00% (9/9) ✅ 100.00% (7/7)
src/strategies/yieldDonating/ERC4626Strategy.sol ✅ 100.00% (26/26) ✅ 100.00% (30/30) ✅ 100.00% (2/2) ✅ 100.00% (7/7)
src/strategies/yieldDonating/MorphoCompounderStrategy.sol ✅ 100.00% (26/26) ✅ 100.00% (30/30) ✅ 100.00% (2/2) ✅ 100.00% (7/7)
src/strategies/yieldDonating/PrivilegedYieldDonatingTokenizedStrategy.sol ✅ 100.00% (16/16) ✅ 100.00% (14/14) ✅ 100.00% (4/4) ✅ 100.00% (6/6)
src/strategies/yieldDonating/SkyCompounderStrategy.sol ✅ 100.00% (88/88) ✅ 100.00% (77/77) ✅ 100.00% (24/24) ✅ 100.00% (19/19)
src/strategies/yieldDonating/SparkStrategy.sol ✅ 100.00% (8/8) ✅ 100.00% (9/9) ✅ 100.00% (6/6) ✅ 100.00% (1/1)
src/strategies/yieldDonating/YearnV3Strategy.sol ✅ 100.00% (26/26) ✅ 100.00% (30/30) ✅ 100.00% (2/2) ✅ 100.00% (7/7)
src/strategies/yieldDonating/YieldDonatingTokenizedStrategy.sol ✅ 100.00% (23/23) ✅ 100.00% (26/26) ✅ 100.00% (5/5) ✅ 100.00% (2/2)
src/strategies/yieldSkimming/BaseYieldSkimmingStrategy.sol ✅ 100.00% (8/8) ✅ 100.00% (5/5) ✅ 100.00% (0/0) ✅ 100.00% (5/5)
src/strategies/yieldSkimming/LidoStrategy.sol ✅ 100.00% (4/4) ✅ 100.00% (3/3) ✅ 100.00% (0/0) ✅ 100.00% (2/2)
src/strategies/yieldSkimming/PrivilegedYieldSkimmingTokenizedStrategy.sol ✅ 100.00% (16/16) ✅ 100.00% (14/14) ✅ 100.00% (4/4) ✅ 100.00% (6/6)
src/strategies/yieldSkimming/RocketPoolStrategy.sol ✅ 100.00% (4/4) ✅ 100.00% (3/3) ✅ 100.00% (0/0) ✅ 100.00% (2/2)
src/strategies/yieldSkimming/YieldSkimmingTokenizedStrategy.sol ✅ 99.61% (254/255) ✅ 99.39% (326/328) ✅ 96.43% (81/84) ✅ 100.00% (28/28)
src/utils/AddressSet.sol ✅ 100.00% (34/34) ✅ 100.00% (34/34) ✅ 100.00% (12/12) ✅ 100.00% (7/7)
src/zodiac-core/LinearAllowanceExecutor.sol ✅ 100.00% (24/24) ✅ 100.00% (24/24) ✅ 100.00% (7/7) ✅ 100.00% (7/7)
src/zodiac-core/modules/LinearAllowanceSingletonForGnosisSafe.sol ✅ 100.00% (91/91) ✅ 100.00% (100/100) ✅ 95.24% (20/21) ✅ 100.00% (16/16)

@skimaharvey skimaharvey requested review from 0xferit and qGolem March 4, 2026 11:22
@skimaharvey skimaharvey marked this pull request as ready for review March 4, 2026 11:22
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.

1 participant