Update depositUtils docs
Fix capitalization, spacing and clarify value types.
@@ -207,7 +207,7 @@ library DepositUtils {
}
/// @notice Retreive the remaining term of the deposit
- /// @dev The value is not guaranteed since block.timestmap can be lightly manipulated by miners.
+ /// @dev The return value is not guaranteed since block.timestmap can be lightly manipulated by miners.
/// @return The remaining term of the deposit in seconds. 0 if already at term
function remainingTerm(DepositUtils.Deposit storage _d) public view returns(uint256){
uint256 endOfTerm = _d.fundedAt + TBTCConstants.getDepositTerm();
@@ -220,7 +220,7 @@ library DepositUtils {
/// @notice Calculates the amount of value at auction right now.
/// @dev We calculate the % of the auction that has elapsed, then scale the value up.
/// @param _d deposit storage pointer.
- /// @return the value to distribute in the auction at the current time.
+ /// @return the value in wei to distribute in the auction at the current time.
function auctionValue(Deposit storage _d) public view returns (uint256) {
uint256 _elapsed = block.timestamp.sub(_d.liquidationInitiated);
uint256 _available = address(this).balance;
@@ -237,7 +237,7 @@ library DepositUtils {
}
/// @notice Gets the lot size in erc20 decimal places (max 18)
- /// @return uint256 lot size in erc20
+ /// @return uint256 lot size in 10**18 decimals.
function lotSizeTbtc(Deposit storage _d) public view returns (uint256){
return _d.lotSizeSatoshis * TBTCConstants.getSatoshiMultiplier();
}
@@ -368,7 +368,7 @@ library DepositUtils {
/// @notice Seize the signer bond from the keep contract.
/// @dev we check our balance before and after.
- /// @return the amount of ether seized.
+ /// @return The amount seized in wei.
function seizeSignerBonds(Deposit storage _d) internal returns (uint256) {
uint256 _preCallBalance = address(this).balance;
IBondedECDSAKeep _keep = IBondedECDSAKeep(_d.keepAddress);
@@ -379,7 +379,7 @@ library DepositUtils {
}
/// @notice Distributes the fee rebate to the Fee Rebate Token owner.
- /// whenever this is called we are shutting down.
+ /// @dev Whenever this is called we are shutting down.
function distributeFeeRebate(Deposit storage _d) internal {
TBTCToken _tbtc = TBTCToken(_d.TBTCToken);
@@ -394,10 +394,10 @@ library DepositUtils {
}
}
- /// @notice pushes ether held by the deposit to the signer group.
- /// @dev useful for returning bonds to the group, or otherwise paying them.
- /// @param _ethValue the amount of ether to send.
- /// @return true if successful, otherwise revert.
+ /// @notice Pushes ether held by the deposit to the signer group.
+ /// @dev Useful for returning bonds to the group, or otherwise paying them.
+ /// @param _ethValue The amount of ether to send.
+ /// @return True if successful, otherwise revert.
function pushFundsToKeepGroup(Deposit storage _d, uint256 _ethValue) internal returns (bool) {
require(address(this).balance >= _ethValue, "Not enough funds to send");
IBondedECDSAKeep _keep = IBondedECDSAKeep(_d.keepAddress);
