This project is not audited !
If you want to use this project, perform your own verification or send an email to admin@cmta.ch.
The IncomeVault
is a prototype to perform coupon-payment dividend with a CMTAT and the snapshotModule
The dividends are deposited in a Vault. Once the claims are open, a token holder can then perform a claim to get his dividends for a given period.
Currently, the vault supports only dividend under the form of another ERC-20 and it is suitable for the following use-case:
- Dividends in ERC-20 compatible, which could be an ERC-20 stablecoin such as USDC or USDT for example
- Interest paid out at given intervals which shall be a configurable parameter (i.e. every 6 months, every 1 year)
For the specific case where dividends are distributed in shares, meaning additional payout of the “existing” CMTAT Token, it is not currently supported due to the following reasons: - With the current architecture, depending on when you decide to mint the new tokens, you will increase the total supply used to compute the token holder shares. Therefore, you will reduce the dividends distributed to the token holders. - In general, for yield tokens, the formula used can be different.
- The dividends can be paid with ERC-20 tokens as described in the ERC-20 specification
- The shares used to compute the dividends part have to be a smart contract implementing the interface
ICMTATSnapshot
as described in the CMTAT. This interface is responsible to provide information on the token holder's balance and the total supply for a specific time.
The contracts are NOT audited, do not use them for production without auditing them !!!!
A report performed with Slither is available in doc/audits/tools
Here a summary of the main documentation
Document | Link/Files |
---|---|
Specification | doc/specification |
Technical documentation | doc/technical |
Solidity API (docgen) | doc/solidityAPI/index.md |
Toolchain | doc/TOOLCHAIN.md |
Surya report | doc/surya |
See also Taurus - Equity Tokenization: How to Pay Dividend On-Chain Using CMTAT
The project is developed with Foundry
You must first initialize the submodules, with
forge install
See also the command's documentation.
Later you can update all the submodules with:
forge update
See also the command's documentation.
The official documentation is available in the Foundry website
forge build --contracts src/IncomeVault.sol
You can run the tests with
forge test
To run a specific test, use
forge test --match-contract <contract name> --match-test <function name>
See also the test framework's official documentation, and that of the test commands.
Unfortunately, tests are performed with a proxy deployment and the coverage command does not work currently in this configuration.
- Perform a code coverage
forge coverage --ffi
- Generate LCOV report
forge coverage --ffi --report lcov
- Generate
index.html
forge coverage --ffi --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage
See Solidity Coverage in VS Code with Foundry & Foundry forge coverage