EarlyVentures
  • 👋Welcome
  • Platform
    • Walkthrough
      • Investing
      • Funding your Account
      • Monitoring Your Porfolio
      • Public stats
      • Security
    • FAQ
    • Affiliate program
  • FUNDS
    • Methodology
      • Crypto100 Fund
      • Crypto50 Fund
      • Bull Fund
      • Blossom Fund
      • Vintage Fund
      • BlueChip Fund
      • Backbone Fund
      • DEX Fund
      • CEX Fund
    • Whitepaper
      • Fund
        • Fund Contract
        • Smart Contract List
      • Fund Token
        • Fund Token Contract
        • Smart Contract List
      • Controller
        • Synthetic Controller Contract
        • Uniswap Controller Contract
      • Synthetic Token
        • Synthetic Token Contract
        • Smart Contract List
        • Proof of reserve
    • Fee
  • detf
    • Create your ETF
    • FAQ
    • Whitepaper
  • Token
    • Airdrop
    • Tokenomics
  • Exchange
    • Secondary Market
    • Uniswap
  • about
    • App
    • Twitter
    • Blog
    • Telegram
    • Reddit DETF HUB
Powered by GitBook
On this page
  • Introduction
  • Features
  • Key Components and Functions
  • Variables
  • Functions
  • Security Measures
  • Conclusion

Was this helpful?

  1. FUNDS
  2. Whitepaper
  3. Fund

Fund Contract

Details the operations of our DeFi platform's main contract, managing investments, rebalancing, and fee structures, ensuring secure and efficient asset management.

Introduction

The "Fund" contract is a central component of our DeFi platform designed to manage a portfolio of digital assets. Utilizing the Solidity programming language and deployed on the Ethereum blockchain, this contract handles the core functionalities such as asset allocation, fees management, and interactions with tokens representing fund shares.

Features

  • Upgradability: Uses UUPS (Universal Upgradeable Proxy Standard) for future-proofing and improvements without migrating assets or disrupting the existing ecosystem.

  • Security: Implements ReentrancyGuard to prevent reentrant calls, enhancing transaction security.

  • Ownership Management: Built with Ownable pattern allowing certain actions to be restricted to the contract owner.

Key Components and Functions

Variables

Variable
Type
Description

tokens

Array of Structs

List of tokens managed by the fund, each containing metadata like symbol, decimals, and associated controller.

fundToken

Contract Interface

Represents the token that participants receive as proof of their share in the fund.

currencyToken

Struct

The primary currency used for transactions within the fund.

managementFee

uint256

Annual fee percentage for managing the assets.

performanceFee

uint256

Fee based on the fund's performance relative to the high water mark.

hwm

uint256

High Water Mark (HWM) used for calculating performance fees.

Functions

Function Name
Parameters
Description

initialize

_currencyTokenAddress, _fundTokenAddress

Sets up the contract with initial token settings and permissions.

setStrategy

_tokenSymbols, _weights, _controllers

Configures the investment strategy by setting the tokens and their respective weights in the fund.

deposit

amount, receiver

Handles deposits by allocating the correct proportion of fund tokens to the depositor.

withdraw

shares, receiver

Allows withdrawals by burning the corresponding amount of fund tokens and returning the assets.

rebalance

None

Adjusts the fund's holdings to match the intended asset allocation strategy.

Security Measures

The contract includes multiple layers of security:

  • Non-reentrancy: To prevent re-entrancy attacks, critical functions such as deposit and withdraw are marked with the nonReentrant modifier.

  • Ownership Checks: Sensitive functions are restricted to the owner, preventing unauthorized access and changes to the fund's configuration.


Conclusion

The "Fund" contract provides a robust and flexible foundation for managing a decentralized investment fund. With built-in upgradeability and security features, it offers a scalable solution for asset management on the blockchain.

PreviousFundNextSmart Contract List

Last updated 1 year ago

Was this helpful?