Lendefi DAO
  • Home
  • ❱ audit
    • Ecosystem
    • GovernanceToken
    • InvestmentManager
    • InvestorVesting
    • LendefiGovernor
    • PartnerVesting
    • TeamManager
    • TeamVesting
    • Treasury
    • Deploy
  • ❱ ecosystem
    • Ecosystem
    • GovernanceToken
    • InvestmentManager
    • InvestorVesting
    • LendefiGovernor
    • PartnerVesting
    • TeamManager
    • TeamVesting
    • Treasury
  • ❱ interfaces
    • IECOSYSTEM
    • IINVMANAGER
    • ILENDEFI
    • IPARTNERVESTING
    • ITEAMMANAGER
    • ITEAMVESTING
    • ITREASURY
    • IVESTING
  • ❱ deploys
  • ❱ tokenomics
Powered by GitBook
On this page
  • State Variables
  • TEAM_ALLOCATION_PERCENT
  • MIN_CLIFF
  • MAX_CLIFF
  • MIN_DURATION
  • MAX_DURATION
  • UPGRADE_TIMELOCK_DURATION
  • PAUSER_ROLE
  • MANAGER_ROLE
  • UPGRADER_ROLE
  • ecosystemToken
  • supply
  • totalAllocation
  • timelock
  • version
  • pendingUpgrade
  • allocations
  • vestingContracts
  • __gap
  • Functions
  • nonZeroAddress
  • nonZeroAmount
  • constructor
  • receive
  • initialize
  • pause
  • unpause
  • addTeamMember
  • scheduleUpgrade
  • cancelUpgrade
  • upgradeTimelockRemaining
  • _authorizeUpgrade
  1. ❱ ecosystem

TeamManager

PreviousPartnerVestingNextTeamVesting

Last updated 2 months ago

Inherits:, Initializable, PausableUpgradeable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable

Creates and deploys team vesting contracts

Implements a secure and upgradeable team manager with upgrade timelock

Notes:

  • security-contact: security@nebula-labs.xyz

  • copyright: Copyright (c) 2025 Nebula Holding Inc. All rights reserved.

  • oz-upgrades:

State Variables

TEAM_ALLOCATION_PERCENT

Team allocation percentage of total supply (18%)

uint256 private constant TEAM_ALLOCATION_PERCENT = 18;

MIN_CLIFF

Minimum cliff period (3 months)

uint64 private constant MIN_CLIFF = 90 days;

MAX_CLIFF

Maximum cliff period (1 year)

uint64 private constant MAX_CLIFF = 365 days;

MIN_DURATION

Minimum vesting duration (1 year)

uint64 private constant MIN_DURATION = 365 days;

MAX_DURATION

Maximum vesting duration (4 years)

uint64 private constant MAX_DURATION = 1460 days;

UPGRADE_TIMELOCK_DURATION

Upgrade timelock duration (4 days)

uint256 private constant UPGRADE_TIMELOCK_DURATION = 3 days;

PAUSER_ROLE

AccessControl Pauser Role

bytes32 internal constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

MANAGER_ROLE

AccessControl Manager Role

bytes32 internal constant MANAGER_ROLE = keccak256("MANAGER_ROLE");

UPGRADER_ROLE

AccessControl Upgrader Role

bytes32 internal constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");

ecosystemToken

governance token instance

ILENDEFI internal ecosystemToken;

supply

amount of ecosystem tokens in the contract

uint256 public supply;

totalAllocation

amount of tokens allocated so far

uint256 public totalAllocation;

timelock

timelock address

address public timelock;

version

number of UUPS upgrades

uint32 public version;

pendingUpgrade

Pending upgrade information

UpgradeRequest public pendingUpgrade;

allocations

token allocations to team members

mapping(address src => uint256 amount) public allocations;

vestingContracts

vesting contract addresses for team members

mapping(address src => address vesting) public vestingContracts;

__gap

gap for future storage variables (50 - 8 existing variables = 42)

uint256[22] private __gap;

Functions

nonZeroAddress

Modifier to check for non-zero address

modifier nonZeroAddress(address addr);

Parameters

Name
Type
Description

addr

address

The address to check

nonZeroAmount

Modifier to check for non-zero amount

modifier nonZeroAmount(uint256 amount);

Parameters

Name
Type
Description

amount

uint256

The amount to check

constructor

Note: oz-upgrades-unsafe-allow: constructor

constructor();

receive

Prevents receiving Ether

receive() external payable;

initialize

Initializes the team manager contract

Sets up the initial state of the contract with core functionality

function initialize(address token, address timelock_, address multisig) external initializer;

Parameters

Name
Type
Description

token

address

The address of the ecosystem token contract

timelock_

address

The address of the timelock controller

multisig

address

The address receiving UPGRADER_ROLE

pause

Pauses all contract operations

Prevents execution of state-modifying functions

function pause() external onlyRole(PAUSER_ROLE);

unpause

Resumes all contract operations

Re-enables execution of state-modifying functions

function unpause() external onlyRole(PAUSER_ROLE);

addTeamMember

Create and fund a vesting contract for a new team member

function addTeamMember(address beneficiary, uint256 amount, uint256 cliff, uint256 duration)
    external
    nonReentrant
    whenNotPaused
    onlyRole(MANAGER_ROLE)
    nonZeroAddress(beneficiary)
    nonZeroAmount(amount);

Parameters

Name
Type
Description

beneficiary

address

The address of the team member

amount

uint256

The amount of tokens to vest

cliff

uint256

The cliff period in seconds

duration

uint256

The vesting duration in seconds after cliff

scheduleUpgrade

Schedules an upgrade to a new implementation

function scheduleUpgrade(address newImplementation)
    external
    nonZeroAddress(newImplementation)
    onlyRole(UPGRADER_ROLE);

Parameters

Name
Type
Description

newImplementation

address

Address of the new implementation

cancelUpgrade

Cancels a previously scheduled upgrade

Only callable by addresses with UPGRADER_ROLE

function cancelUpgrade() external onlyRole(UPGRADER_ROLE);

upgradeTimelockRemaining

Returns the remaining time before a scheduled upgrade can be executed

function upgradeTimelockRemaining() external view returns (uint256);

Returns

Name
Type
Description

<none>

uint256

timeRemaining The time remaining in seconds, or 0 if no upgrade is scheduled or timelock has passed

_authorizeUpgrade

Authorizes and processes contract upgrades with timelock enforcement

Internal override for UUPS upgrade authorization

function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE);

Parameters

Name
Type
Description

newImplementation

address

Address of the new implementation contract

Git Source
ITEAMMANAGER