Skip to main content

ISuperfluidPool

This is the technical reference related to the interface for any super token pool regardless of the distribution schemes.

struct PoolIndexData

struct PoolIndexData {
uint128 totalUnits;
uint32 wrappedSettledAt;
int96 wrappedFlowRate;
int256 wrappedSettledValue;
}

struct MemberData

struct MemberData {
uint128 ownedUnits;
uint32 syncedSettledAt;
int96 syncedFlowRate;
int256 syncedSettledValue;
int256 settledValue;
int256 claimedValue;
}

SUPERFLUID_POOL_INVALID_TIME

error SUPERFLUID_POOL_INVALID_TIME()

SUPERFLUID_POOL_NO_POOL_MEMBERS

error SUPERFLUID_POOL_NO_POOL_MEMBERS()

SUPERFLUID_POOL_NO_ZERO_ADDRESS

error SUPERFLUID_POOL_NO_ZERO_ADDRESS()

SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA

error SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA()

SUPERFLUID_POOL_NOT_GDA

error SUPERFLUID_POOL_NOT_GDA()

SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED

error SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED()

Event MemberUnitsUpdated

event MemberUnitsUpdated(
contract ISuperfluidToken token,
address member,
uint128 oldUnits,
uint128 newUnits
)

Parameters

NameTypeDescription
tokencontract ISuperfluidToken
memberaddress
oldUnitsuint128
newUnitsuint128

Event DistributionClaimed

event DistributionClaimed(
contract ISuperfluidToken token,
address member,
int256 claimedAmount,
int256 totalClaimed
)

Parameters

NameTypeDescription
tokencontract ISuperfluidToken
memberaddress
claimedAmountint256
totalClaimedint256

Fn transferabilityForUnitsOwner

function transferabilityForUnitsOwner(
)
external
returns (bool)

A boolean indicating whether pool members can transfer their units

Fn distributionFromAnyAddress

function distributionFromAnyAddress(
)
external
returns (bool)

A boolean indicating whether addresses other than the pool admin can distribute via the pool

Fn admin

function admin(
)
external
returns (address)

The admin is the creator of the pool and has permissions to update member units and is the recipient of the adjustment flow rate

The pool admin

Fn superToken

function superToken(
)
external
returns (contract ISuperfluidToken)

The SuperToken for the pool

Fn getTotalUnits

function getTotalUnits(
)
external
returns (uint128)

The total units of the pool

Fn getTotalConnectedUnits

function getTotalConnectedUnits(
)
external
returns (uint128)

The total number of units of connected members

Fn getTotalDisconnectedUnits

function getTotalDisconnectedUnits(
)
external
returns (uint128)

The total number of units of disconnected members

Fn getUnits

function getUnits(
address memberAddress
)
external
returns (uint128)

Parameters

NameTypeDescription
memberAddressaddressThe address of the member

The total number of units for memberAddress

Fn getTotalFlowRate

function getTotalFlowRate(
)
external
returns (int96)

The total flow rate of the pool

Fn getTotalConnectedFlowRate

function getTotalConnectedFlowRate(
)
external
returns (int96)

The flow rate of the connected members

Fn getTotalDisconnectedFlowRate

function getTotalDisconnectedFlowRate(
)
external
returns (int96)

The flow rate of the disconnected members

Fn getDisconnectedBalance

function getDisconnectedBalance(
uint32 time
)
external
returns (int256 balance)

Parameters

NameTypeDescription
timeuint32The time to query

The balance of all the disconnected members at time

Fn getMemberFlowRate

function getMemberFlowRate(
address memberAddress
)
external
returns (int96)

Parameters

NameTypeDescription
memberAddressaddressThe address of the member

The flow rate a member is receiving from the pool

Fn getClaimable

function getClaimable(
address memberAddr,
uint32 time
)
external
returns (int256)

Parameters

NameTypeDescription
memberAddraddressThe address of the member
timeuint32The time to query

The claimable balance for memberAddr at time in the pool

Fn getClaimableNow

function getClaimableNow(
address memberAddr
)
external
returns (int256 claimableBalance, uint256 timestamp)

Parameters

NameTypeDescription
memberAddraddressThe address of the member

The claimable balance for memberAddr at block.timestamp in the pool

Fn updateMemberUnits

function updateMemberUnits(
address memberAddr,
uint128 newUnits
)
external
returns (bool)

Parameters

NameTypeDescription
memberAddraddressThe address of the member
newUnitsuint128The new units for the member

Sets memberAddr ownedUnits to newUnits

Fn claimAll

function claimAll(
address memberAddr
)
external
returns (bool)

Parameters

NameTypeDescription
memberAddraddressThe address of the member

Claims the claimable balance for memberAddr at block.timestamp

Fn claimAll

function claimAll(
)
external
returns (bool)

Claims the claimable balance for msg.sender at block.timestamp

Fn increaseAllowance

function increaseAllowance(
address spender,
uint256 addedValue
)
external
returns (bool)

Parameters

NameTypeDescription
spenderaddressThe address of the spender
addedValueuint256The amount to increase the allowance by

Return Values

NameTypeDescription
[0]booltrue if successful

Increases the allowance of spender by addedValue

Fn decreaseAllowance

function decreaseAllowance(
address spender,
uint256 subtractedValue
)
external
returns (bool)

Parameters

NameTypeDescription
spenderaddressThe address of the spender
subtractedValueuint256The amount to decrease the allowance by

Return Values

NameTypeDescription
[0]booltrue if successful

Decreases the allowance of spender by subtractedValue