Skip to content

Commit

Permalink
Merge branch 'refactor/erc4626fees' of github.com:OpenZeppelin/openze…
Browse files Browse the repository at this point in the history
…ppelin-contracts-experimental into refactor/erc4626fees
  • Loading branch information
Amxx committed Jul 30, 2024
2 parents 30bd7e1 + 0f0dfad commit 1be9def
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contracts/token/ERC4626Fees.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
/**
* @dev ERC-4626 vault with entry/exit fees expressed in https://en.wikipedia.org/wiki/Basis_point[basis point (bp)].
*
* The `_feeOnRaw` and `_feeOnTotal` function are left unimplemented. See {ERC4626FeesOnTaxed} and
* {ERC4626FeesOnUntaxed} for possible implementations
* The `_feeOnRaw` and `_feeOnTotal` function are left unimplemented. See {ERC4626FeesExclusive} and
* {ERC4626FeesInclusive} for possible implementations
*/
abstract contract ERC4626Fees is ERC4626 {
uint256 internal constant _BASIS_POINT_SCALE = 1e4;
Expand Down Expand Up @@ -103,10 +103,10 @@ abstract contract ERC4626Fees is ERC4626 {
*@dev Variant of {ERC4626Fees} where the fee is expressed as a fraction of the total amount paid.
*
* In this version if the fee is set to 20%, and a user deposits 100 assets, then 80 assets go toward the price of the
* shares, and 20 assets go toward the payment of fees. In this case, fees correspond to 20% ot the total paid price
* shares, and 20 assets go toward the payment of fees. In this case, fees correspond to 20% of the total paid price
* and 25% of the value of the shares bought.
*/
abstract contract ERC4626FeesOnTotal is ERC4626Fees {
abstract contract ERC4626FeesExclusive is ERC4626Fees {
using Math for uint256;

/// @dev Calculates the fees that should be added to an amount `assets` that does not already include fees.
Expand All @@ -126,10 +126,10 @@ abstract contract ERC4626FeesOnTotal is ERC4626Fees {
* @dev Variant of {ERC4626Fees} where the fee is expressed as a fraction of the value of value being converted.
*
* In this version if the fee is set to 20%, and a user deposits 100 assets, then 83.33 assets go toward the price of
* the shares, and 16.66 assets go toward the payment of fees. In this case, fees correspond to 16.66% ot the total
* the shares, and 16.66 assets go toward the payment of fees. In this case, fees correspond to 16.66% of the total
* paid price and 20% of the value of the shares bought.
*/
abstract contract ERC4626FeesOnValue is ERC4626Fees {
abstract contract ERC4626FeesInclusive is ERC4626Fees {
using Math for uint256;

/// @dev Calculates the fees that should be added to an amount `assets` that does not already include fees.
Expand Down

0 comments on commit 1be9def

Please sign in to comment.