Skip to content

distribute() is a no-op — it only emits an event #27

Description

@Escelit

Description:
RentDistributor::distribute is documented as "triggers yield distribution for a property" but its implementation is:

pub fn distribute(env: Env, prop_id: u64) {
    env.events().publish(...);
}

No tokens move, no per-holder accounting is updated. The README describes automated pro-rata streaming, but the function does nothing on-chain. Yield is only realised via pending_yield / claim which require the user to pull it themselves.

Expected behaviour:
Either implement push-distribution across all holders (enumerating them), document clearly that the model is pull-only (and rename/remove distribute), or add a batch-claim helper.

Labels: bug, contracts, rent-distributor

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions