Airdrop Module

The AirdropModule (Etherscan)is a smart contract that enables managers to absorb tokens sent to the SetToken into the token's positions. With each SetToken, managers are able to specify 1) the airdrops they want to include, 2) an airdrop fee recipient, 3) airdrop fee, and 4) whether all users are allowed to trigger an airdrop.

Select Methods

absorb()

function absorb(ISetToken _setToken, IERC20 _token)

Valid Caller only. Absorb specified token into position. If airdropFee is defined, send portion to feeRecipient and portion to protocol feeRecipient address. Callable only by the manager unless the manager has set anyoneAbsorb to true.

Parameter Name

Type

Description

_setToken

ISetToken

Instance of the SetToken

_token

IERC20

Address of token to absorb

addAirdrop()

addAirdrop(ISetToken _setToken, IERC20 _airdrop)

Manager only. Adds new tokens to be added to positions when absorb is called.

Parameter Name

Type

Description

_setToken

ISetToken

Instance of the SetToken

_airdrop

IERC20

Component to add to airdrop list

updateFeeRecipient()

updateFeeRecipient(ISetToken _setToken, address _newFeeRecipient)

Manager only. Update address manager fees are sent to.

Parameter Name

Type

Description

_setToken

ISetToken

Instance of the SetToken

_newFeeRecipient

address

Address of new fee recipient

updateAirdropFee()

function updateAirdropFee( ISetToken _setToken, uint256 _newFee )

Manager only. Update airdrop fee percentage.

Parameter Name

Type

Description

_setToken

ISetToken

Instance of the SetToken

_newFee

uint256

Percentage, in preciseUnits, of new airdrop fee (1e16 = 1%)

initialize()

function initialize( ISetToken _setToken, AirdropSettings memory _airdropSettings )

Manager only. Initialize the module with SetToken and set initial airdrop tokens as well as specify whether anyone can call absorb.

Parameter Name

Type

Description

_setToken

ISetToken

Address of the SetToken

_airdropSettings

AirdropSettings

Struct of airdrop setting for Set including accepted airdrops, feeRecipient, airdropFee, and indicating if anyone can call an absorb

The AirdropSettings struct is constructed as follows:

struct AirdropSettings {
    address[] airdrops;                     // Array of tokens manager is allowing to be absorbed
    address feeRecipient;                   // Address airdrop fees are sent to
    uint256 airdropFee;                     // Percentage in preciseUnits of airdrop sent to feeRecipient (1e16 = 1%)
    bool anyoneAbsorb;                      // Boolean indicating if any address can call absorb or just the manager
}

Last updated