Need Error Handling for SendCoins Function
slendermaan opened this issue · 0 comments
slendermaan commented
Credit to : HelloBloc
Description
In the following code content, the error handling of x.bankKeeper.SendCoins
is missing, which will result in a malicious user
being able to set the status without cost.
k.bankKeeper.SendCoins(ctx, borrower, lender, amount)
k.bankKeeper.SendCoins(ctx, borrower, lender, fee)
k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, borrower, collateral)
loan.State = "repayed"
You can use this to check your own code for this series of problems