Function: getProfit()
This function calculates and returns the current profit of the vault by comparing the total position value with the vault's recorded position.
Branches and code coverage
Intended branches
Calculates profit when
totalPosition
is greater than or equal tovaultPosition
.
Negative behavior
Revert if
vaultPosition
exceedstotalPosition
.