Skip to content

docs: state the staked-service top-up rule in source, and correct entry 41 - #354

Merged
DavidMinarsch merged 1 commit into
mainfrom
docs/staked-service-topup-note
Sep 2, 2026
Merged

docs: state the staked-service top-up rule in source, and correct entry 41#354
DavidMinarsch merged 1 commit into
mainfrom
docs/staked-service-topup-note

Conversation

@DavidMinarsch

Copy link
Copy Markdown
Contributor

Two changes, both in this repo.

The rule, written down

Tokenomics._trackServiceDonations() reads ownerOf(serviceId) to decide top-up eligibility. For a staked service that returns the staking instance, not the person who staked it — StakingBase keeps the original caller in its own ServiceInfo.owner, so the two notions of "owner" diverge — and the staking instance holds no veOLAS. The owner leg therefore can never qualify a staked service.

That is intended: a staked service is already earning staking rewards, and an owner-qualified top-up would be a second reward stream for the same service.

The problem was that this was enforced only as a side effect of NFT custody and stated nowhere, so a reader comparing the two contracts saw two different notions of owner and no explanation. The comment says so at the point of the read.

Contract change is comment-only — 8 added lines, all //, nothing removed.

Correcting entry 41

Entry 41 was added yesterday and overstates the consequence. It said integrators "should not expect donation top-ups" for a staked service. That is too strong. The eligibility test is an OR:

topUpEligible = (IVotingEscrow(ve).getVotes(serviceOwner) >= veOLASThreshold ||
    IVotingEscrow(ve).getVotes(donator) >= veOLASThreshold) ? true : false;

so a donator whose own veOLAS is above the threshold still qualifies the donation. Only the owner leg is neutralised. The entry now shows the condition and says which half is affected, rather than implying top-ups are unavailable entirely.

I noticed this while writing the source comment — getting the comment right required reading the condition properly, which the entry had not.

…ry 41

Records in Tokenomics._trackServiceDonations why ownerOf() is the right read even
though it diverges from StakingBase's own ServiceInfo.owner for a staked service:
the NFT is held by the staking instance, that address holds no veOLAS, and a
staked service is already earning staking rewards, so an owner-qualified top-up
would be a second reward stream for the same service. Intended, not an oversight.

The comment is the whole point of the change. The rule was enforced only as a side
effect of NFT custody and written down nowhere, so a reader comparing the two
contracts saw two notions of "owner" and no explanation.

Also corrects an overstatement in entry 41, added yesterday. It said integrators
"should not expect donation top-ups" for a staked service. That is too strong: the
eligibility test is an OR over the service owner and the donator, so only the
owner leg is neutralised — a donator whose own veOLAS is above the threshold still
qualifies the donation. The entry now shows the condition and says which half is
affected.

Contract change is comment-only: 8 added lines, all //, nothing removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BV3qNR96Ua8UoNkm3pTfY7
@DavidMinarsch
DavidMinarsch force-pushed the docs/staked-service-topup-note branch from 288319a to 3f6bb59 Compare September 2, 2026 08:24
@DavidMinarsch
DavidMinarsch merged commit 607240e into main Sep 2, 2026
2 checks passed
@DavidMinarsch
DavidMinarsch deleted the docs/staked-service-topup-note branch September 2, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant