Skip to content

Conversation

@shahthepro
Copy link
Collaborator

Code Changes

WIP - TBD

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 0% with 278 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.35%. Comparing base (172f9c4) to head (e401fa1).

Files with missing lines Patch % Lines
...s/strategies/crosschain/AbstractCCTPIntegrator.sol 0.00% 77 Missing ⚠️
...strategies/crosschain/CrossChainMasterStrategy.sol 0.00% 70 Missing ⚠️
...strategies/crosschain/CrossChainRemoteStrategy.sol 0.00% 63 Missing ⚠️
...rategies/crosschain/AbstractCCTPMessageRelayer.sol 0.00% 33 Missing ⚠️
...strategies/crosschain/AbstractCCTP4626Strategy.sol 0.00% 19 Missing ⚠️
contracts/contracts/utils/BytesHelper.sol 0.00% 11 Missing ⚠️
...proxies/InitializeGovernedUpgradeabilityProxy2.sol 0.00% 2 Missing ⚠️
...s/contracts/strategies/Generalized4626Strategy.sol 0.00% 2 Missing ⚠️
...tracts/proxies/create2/CrossChainStrategyProxy.sol 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2715      +/-   ##
==========================================
- Coverage   41.10%   37.35%   -3.76%     
==========================================
  Files         126      134       +8     
  Lines        5778     6056     +278     
  Branches     1537     1608      +71     
==========================================
- Hits         2375     2262     -113     
- Misses       3401     3792     +391     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

pragma solidity ^0.8.0;

/**
* @title OUSD Yearn V3 Remote Strategy Mock - the Mainnet part
Copy link
Member

Choose a reason for hiding this comment

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

"- the Mainnet part" should probably be "- the L2 chain part"

* @author Origin Protocol Inc
*/

contract CrossChainRemoteStrategyMock {
Copy link
Member

Choose a reason for hiding this comment

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

Remove is a better name than Slave :)

address public immutable cctpHookWrapper;

// USDC address on local chain
address public immutable baseToken;
Copy link
Member

Choose a reason for hiding this comment

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

we can rename this to usdcToken?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a good point. Since we would only be dealing with USDC with CCTP

}

function _setFeePremiumBps(uint32 _feePremiumBps) internal {
require(_feePremiumBps <= 3000, "Fee premium too high"); // 30%
Copy link
Member

Choose a reason for hiding this comment

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

The limit can be much more conservative here I think. Say 5bp?

Though since we are using standard transfers we might hardcode this to 0

);
}

function handleReceiveUnfinalizedMessage(
Copy link
Member

Choose a reason for hiding this comment

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

I think we might need to implement this, but should we revert when this function gets called. We should only be receiving finalized messages as a result of plain message or standard CCTP token transfer

return message.extractSlice(8, message.length);
}

function _encodeDepositMessage(uint64 nonce, uint256 depositAmount)
Copy link
Member

Choose a reason for hiding this comment

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

I think the:

  • _encodeDepositMessage
  • _decodeDepositMessage
  • _encodeDepositAckMessage
  • _decodeDepositAckMessage
  • _encodeWithdrawMessage
  • _decodeWithdrawMessage
  • _encodeWithdrawAckMessage
  • _decodeWithdrawAckMessage
  • _encodeBalanceCheckMessage
  • _decodeBalanceCheckMessage

Would fit into a separate contract that isn't part of CCTP abstract integrator. This way the Abstract integrator can be used by the OUSD L2 strategy that holds the funds on the mainnet.

Maybe they can be moved into a new AbstractCCTPStrategyIntegrator that inherits from AbstractCCTPIntegrator

sparrowDom and others added 11 commits December 16, 2025 16:50
* fix deploy files

* minor rename

* add calls to Morpho Vault into a try catch

* refactor hook wrapper

* don't revert if withdraw from underlying fails

* use checkBalance for deposit/withdrawal acknowledgment

* update message in remote strategy

* remove unneeded functions
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.

3 participants