PWNFeeCalculator.sol is a library that implements the calculateFeeAmount function to calculate the fee amount based on the protocol fee and the amount lent.
2. Important links
3. Contract details
PWNFeeCalculator.sol is written in Solidity version 0.8.16
calculateFeeAmount
Overview
Based on the protocol fee and the amount that is being lent, this function calculates and returns the fee and the amount lent with the fee deducted.
This function takes two arguments supplied by the caller:
uint16fee - Fee value in basis points. The value of 100 is a 1% fee.
uint256loanAmount - Amount of an asset used as a loan credit.