Skip to content

Staked tokens should be only the locked tokens, not locked + rewards #1369

@cygnusv

Description

@cygnusv

There are at least 2 places in the codebase where "staked" tokens are treated as the sum of locked and reward tokens. IMO, that's not correct, since reward tokens are unlocked and therefore can be transferred at any time, preventing their role as "collateral".

  • In Staker.current_stake:
@property
    def current_stake(self) -> NU:
        """
        The total number of staked tokens, either locked or unlocked in the current period.
        """
        stake = self.staking_agent.owned_tokens(staker_address=self.checksum_address)
        nu_stake = NU.from_nunits(stake)
        return nu_stake
  • The output of nucypher status stakers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛Broken functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions