Ethervista Hardlock keeps deposited LP tokens locked while preserving ETH reward claims
Ethervista Hardlock locks liquidity provider (LP) tokens while preserving an account-specific claim to accrued ETH rewards. Its permanent multi-pool implementation has no LP withdrawal function. Timed LP staking contracts use different terms, so the receiving contract determines whether deposited LP tokens can return.
· last updated
The pair, router, and depositor ledger
The pair tracks the locking contract's share of pool fees, while Hardlock tracks each depositor's share of that entitlement. The router coordinates LP transfers and provider registration.
LP tokens represent a share of the assets in a particular pair. Depositing those tokens transfers their custody to the locking contract without removing the underlying pool assets. Traders can continue exchanging assets against the pair's reserves.
Router deposits and LP registration
A router deposit refreshes reward baselines. Claim accrued pair rewards before depositing wallet-held LPs, and claim existing Hardlock rewards before adding to that position.
The router's
hardstake
function requires a positive amount and transfers the specified tokens to the selected staking contract. For a recognized LP token, it then refreshes the sender's provider record. Finally, it calls the receiving contract's
stake
function with the amount, sender, and token address. Token approval must authorize the router to perform that transfer.
The permanent contract accepts stake calls only from the router that its configured factory identifies. It also checks that the supplied LP token is a pair registered by that factory. General ERC-20 support in the router does not make ordinary tokens eligible for this LP-only contract.
Per-pool rewards through nested Euler accounting
The permanent HARDLOCK implementation maintains a separate Euler sequence for each accepted pair.
Its
totalSupplies
mapping counts LP tokens deposited for that pair, excluding LP tokens held elsewhere. Each depositor also has a recorded balance and an Euler baseline for that pair.
The pair's own Euler accounting allocates incoming liquidity fees across its LP supply. Hardlock receives the portion attributable to its registered LP balance. Its second accounting layer divides that collected ETH across the LP tokens deposited in Hardlock for the same pair. These denominators describe different holdings, so a depositor does not automatically receive the entire pool's fees.
A depositor's accrued reward equals their recorded LP balance multiplied by the increase above their Euler baseline, with integer scaling applied. The implementation uses a scaling factor of
10**20
.
Before recording a new deposit, the locking contract reads its pending share from the pair. A positive share triggers collection and an update to Hardlock's Euler sequence for that pair. With no pending share, the contract calls the router's
updateSelf
function to register its provider balance. Only then does it increase the recorded locked supply and depositor balance.
Additional deposits and lost reward baselines
An additional deposit replaces the account's Euler baseline for that pair with the latest value, including any fees collected during the deposit call. The contract increases the recorded LP balance without separately preserving the account's earlier unclaimed entitlement. Consequently, claiming rewards before a top-up matters even though the permanent position has no lock timer to restart.
The wallet's pair-level rewards and its Hardlock rewards belong to separate records. Claiming one does not settle the other. A deposit affects the relevant pair's records; it does not reset the same account's Hardlock baseline for another pair. This separation follows the contract's account-and-pair indexing.
Pending ETH and reward claims
A claim through
claimShare(address token)
first checks whether Hardlock has uncollected ETH rewards in the selected pair. If that amount is positive, the contract collects it and updates the corresponding Euler sequence before calculating the caller's entitlement. The payout therefore can include fees that remained at the pair before the call.
The
viewShare(address token)
function also includes the effect of pending pair rewards in its calculation. It can show an entitlement before Hardlock has collected that ETH. Reading this value does not transfer funds or advance the depositor's baseline.
The returned reward amount uses wei, Ethereum's smallest ETH unit. It describes the gross entitlement. Execution gas remains a separate transaction cost.
A successful claim advances the caller's baseline for that pair and sends native ETH to the caller. It leaves the deposited LP amount unchanged. If the recipient rejects the ETH transfer, the claim reverts, including its baseline update. A positive calculated entitlement does not by itself establish a completed payout.
LP holding, transfers, and lock variants
LP holding and locking arrangements preserve different rights to principal, even when they involve the same pair's tokens. The published permanent contract, timed LP implementation, and LP template use distinct rules. Router transfers and liquidity removal also serve different purposes.
| LP arrangement | Principal handling | ETH reward accounting | Withdrawal or accounting limit |
|---|---|---|---|
| LPs held in a wallet | The wallet retains LP tokens | The pair tracks the provider's share | Balance changes can reset unclaimed fees |
| Router transfer through safeTransferLp | The recipient receives LP tokens | The recipient needs provider registration | The transfer creates no Hardlock stake record |
| Permanent multi-pool HARDLOCK | The contract retains deposited LP tokens | Separate depositor accounting for each pair | The contract has no LP withdrawal function |
| 14-day single-pair LP implementation | LP withdrawal requires the applicable lock to expire | The staking contract maintains its own Euler sequence | Adding to a stake restarts its lock |
| 21-day LP template | LP withdrawal requires the applicable lock to expire | The template allocates collected pair rewards | Balance changes reset unclaimed rewards |
| Router liquidity removal | The pair burns LP tokens and releases underlying assets | Existing pair rewards need a claim before removal | Pair burning requires five days since its initial mint |
| Permanent locking, timed staking, and pool redemption preserve different rights to LP principal. | |||
The timed implementations measure their wait from the account's recorded staking timestamp. Their withdrawal function returns LP tokens, while liquidity removal exchanges LP tokens for underlying assets. Neither operation describes an ETH reward claim. The permanent multi-pool contract supplies the reward claim without supplying either principal-return operation.
Can permanent Hardlock deposits unlock after a waiting period?
The permanent HARDLOCK contract has no waiting period that ends in an LP withdrawal. The pair's separate initial burn restriction cannot release LP tokens held inside that contract. The commitment applies to deposited LP tokens, leaving other providers' holdings outside that position. It also does not freeze the value or composition of the underlying pool assets. A timed LP stake offers a withdrawal path after its applicable lock; the permanent implementation retains the deposited LP tokens.
Frequently asked questions about Ethervista Hardlock
Can I recover LP tokens sent to permanent Hardlock without a recorded stake?
The permanent contract has no LP recovery function for tokens transferred without a recorded stake. A transfer through safeTransferLp can move LP tokens into the contract without calling its stake function. That transfer does not establish the sender's Hardlock deposit record, and the permanent contract provides no method to return those LP tokens.
Why can getStakerInfo return a different account's Hardlock reward amount?
The permanent contract's getStakerInfo uses different account contexts for its two outputs. Its deposited amount comes from the supplied account address, while its reward amount comes from viewShare, which uses the caller. A simulated read must use the intended account as its sender to obtain that account's reward calculation.
Does sending ETH directly to permanent Hardlock increase every pool's rewards?
A direct ETH payment increments the permanent contract's totalCollected counter without updating a pool's Euler sequence. Normal allocation occurs when the contract collects a specific pair's fee entitlement and updates that pair's accounting. The contract's aggregate ETH balance therefore does not establish an individual depositor's entitlement, and a direct payment does not automatically increase it.
Can one Hardlock claim collect ETH from several pairs?
The permanent contract's claimShare function processes one pair address per call. Each pair has its own locked supply and Euler sequence, so another pair's rewards do not enter that calculation. An account with deposits in several pools retains separate claim entitlements, even though the contract pays those rewards in native ETH.
Must a pool creator renounce control before LP tokens can enter permanent Hardlock?
The permanent contract does not require creator renunciation to accept LP deposits. Its admission checks require the configured router and a pair that the factory recognizes. Creator permissions govern pair settings separately from deposited balances, so placing LP tokens in Hardlock does not itself remove the creator's authority over those settings.
Can an LP permit replace the Hardlock deposit call?
An LP permit grants the router a spending allowance without creating a Hardlock deposit. The router must still execute hardstake with the receiving contract, pair address, and amount. The permit's deadline limits when its authorization can take effect; it does not create an unlock date for LP tokens deposited in the permanent contract.