livepeer / livepeer/protocol

Clarify or Utilize `round` Parameter in `PendingStake` Method

Open
#647 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
155
Forks
50
PR merge metrics
No merged PRs in 30d

Description

In the [PendingStake](https://arbiscan.io/address/0x35Bcf3c30594191d53231E4FF333E8A770453e40#readProxyContract#F19) method of the
[BondingManager](https://arbiscan.io/address/0x35Bcf3c30594191d53231E4FF333E8A770453e40#readProxyContract), the `round` parameter is currently unused:

[https://github.com/livepeer/protocol/blob/e8b6243c48d9db33852310d2aefedd5b1c77b8b6/contracts/bonding/BondingManager.sol#L935](https://github.com/livepeer/protocol/blob/e8b6243c48d9db33852310d2aefedd5b1c77b8b6/contracts/bonding/BondingManager.sol#L935)

To improve clarity and reduce potential confusion for integrators and developers, I propose one of the following actions:

1. **Update the method description and documentation** to explicitly state that the `round` parameter is currently unused, and clarify its intended purpose (if any future usage is planned).

2. **Upgrade the protocol to make use of the `round` parameter**, if there is an intended use case (e.g., allowing querying of stake at a specific round).

This change will help avoid misinterpretation and make the API more intuitive and self-explanatory for future development and integrations.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PendingStake method in contracts/bonding/BondingManager.sol around line 935 and review how its round parameter is exposed in the BondingManager interface and documentation. Determine whether the parameter has an intended use; done means either documenting that it is unused and explaining its purpose, or defining and implementing an agreed round-specific behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.