The way we currently charge the cross-msg fee when users want to send cross-net messages is bit counter-intuitive. If a user sends a request to send X FIL the fee is deducted from the amount they requested to send, ending up in the arrival of only X - fee FIL to the destination. This is not the way blockchains usually work. The correct behavior is:
The user sends a request to send X FIL.
The blockchain/actor checks that the account has at least X + fee FIL in its balance, and deducts it from it.
X FIL arrive at destination.
The reason why we didn't go with this approach is because the gateway can't deduct balance directly from an account actor without the owner sending enough FILs in the transaction. We should explore to what extent we can implement this fully on-chain in the actor. Worst case scenario, we implement the IPC agent so for cross-net messages it always sends the amount requested by the user plus the fee, so the underlying behavior is the one users are currently used to (so we would be handling the UX through the off-chain frontend instead of fully on-chain in the gateway actor).
The way we currently charge the cross-msg fee when users want to send cross-net messages is bit counter-intuitive. If a user sends a request to send
X FIL
the fee is deducted from the amount they requested to send, ending up in the arrival of onlyX - fee FIL
to the destination. This is not the way blockchains usually work. The correct behavior is:X FIL
.X + fee FIL
in its balance, and deducts it from it.X FIL
arrive at destination. The reason why we didn't go with this approach is because the gateway can't deduct balance directly from an account actor without the owner sending enough FILs in the transaction. We should explore to what extent we can implement this fully on-chain in the actor. Worst case scenario, we implement the IPC agent so for cross-net messages it always sends the amount requested by the user plus the fee, so the underlying behavior is the one users are currently used to (so we would be handling the UX through the off-chain frontend instead of fully on-chain in the gateway actor).