You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separate fee handler with oracle contracts for evm, substrate, and generic message passing as separate implementations.
Implementation details
Currently, we have this logic inside FeeHandlerWithOracle:
if(oracleMessage.msgGasLimit > 0) {
// txCost = dstGasPrice * oracleMessage.msgGasLimit * Base Effective Rate (rate between base currencies of source and dest)
txCost = oracleMessage.dstGasPrice * oracleMessage.msgGasLimit * oracleMessage.ber / 1e18;
} else {
// txCost = dstGasPrice * _gasUsed * Token Effective Rate (rate of dest base currency to token)
txCost = oracleMessage.dstGasPrice * _gasUsed * oracleMessage.ter / 1e18;
}
that determines if the processed message (deposit request) is just a basic token transfer or a generic message (msgGasLimit > 0).
This approach allows users to do funky things like set this msgGasLimit when requesting fee data from fee oracle, but then execute erc20 token bridging with this fee data. I don't know how exactly this can be used for malicious behavior, but we should split this into two different implementations of FeeHandlerWithOracle. With this approach, we can map exact implementation based on resourceID and domains inside fee router and not even worry about how this can be used for malicious activity.
Testing details
Refactor and expand unit test
Acceptance Criteria
Have three different implementations of fee handler with oracle
Passing unit tests
The text was updated successfully, but these errors were encountered:
Separate fee handler with oracle contracts for evm, substrate, and generic message passing as separate implementations.
Implementation details
Currently, we have this logic inside FeeHandlerWithOracle:
that determines if the processed message (deposit request) is just a basic token transfer or a generic message (
msgGasLimit
> 0).This approach allows users to do funky things like set this
msgGasLimit
when requesting fee data from fee oracle, but then execute erc20 token bridging with this fee data. I don't know how exactly this can be used for malicious behavior, but we should split this into two different implementations of FeeHandlerWithOracle. With this approach, we can map exact implementation based on resourceID and domains inside fee router and not even worry about how this can be used for malicious activity.Testing details
Acceptance Criteria
The text was updated successfully, but these errors were encountered: