nearForShares
nearForShares(
shares,totals):bigint
Defined in: protocol-staking-liquid-near/src/math.ts:17
NEAR that shares tokens are worth: shares × totalStaked / totalShares, rounded down. Passing this
to unstake(amount) burns at most shares (the contract rounds the burnt shares up from it).
Parameters
Section titled “Parameters”shares
Section titled “shares”bigint
totals
Section titled “totals”totalShares
Section titled “totalShares”bigint
totalStaked
Section titled “totalStaked”bigint
Returns
Section titled “Returns”bigint