Skip to content

Allow modules to self declare their module account addresses as blocked #11369

Open
@colin-axner

Description

Summary

Allow modules to decide if their module account addresses should not allowed to be sent to via the bank keeper instead of asking chain developers to determine this.

Problem Definition

Many modules use invariants to compare internal tracking of module account balances against the actual balance in the bank keeper. If a send to the module account occurs without going through this module and updating its internal tracking, then invariants may break and unknown behaviour could occur depending on the module implementation.

Currently we protect against this by disallowing bank sends to module accounts by default, but it is possible for chain developers to override this (likely not understanding the consequences)

Proposal

Modules should self declare if it is safe for their module account to be sent to. In the situation where all sends to the module account must go through the module itself, it doesn't make sense to allow chain developers to override this functionality. Self declaration will lower user error

I'm unaware of where the SDK architecture is heading so I don't have a concrete proposal, but wanted to open for discussion in case someone with more context than me has a nice idea.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions