-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from neutral-protocol/refactor-interfaces
Break down fee calculator interfaces
- Loading branch information
Showing
8 changed files
with
163 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-FileCopyrightText: 2023 Neutral Labs Inc. | ||
// | ||
// SPDX-License-Identifier: UNLICENSED | ||
|
||
// If you encounter a vulnerability or an issue, please contact <info@neutralx.com> | ||
pragma solidity ^0.8.13; | ||
|
||
/// @title IFeeCalculator | ||
/// @author Neutral Labs Inc. | ||
/// @notice This interface defines methods for calculating fees. | ||
interface IFeeCalculator { | ||
/// @notice Calculates the deposit fee for a given amount. | ||
/// @param tco2 The address of the TCO2 token. | ||
/// @param pool The address of the pool. | ||
/// @param depositAmount The amount to be deposited. | ||
/// @return feeAmount The fee to be charged in pool | ||
/// tokens for this deposit. | ||
function calculateDepositFees(address tco2, address pool, uint256 depositAmount) | ||
external | ||
returns (uint256 feeAmount); | ||
|
||
/// @notice Calculates the redemption fees for a given amount. | ||
/// @param tco2 The address of the TCO2 token. | ||
/// @param pool The address of the pool. | ||
/// @param redemptionAmount The amount to be redeemed. | ||
/// @return feeAmount The fee to be charged in pool | ||
/// tokens for this redemption. | ||
function calculateRedemptionFees(address tco2, address pool, uint256 redemptionAmount) | ||
external | ||
returns (uint256 feeAmount); | ||
|
||
/// @notice Calculates the total fee among the recipients according to their shares. | ||
/// @param totalFee The total fee to be distributed. | ||
/// @return recipients The addresses of the fee recipients. | ||
/// @return feesDenominatedInPoolTokens The amount of fees each recipient should receive. | ||
function calculateFeeAmongShares(uint256 totalFee) | ||
external | ||
view | ||
returns (address[] memory recipients, uint256[] memory feesDenominatedInPoolTokens); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.