{
    "Function": "addValue",
    "File": "contracts/Vault.sol",
    "Parent Contracts": [
        "contracts/interfaces/IVault.sol"
    ],
    "High-Level Calls": [
        "SafeERC20"
    ],
    "Internal Calls": [
        "valueAll",
        "onlyMarket"
    ],
    "Library Calls": [
        "safeTransferFrom"
    ],
    "Low-Level Calls": [],
    "Code": "function addValue(\n        uint256 _amount,\n        address _from,\n        address _beneficiary\n    ) external override onlyMarket returns (uint256 _attributions) {\n\n        if (totalAttributions == 0) {\n            _attributions = _amount;\n        } else {\n            uint256 _pool = valueAll();\n            _attributions = (_amount * totalAttributions) / _pool;\n        }\n        IERC20(token).safeTransferFrom(_from, address(this), _amount);\n        balance += _amount;\n        totalAttributions += _attributions;\n        attributions[_beneficiary] += _attributions;\n    }"
}