Innovations
What changes compared to other versions
Reentrancy Guard Added
Change: The new version inherits from
ReentrancyGuard
to prevent reentrancy attacks.Impact: This enhances the security of the contract, especially in functions like
contribute()
andrefund()
where external calls are made.
Whitelist Tier System
Change: The new version introduces a tiered whitelist system, allowing for multiple whitelist tiers with different maximum contribution amounts.
mapping(uint => uint256) public maxWhitelistAmount;
mapping(uint => mapping(address => bool)) public whitelist;
mapping(uint => address[]) public whitelistArray;
Introduces
WHITELIST_TIER_AMOUNTS
to track the number of tiers.Adds
setWhitelistTierAmounts
to adjust the number of tiers post-deployment.
Impact: Granular control over contributions based on tiers (e.g., VIP tiers, public rounds) and dynamic tier management.
Public Contribution Limit via Tier 0
Change: Public contributions are controlled via
maxWhitelistAmount[0]
(tier 0).Impact: Separates public and whitelisted contribution limits.
Whitelist End Times
Change: The new version adds
whitelistEndTime
to automatically disable tiers after a deadline.Impact: Reduces manual management of whitelist phases.
Farm Incentives and Staking
Change: Integrates
IUniV3Staker
to create staking incentives for liquidity providers.Mints
SUPPLY_TO_FARM
(100M tokens) for farm rewards.Uses
IncentiveKey
to define reward parameters.
Impact: Encourages liquidity provision through staking rewards.
Fee Mechanism
Change: Deducts a 0.5% fee (
FEE = 500
) from raised funds duringfinalizeFundraising
.Impact: Allows the protocol/owner to collect a fee from fundraising proceeds.
Signature Validation for EIP-1271
Change: Adds
isValidSignature
andsignatureHashValid
mapping for compliance with EIP-1271.Impact: Enables integration with 3rd party contracts/services requiring signature verification.
Bulk Whitelist Management
Change: Adds functions to enable/disable whitelist tiers and set end times in bulk:
setWhitelistsEnabled(uint256[] calldata, bool[] calldata)
setWhitelistEndTimes(uint256[] calldata, uint256[] calldata)
Impact: Streamlines whitelist configuration for multiple tiers.
Tier 0 Validation
Change: Explicitly prevents tier 0 from being used in whitelist management functions.
Impact: Avoids confusion between public contributions and tiered whitelists.
Dynamic Whitelist Tier Initialization
Change: Constructor initializes tiers from an input array (
_maxWhitelistAmounts
).Impact: Supports flexible tier setup during deployment.
Init function
Change: Replaced constructor with
init()
function called by factory contract (ITierraDAOFactory
).Impact: Automatic verification on blockscan for new funds
TRR Holder Whitelist Tier
Change: Added Tier 2 whitelist access for holders of
TRR
tokens (minimum balance:TRR_AMOUNT_TO_BE_WHITELISTED
, 60,000.00 by default)Impact: Allows token-holder based participation without manual whitelisting.
PTRR Points System
Change:
pointsToDistribute
tracks total points to be distributed by this fund.mintPTRR()
andburnPTRR()
called duringcontribute()
andrefund()
- users receive points for contributing to funds
Impact: Rewards contributors with points proportional to their Bera contribution.
onlyAllowed replaces onlyOwner
Change:
require((block.timestamp < fundExpiry && msg.sender == owner()) || msg.sender == factory)
Impact: The fund manager may no longer do any permissioned functions after the block expiry time (the contract is frozen for him), however the factory (Tierra DAO) is still allowed to call these functions, to be able to liquidate and manage the DAO at end of life
Last updated