Skip to content

@superfluid:claimable

Amount a member can claim from a GDA pool right now (accrued earnings not yet reflected in their balance).

⚗️ Experimental — available at next.evmcrispr.com.

Returns: number

@superfluid:claimable(pool member)
NameTypeDescription
pooladdressGDA pool address
memberaddressPool member
# Earnings a disconnected member can claim after an instant distribution
load sim
sim:fork --using anvil (
sim:set-balance @me 2000e18
superfluid:wrap 1000e18 into xDAIx
superfluid:create-pool $pool xDAIx
superfluid:set-units 1 to 0x8790B75cF2BD36a2502A24e0E16AA1B23eBeBC71 in $pool
superfluid:distribute 400e18 xDAIx to $pool
sim:expect @bool(@superfluid:claimable($pool 0x8790B75cF2BD36a2502A24e0E16AA1B23eBeBC71) == 400e18)
)

Read getClaimableNow(member) at assertion time and pick the claimable balance (word 0). Earnings accrue against the timestamp of the block that executes the batch, not the one it was built against.