Smart Contracts

The smart contracts are the core of the protocol's on-chain operations. They are written in Solidity and deployed on the EVM compatible blockchain. Smart contracts are based on standards, including ERC-20 (fungible tokens) and ERC-4626 (tokenized vaults), and extend OpenZeppelin contracts wherever possible to ensure robustness and security. Contract development is facilitated by Foundry, which provides a local EVM environment for development and testing. The smart contracts include:

  1. Credbull DeFi Vaults (c1): This ERC-4626 Vault contract is responsible for the creation and management of each fund. When users deposit stablecoins into the Vault, they are issued Claim Tokens, an ERC20 token representing their proportionate ownership in the Vault. The Vault keeps track of both the total balance and each investor's individual contribution. Upon maturity, the Vault determines the total returns for each investor, factoring in their initial deposit and their share of the yield. To withdraw, users exchange their Claim Tokens back for USDC.
  2. Credbull Token ($CBL) Contract (c2): this is an ERC20 Token used to reward activity on the platform and for governance. The contract includes functions for minting and distributing tokens, as well as for voting on governance proposals.
  3. Activity Reward Vault (c3): A (Gnosis) Safe smart contract wallet, designed for secure multi-signature transaction approvals. Safes are extensible with plugins for improved control and security.
  4. Credbull Treasury (c4): A (Gnosis) Safe smart contract wallet, designed for secure multi-signature transaction approvals.
  5. Private Credit Fund Vault (f1): An ERC-4626 Vault smart contract that consolidates deposits from Credbull DeFi Vaults for private credit investments. It tracks contributions and distributes earnings back to Credbull DeFi Vaults based on their investment share.
  6. User Wallets and Accounts (ext1,ext2): Users can bring their existing wallets or opt for a Circle Programmable Wallet from us. Circle wallets offer a user-friendly interface and are fortified with advanced security protocols, including multi-party computation (MPC) technology, for safe and secure transactions.
  7. Fiat On/Off-Ramp and VASP Accounts (ext3,ext4): services provided by Circle, a leading financial services provider.