### Diagramming Thunder Loan It's at this point in a review that I may begin to diagram out what I currently understand of a protocol. A diagram of Thunder Loan might look something like this:  From what we understand so far, a `liquidity provider` calls `deposit` on the `ThunderLoan` contract passing a token which has an `AssetToken` contract created by the protocol owner at an earlier point. `Thunder Loan` then calculates how many asset tokens to `mint` in exchange for the `deposit` - updates the exchange rate (for some reason) then `mints` the `asset tokens`, closing the transaction off with a `safeTransfer` call to the underlying token, transferring it to the `AssetToken` contract for storage.
It's at this point in a review that I may begin to diagram out what I currently understand of a protocol. A diagram of Thunder Loan might look something like this:

From what we understand so far, a liquidity provider calls deposit on the ThunderLoan contract passing a token which has an AssetToken contract created by the protocol owner at an earlier point.
Thunder Loan then calculates how many asset tokens to mint in exchange for the deposit - updates the exchange rate (for some reason) then mints the asset tokens, closing the transaction off with a safeTransfer call to the underlying token, transferring it to the AssetToken contract for storage.
Patrick walks through diagramming Thunder Loan with emphasis on visualization using diagrams for better comprehension.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Duration: 25min
Duration: 1h 18min
Duration: 35min
Duration: 2h 28min
Duration: 5h 03min
Duration: 5h 22min
Duration: 4h 33min
Duration: 2h 01min
Duration: 1h 40min