Ethervista

Ethervista token and timed LP stakes share lock resets and return different assets

Ethervista token staking returns deposited tokens on withdrawal, while timed liquidity provider (LP) staking returns LP tokens. Both paths distribute accrued rewards in ETH through reward claims. In the published timed implementations, adding to a stake resets its lock, and a partial withdrawal restarts the wait for the remaining balance. Claiming rewards first preserves earnings that a balance change can erase.

· last updated

These Ethereum contracts differ in the asset returned and the accounting behind its ETH rewards. An LP staking withdrawal also leaves the underlying liquidity position intact until a liquidity-removal operation redeems the LP tokens.

Additional deposits restart the lock on the whole recorded stake

Adding tokens to an existing timed stake restarts the lock for that account's combined balance in the same contract. The stake function increases amountStaked and replaces stakingTime with the block timestamp. Each account has one timestamp in that contract, so an earlier deposit does not retain a separate maturity. Even an unlocked balance enters a fresh waiting period when the same account adds to that position.

The factory's configured router submits the stake for the depositing account. Each timed staking contract accepts that call only from the authorized router and only for its configured token. Token and LP positions therefore need their matching staking contract, even though both enter through the router's hardstake operation.

ETH accounting in token and LP staking

Token staking distributes ETH that reaches its reward pool through the supported contribution mechanism. A pool can route protocol fees directly to the 14-day token implementation, while the 21-day token template accepts ETH through contributeETH. Depositing a token does not itself establish a fixed reward rate.

LP staking adds another accounting layer. The staking contract holds LP tokens and earns the liquidity-fee share associated with that holding in the pair. It then distributes that ETH among its own stakers.

Both timed designs use Euler accounting, a cumulative record of ETH rewards per staked token unit. Each ETH contribution updates the index using the staking contract's total staked balance. A staker's baseline records the index from which that position earns.

The claim calculation multiplies the recorded stake by the increase since its baseline, with the contract's internal scaling applied. The indexed contribution allocates ETH in proportion to recorded stakes, subject to integer rounding. Changes to the total staked supply affect later index increments.

Elapsed time alone does not increase this reward index. ETH contributions or collected pair fees create the amount that the contract distributes. A lock duration describes access to principal; it does not establish an annual percentage rate or a daily ETH payment.

Can I claim ETH before the stake unlocks?

ETH reward claims in the timed token and LP implementations do not require the principal lock to expire. The claim function preserves stakingTime while moving the reward baseline forward, so claiming alone does not postpone the existing unlock.

Payment goes to the account that calls claimShare, using that account's recorded stake. Claiming leaves the deposited token or LP token balance inside the staking contract. The call still needs an existing reward sequence and a successful ETH transfer; an unlocked principal balance does not satisfy those reward-payment conditions.

The reward baseline before a balance change

Unclaimed ETH entitlements can disappear when a timed position changes its balance. The stake and withdrawal functions replace or remove the stored Euler baseline without paying that staker's existing entitlement. Claiming accrued rewards before adding or withdrawing tokens preserves the reward period that the next baseline would replace.

LP staking also distinguishes collecting ETH from the pair and paying an individual staker. Its claimShare function can collect pending pair fees within the same call that settles the caller's staking reward. The withdrawal function does not perform that personal reward claim. ETH arriving inside the staking contract does not by itself mean that the individual account has received payment.

A partial exit renews the remaining lock

A partial withdrawal reduces amountStaked without closing the position. In the timed token and LP templates, a partial withdrawal restarts the lock on the remaining balance. The contract measures that new wait from the withdrawal block's timestamp, using its own LOCK_TIME constant.

A full withdrawal follows a different final branch: the stake reaches zero, and the contract deletes its record. That deletion also removes the account's previous reward baseline. Leaving principal behind keeps an active position with a renewed timestamp, so the original deposit date no longer determines its next withdrawal eligibility.

Ethervista - A partial exit renews the remaining lock - illustration

View full-size image

Principal returned by token staking

Token staking returns the configured staking token directly to the caller after the balance and time checks pass. The contract deducts the requested amount from the recorded stake and its total staked supply. It then calls that token's transfer function. An ETH reward claim uses a different payment path, so the token withdrawal does not convert principal into ETH or sell the tokens through a liquidity pool.

LP reward accounting after withdrawal

Timed LP withdrawals return tokens through safeTransferLp, which refreshes only the sending staking contract's provider record. The recipient's record must reflect its new wallet balance before the returned tokens earn subsequent pair rewards. Calling updateSelf after receipt sets that balance and the latest pair baseline without paying earlier rewards. If the recipient already has unclaimed pair rewards, the pair's claimShare function can pay that entitlement and refresh its record together. An existing pair reward sequence is required for that claim. The staking contract's ETH entitlement and the wallet's pair entitlement belong to different reward records.

Does withdrawing LP tokens remove pool liquidity?

Withdrawing LP tokens from timed staking returns the LP position without redeeming its underlying pool assets. Liquidity removal uses a different router operation that burns LP tokens and releases the corresponding assets. The published pair implementation blocks that burn until five days after its initial liquidity mint. That pool-age restriction and the staking account's lock use different clocks, so neither one substitutes for the other.

The 14-day and 21-day contract variants

The general token and LP Hardstake templates each set LOCK_TIME to 21 days. The token-staking and timed VISTA-LP implementations published in the Deployed-Contracts collection define 14 days. A position follows the constant in the contract holding its stake, together with that account's recorded stakingTime. A general description of a two-week lock does not replace those implementation-specific terms.

Timed LP staking also appears under the Hardlock label, while a separate multi-pair Hardlock contract exposes reward claims without a principal-withdrawal function. A claimable ETH share in that contract does not imply that its LP principal will unlock later. The timed templates' withdrawal rules cannot supply a withdrawal path to that separate contract.

Withdrawal choices for an existing position

The position's contract determines whether a timed exit exists and which lock applies. A reward-only claim, a partial withdrawal, and a full withdrawal have different effects on that position.

  • Choose a reward-only claim when principal should remain staked under its existing unlock time.
  • Claim accrued staking ETH before a top-up or withdrawal replaces the reward baseline.
  • Treat a partial withdrawal as a fresh lock on the remaining balance.
  • Treat a full timed withdrawal as closing the recorded staking position.
  • After LP receipt, settle existing pair rewards through claimShare, or use updateSelf if no prior entitlement needs payment.

Questions people ask about Ethervista

How can I read a timed staking position without changing it?

The timed implementations expose getStakerInfo to read the staked amount, remaining lock time, and current indexed reward share. This view function returns information for the requested staker without withdrawing tokens or claiming ETH. Its reward figure reflects the staking contract's indexed accounting; pending pair-level ETH can require collection before it enters an LP staking contract's index.

Why does claimShare report "Nothing to claim"?

An empty Euler sequence triggers that error in the timed token and LP implementations. The LP claim function checks this condition before it attempts to collect pending rewards from the pair. Pair-level fees therefore do not bypass an empty staking index. The error describes reward-accounting state; it does not say that the principal lock has expired.

Is the token contract's ETH contribution threshold an unstaking fee?

The token template's ETH contribution threshold applies to contributeETH, not to its withdrawal eligibility checks. The withdrawal function checks the recorded stake and elapsed lock, then requires the token transfer to succeed. It does not call the contribution function or charge its threshold to release tokens. The threshold can change through the designated cost setter.

Can a contract wallet receive a staking reward payout?

A contract wallet with a recorded stake can receive an ETH claim if its receiving logic accepts the staking contract's payment. Both timed claim implementations require the ETH transfer to succeed. A rejected transfer reverts the claim, including the attempted reward-baseline update. The recipient is the calling account; the claim function has no argument for sending its reward to another address.

Does a reverted withdrawal still consume Ethereum gas?

A withdrawal transaction that executes and reverts on Ethereum still consumes gas payable in ETH. The revert rolls back the staking state changes and principal transfer, while the network charges for computation already performed. A failed attempt leaves the existing staking timestamp in place; it does not start a successful partial withdrawal's new lock.

What does totalCollected tell me about my claimable ETH?

totalCollected records cumulative ETH credited to the staking contract's reward accounting. Reward payments reduce poolBalance without subtracting from that historical counter. An LP claim can also collect fresh pair fees and increase totalCollected during the same call. Your claimable amount follows your stake and Euler baseline, so the counter is neither your personal balance nor a measure of ETH remaining in the pool.