Skip to content

Lesson 13: availableBorrowsETH.toString() * 0.95 * (1/daiPrice.toNumber()) #2011

Answered by krakxn
ManuWeb3 asked this question in Q&A
Discussion options

You must be logged in to vote

They serve to make the logic more definitive (i.e. conclusive) and as type-conversions are not computationally intensive, it does not hurt to use it as a "precaution" and hence, acts like a mini conditional.

An additional point to be made is that it so because we are using an external contract, but from my rationale the above is the primary reason as to why we do this.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ManuWeb3
Comment options

@krakxn
Comment options

@ManuWeb3
Comment options

@krakxn
Comment options

Answer selected by ManuWeb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants