Closed brozorec closed 1 year ago
@brozorec from a quick glance it seems to me that you can encode in the arguments whichever address you want receiver
to be. This can be the router on chain B or an arbitrary address. However, if you are trying to call the router in Chain B, then you are intending most likely intending to add calldata
to do something else. Which means, you should instead use xTransferWithCalldata
.
If we are looking to just create a "Dispatcher", that will authenticate just to make "xCall" the slow path, then that should probably be its own contract in my opinion.
This becomes irrelevant after #285 gets resolved.
The affected flow is: deposit+borrow on chain A and transfer the borrowed amount to chain B.
We call
xTransfer
action on the router of chain A that sets the end user address as a receiver, not the router's address of chain B as it's the case inxTransferWithCalldata
. https://github.com/Fujicracy/fuji-v2/blob/566a32e5c2b391e86c79be8a765dff33c70c6a1a/packages/protocol/src/routers/ConnextRouter.sol#L150-L159The effect of it is that Connext passes the transfer through the fast path and deducts 0.05% as a fee. This creates 2 problems: