Function: claimSponsorFee(address basketToken)
This function is used to claim the sponsor fee for a given basket token.
Inputs
basketToken
Control: Fully controlled by the sponsor or admin.
Constraints:
basketToken
must have the_BASKET_TOKEN_ROLE
role.Impact: The basket token to claim the sponsor fee for.
Branches and code coverage
Intended branches
Update
claimableSponsorFees
for the givenbasketToken
with zero.Call
BasketToken(basketToken).proRataRedeem(fee, sponsor, address(this))
.
Negative behavior
Revert if
basketToken
does not have the_BASKET_TOKEN_ROLE
role.Revert if the caller is not the sponsor or an admin.
Function call analysis
this._checkIfBasketToken(basketToken) -> this._basketManager.hasRole(FeeCollector._BASKET_TOKEN_ROLE, token)
What is controllable?
basketToken
.If the return value is controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters or does other unusual control flow? N/A.
BasketToken(basketToken).proRataRedeem(fee, sponsor, address(this))
What is controllable?
basketToken
andsponsor
.If the return value is controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters or does other unusual control flow? N/A.