Skip to content

Commit

Permalink
fix: Pull FlashMinter Docs to Interface (#261)
Browse files Browse the repository at this point in the history
* feat: Standardize FlashMinter interface to keep documentation separate
* chore: Arrange interface functions correctly
* feat: Clarify comment explaining BPS

Co-authored-by: miguelmtz <[email protected]>
  • Loading branch information
Zer0dot and miguelmtzinf authored Feb 2, 2023
1 parent 7636ddd commit 809cff4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 7 additions & 9 deletions src/contracts/facilitators/flashMinter/GhoFlashMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,25 @@ import {IGhoFlashMinter} from './interfaces/IGhoFlashMinter.sol';
contract GhoFlashMinter is IGhoFlashMinter {
using PercentageMath for uint256;

/**
* @dev Hash of `ERC3156FlashBorrower.onFlashLoan` that must be returned by `onFlashLoan` callback
*/
// @inheritdoc IGhoFlashMinter
bytes32 public constant CALLBACK_SUCCESS = keccak256('ERC3156FlashBorrower.onFlashLoan');

// @inheritdoc IGhoFlashMinter
IPoolAddressesProvider public immutable override ADDRESSES_PROVIDER;
uint256 public constant MAX_FEE = 10000;

// @inheritdoc IGhoFlashMinter
uint256 public constant MAX_FEE = 10000;
IPoolAddressesProvider public immutable override ADDRESSES_PROVIDER;

// The Access Control List manager contract
IACLManager private immutable _aclManager;

// The GHO token contact
IGhoToken private immutable GHO_TOKEN;

/**
* @dev Percentage fee of the flash-minted amount used to calculate the flash fee to charge
* Expressed in bps. A value of 100 results in 1.00%
*/
// The flashmint fee, expressed in bps (a value of 10000 results in 100.00%)
uint256 private _fee;

// The GHO treasury, the recipient of fee distributions
address private _ghoTreasury;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,23 @@ interface IGhoFlashMinter is IERC3156FlashLender, IGhoFacilitator {
);

/**
* @notice Returns the address of the Aave Pool Addresses Provider contract
* @return The address of the PoolAddressesProvider
* @notice Returns the required return value for a successful flashmint
* @return The required callback, the keccak256 hash of 'ERC3156FlashBorrower.onFlashLoan'
*/
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
function CALLBACK_SUCCESS() external view returns (bytes32);

/**
* @notice Returns the maximum value the fee can be set to
* @return The maximum percentage fee of the flash-minted amount that the flashFee can be set to (in bps).
*/
function MAX_FEE() external view returns (uint256);

/**
* @notice Returns the address of the Aave Pool Addresses Provider contract
* @return The address of the PoolAddressesProvider
*/
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);

/**
* @notice Updates the percentage fee. It is the percentage of the flash-minted amount that needs to be repaid.
* @dev The fee is expressed in bps. A value of 100, results in 1.00%
Expand Down

0 comments on commit 809cff4

Please sign in to comment.