Skip to content

Commit

Permalink
Some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JossDuff committed Sep 28, 2023
1 parent e2b00ca commit 2599d32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 1 addition & 8 deletions contracts/PermissionedSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ import {EIP712} from "./lib/EIP712.sol";

error InvalidSignature();

/**
@custom:benediction DEVS BENEDICAT ET PROTEGAT CONTRACTVS MEAM
@title Permissioned Set
TODO.
@custom:date September 27th, 2023.
*/
// TODO: natspec
contract PermissionedSet is EIP712, Ownable {
/// A constant hash of the claim operation's signature.
// same typehash for wrappping and unwrapping
Expand Down
2 changes: 2 additions & 0 deletions contracts/PermissionedToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
error NotWhitelisted();
error InvalidInterestRate();

// TODO: natspec
contract PermissionedToken is PermissionedSet, ReentrancyGuard, ERC20 {
using SafeERC20 for ERC20;

Expand Down Expand Up @@ -80,6 +81,7 @@ contract PermissionedToken is PermissionedSet, ReentrancyGuard, ERC20 {
// tokenMintAmount = 100 * 0.95 = 95

// TODO: do we lose precision by dividing by 1e18?? What if interest rate is 5.5%? then tokenMintAmount = 100 * 0.945 = 94.5
// or maybe it's okay because values are stored as wei?

uint256 tokenMintAmount = (_usdcAmount * 1e18 * (1e18 - interestRateMantissa)) / 1e18;

Expand Down

0 comments on commit 2599d32

Please sign in to comment.