Skip to content

Commit

Permalink
Merge 01f2d01 into 4c9f635
Browse files Browse the repository at this point in the history
  • Loading branch information
kamescg committed Oct 5, 2021
2 parents 4c9f635 + 01f2d01 commit e7a5163
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion contracts/Ticket.sol
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,21 @@ contract Ticket is ControlledToken, ITicket {
}
}

/**
* @notice Creates the next TWAB for a user with a decrementing balance.
* @dev READS the user/delegate TWAB history and decrements user weighted balance.
After decreasing balance, updates the users new TWAB hisotry, and emits
an event with indexed holder and user/delegate address(s), plus the new TWAB.
* @ @param _holder Token holder (i.e. msg.sender)
* @ @param _user Delegated address for TWAB lookup (default msg.sender)
* @ @param _amount Amount transfered out of the account
*/
function _decreaseUserTwab(
address _holder,
address _user,
uint256 _amount
) internal {
TwabLib.Account storage _account = userTwabs[_user];

(
TwabLib.AccountDetails memory accountDetails,
ObservationLib.Observation memory twab,
Expand Down

0 comments on commit e7a5163

Please sign in to comment.