LendingName and AffilicateCollectorName are not on the list of MsgSend-disallowed network modules
https://gitlab.com/thorchain/thornode/-/blob/v1.119.0/x/thorchain/handler_send.go#L36-42
// disallow sends to modules, they should only be interacted with via deposit messages
if msg.ToAddress.Equals(mgr.Keeper().GetModuleAccAddress(AsgardName)) ||
msg.ToAddress.Equals(mgr.Keeper().GetModuleAccAddress(BondName)) ||
msg.ToAddress.Equals(mgr.Keeper().GetModuleAccAddress(ReserveName)) ||
msg.ToAddress.Equals(mgr.Keeper().GetModuleAccAddress(ModuleName)) {
return errors.New("cannot use MsgSend for Module transactions, use MsgDeposit instead")
}
Ideally the Lending Module should contain only Derived Asset collateral (and optionally RUNE if not using a virtual RUNE balance),
with those Derived Asset amounts corresponding exactly to redeemable collateral in recorded opened loans.
Allowing non-RUNE assets to be sent to the Lending Module is clutter at best and Lending-health obfuscation at worst.
As the Lending Module uses a virtual RUNE balance and so sending RUNE to it is currently meaninless,
at this time I propose that the line
msg.ToAddress.Equals(mgr.Keeper().GetModuleAccAddress(LendingName)) ||
or an equivalent be added to the above code.
Specifically: !3090 (closed)
'Disallow MsgSend to network module LendingName'.
This can also instead be closed by the slightly-larger !3104 (merged)
'Do not allow network modules as memo final destinations'
which includes the same effect.
Update: I now note that network module AffilicateCollectorName is also not in this list (and I presume should be).