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

bug(ics29): fees cannot be refunded to blocked module account #1889

Closed
2 of 3 tasks
crodriguezvega opened this issue Aug 4, 2022 · 2 comments · Fixed by #1890
Closed
2 of 3 tasks

bug(ics29): fees cannot be refunded to blocked module account #1889

crodriguezvega opened this issue Aug 4, 2022 · 2 comments · Fixed by #1890
Assignees
Labels
29-fee type: bug Something isn't working as expected

Comments

@crodriguezvega
Copy link
Contributor

crodriguezvega commented Aug 4, 2022

Summary of Bug

It is possible to use a module account address as the refund address for packet incentivisation. However, this module account may be blocked and fees would still be escrowed, since SendCoinsFromAccountToModule does not check that the sender address is blocked.

The problem arises when:

  • fees are escrowed from a module account that is blocked,
  • if any of the fees need to be refunded, then that fails because the module account is blocked and SendCoinsFromModuleToAccount does check whether the recipient is in the blocked addresses list or not, and if it's blocked then it returns an error.

Expected Behaviour

A module account that is blocked should not be allowed to incentivize a packet.

Version

v4.0.0-rc2

Proposed solution

We should check after here in PayPacketFee in and here in PayPacketFeeAsync that the RefundAddress is not blocked and return an error otherwise.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@crodriguezvega crodriguezvega added type: bug Something isn't working as expected 29-fee labels Aug 4, 2022
@seantking seantking self-assigned this Aug 4, 2022
@AdityaSripal
Copy link
Member

So basically we have to prevent a blocked address from being the escrow payer?

@colin-axner
Copy link
Contributor

So basically we have to prevent a blocked address from being the escrow payer?

yes, otherwise they wouldn't be able to be refunded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
29-fee type: bug Something isn't working as expected
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

4 participants