Doubt in ThunderLoan::getCalculatedFee()
return value.
#349
Replies: 1 comment 4 replies
-
@Yashwant23, It seems like you figured it out. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, In
ThunderLoan::getCalculatedFee
first the amount is converted into weth equivalent of the token , in next step fee is calculated on weth amount and returnedbut the use of
fee
is done in such a way that it is treated as token equivalent.in
ThunderLoan::flashLoan
both
endingBalance
andstartingBalance
are amount of tokens butfee
is weth equivalent.similar to above case in
AssetToken::updateExchangeRate
(totalSupply() + fee)
are used for calculation of newexchangeRate
buttotalSupply()
returns count of ERC20 in circulation butfee
is the samefee
used inThunderLoan::flashLoan
(weth amount instead of token amount)What i think is
ThunderLoan::getCalculatedFee()
must returnfee
after converting it into token equivalentBeta Was this translation helpful? Give feedback.
All reactions