Skip to main content

Distribution contracts

Protocol Revenues

Majora is generating revenues via multiple sources:

  • Strategies performance fees
  • Portal swap fees
  • Operation gas fees

This revenues are collected into dedicated protocol contracts, swapped to USDC and transferred into the MainFeeCollector contract at the end of each epoch.

Revenues Distribution

50% of the protocol revenues will go to StkMAJ and StkMAJLP holders, distributed by the FeeDistributor contract, and 50% to the MajoraDAO treasury.

The revenues distribution is performed in USDC.


FeeReceiver contracts

The FeeDistributor contract is responsible for distributing the protocol revenues to specific contracts compatible with the FeeReceiver interface.

interface IFeeReceiver is IERC20 {
function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);
function totalSupplyAt(uint256 snapshotId) external view returns (uint256);
function stake(address onBehalfOf, uint256 amount) external;
function redeem(address to, uint256 amount) external;
function getBalanceOfAndTotalSupplyAt(address _user, uint256 _snapshotId) external view returns (uint256, uint256);
function currentSnapshotId() external view returns (uint256);
function snapshot() external returns (uint256);
}
  • balanceOfAt: This function returns the balance of a specific account at a specific snapshot.
  • totalSupplyAt: This function returns the total supply of the token at a specific snapshot.
  • stake: This function allows a user to stake a specific amount of tokens.
  • redeem: This function allows a user to redeem a specific amount of tokens.
  • getBalanceOfAndTotalSupplyAt: This function returns the balance of a specific account and the total supply of the token at a specific snapshot.
  • currentSnapshotId: This function returns the current snapshot id.
  • snapshot: This function creates a new snapshot.

FeeDistributor contract

Fees manager functions

info

This functions are restricted to address which have the FEE_MANAGER_ROLE on the Access Manager

addFeeReceiver

This function is used to add a new fee receiver to the FeeDistributor contract with the corresponding weight.

function addFeeReceiver(
address _target,
uint256 _weight
) external;

updateFeeReceiverWeight

This function is used to update the weight of a fee receiver to the FeeDistributor contract.

function updateFeeReceiverWeight(
uint256 _feeReceiver,
uint256 _weight
) external;

releaseFees

This function is used to release the fees to the fee receivers. This functio can be caled only by the MainFeeCollector contract.

function releaseFees(uint256 _epochId, uint256 _amount) external returns (uint256 feeDistributed);

Users functions

claim

This function is used to claim the fees earned.

    function claim(address _onBehalfOf, uint256[] memory _feeReceivers, uint256[][] memory _snapshotIds) external;

Where:

  • _onBehalfOf is the address to claim the fees on behalf of
  • _feeReceivers is the fee receiver IDs
  • _snapshotIds is snapshot IDs

getClaimableAt

This function is used to get the claimable fees for a specific user.

    function getClaimableAt(address _user, uint256 _feeReceiver, uint256 _snapshotId) external view returns (uint256);

Where:

  • _user is the address to get the claimable fees for
  • _feeReceiver is the fee receiver ID to get the claimable fees for
  • _snapshotId is the snapshot ID to get the claimable fees for

MainFeeCollector contract

This contract is used to collect the fees from the protocol and distribute them to the fee receivers and DAO treasury.

newEpochDistribution

This function is used to start a new epoch and distribute accumulated fees to the fee receivers and DAO treasury. This function is restricted to address which have the FEE_MANAGER_ROLE on the Access Manager.

function newEpochDistribution(uint256 _epochId) external;

harvest

This function is used to put the fees of the main fee collector in Aave V3 pool when they are waiting to be distributed. This has been implemented to increase the protocol revenues of next epochs.

function harvest(uint256 _epochId) external;

MajoraTokenVesting contract

The MajoraTokenVesting contract is responsible for distributing the $MAJ tokens to specific addresses in function of their vesting schedule.

It is used to distribute airdrop, investors vesting, etc.

This contract has been forked from AbdelStark's token-vesting-contracts github repository.