Skip to main content

VaultV2AllowlistGate

Git Source - Generated with forge doc

Inherits: IReceiveSharesGate, ISendSharesGate, IReceiveAssetsGate, ISendAssetsGate, Ownable2Step

Title: VaultV2AllowlistGate

Allowlist-based gate for VaultV2 share and asset transfers.

The owner can setAllowlist then renounceOwnership to make the stored allowlist immutable.

Management and performance fee recipients are auto-permitted for canReceiveShares, canSendShares and canReceiveAssets. canSendAssets has no fee-recipient exemption.

The effective allowlist is the stored allowlist plus the fee recipients, so it is truly frozen only if the vault curator also abdicates setManagementFeeRecipient and setPerformanceFeeRecipient.

VaultV2's forceDeallocate penalty can only be paid in vault shares, burned via a withdraw that requires canSendShares on the holder; denying it to that holder breaks this non-custodial in-kind redemption guarantee.

A restrictive canReceiveShares allowlist can break the same guarantee: if only contracts can receive shares, users never hold shares directly, and unless an allowlisted holder exposes a way to call forceDeallocate or approves an account that can, the escape hatch is unreachable.

State Variables​

allowlist​

mapping(address => Role) public allowlist;

Functions​

constructor​

constructor(address _owner) Ownable(_owner);

Parameters

NameTypeDescription
_owneraddress

setAllowlist​

Sets the allowlist roles of one or more accounts.

function setAllowlist(Role[] calldata roles) external onlyOwner;

Parameters

NameTypeDescription
rolesRole[]The roles to set. Each role specifies a user and their gate permissions.

canReceiveShares​

function canReceiveShares(address account) external view override returns (bool);

Parameters

NameTypeDescription
accountaddress

Returns

NameTypeDescription
<none>bool

canSendShares​

function canSendShares(address account) external view override returns (bool);

Parameters

NameTypeDescription
accountaddress

Returns

NameTypeDescription
<none>bool

canReceiveAssets​

function canReceiveAssets(address account) external view override returns (bool);

Parameters

NameTypeDescription
accountaddress

Returns

NameTypeDescription
<none>bool

canSendAssets​

function canSendAssets(address account) external view override returns (bool);

Parameters

NameTypeDescription
accountaddress

Returns

NameTypeDescription
<none>bool

_isFeeRecipient​

function _isFeeRecipient(address account) internal view returns (bool);

Parameters

NameTypeDescription
accountaddress

Returns

NameTypeDescription
<none>bool

Events​

VaultV2AllowlistUpdated​

event VaultV2AllowlistUpdated(
address indexed user, bool canReceiveShares, bool canSendShares, bool canReceiveAssets, bool canSendAssets
);

Parameters

NameTypeDescription
useraddress
canReceiveSharesbool
canSendSharesbool
canReceiveAssetsbool
canSendAssetsbool

Structs​

Role​

struct Role {
address user;
bool canReceiveShares;
bool canSendShares;
bool canReceiveAssets;
bool canSendAssets;
}

Properties

NameTypeDescription
useraddress
canReceiveSharesbool
canSendSharesbool
canReceiveAssetsbool
canSendAssetsbool