Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Error Handling for SendCoins Function #6

Open
slendermaan opened this issue Mar 6, 2023 · 0 comments
Open

Need Error Handling for SendCoins Function #6

slendermaan opened this issue Mar 6, 2023 · 0 comments

Comments

@slendermaan
Copy link

slendermaan commented Mar 6, 2023

Credit to : HelloBloc

@fadeev

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"

Related-Code

Ignite - REF

Crytic - REF

You can use this to check your own code for this series of problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant