Assessment reports>Origami Finance>Threat Model>transfer

Function: transfer(address to, uint256 amount)

Available only for minters, so accounts with debt cannot freely transfer debt tokens. Also, minters do not need to have an approve to transfer debt tokens from any accounts. The debt tokens will be burned from the debtor. If the debtor's debt is less than amount, the transaction will revert. At first, the debtor's interest will be covered by amount and the rest of the tokens will decrease the principal. Then, the same amount of debt tokens will be minted to the to debtor, the debtor's principal will be increased by amount, and totalPrincipal will be increased.

Branches and code coverage

Intended branches

  • totalPrincipal was updated properly.

  • The msg.sender's principal and interestCheckpoint were updated properly.

  • The to's principal was increased.

Negative behavior

  • Caller is not a minter.

  • msg.sender does not have debt.

  • to is zero address.

  • amount is zero.

Zellic © 2025Back to top ↑