FeeDistributor

FeeDistributor receives fees from Pair and distributes them to the DAO wallet and Bribe. The owner can adjust the fee distribution rate to the DAO, the DAO wallet address, the Bribe contract address, and the associated pair.

setFeeRateToDao

Allows the owner to set the fee rate for DAO.

function setFeeRateToDao(
    uint _feeRateToDao) external onlyOwner

Parameters:

Name
Type
Description

_feeRateToDao

uint

New fee rate for DAO, stored in 1e18.

setDaoWallet

Allows the owner to set the DAO wallet address.

function setDaoWallet(
    address _daoWallet) external onlyOwner

Parameters:

Name
Type
Description

_daoWallet

address

New address for the DAO wallet.

setBribe

Allows the owner to set the Bribe contract address.

Parameters:

Name
Type
Description

_bribe

address

New address for the Bribe contract.

setPair

Allows the owner to set the DysonPair contract address, along with the corresponding pair tokens.

Parameters:

Name
Type
Description

_pair

address

New address for the DysonPair contract.

distributeFee

Distributes fees collected from the DysonPair to the DAO wallet and Bribe according to the feeRateToDao.

_calculateFee

Internal function to calculate the fee distribution to DAO and Bribe for a given token.

Parameters:

Name
Type
Description

_token

address

Address of the token.

Return Values:

Name
Type
Description

feeToDAO

uint

Fee amount to be sent to the DAO.

feeToBribe

uint

Fee amount to be sent to the Bribe contract.

Last updated