-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AToken.handleRepayment function does not accounts for repayments made on behalf of another user #742
Comments
In which case do you need the |
@eboadom Thanks for the comment. I agree that Since it's possible to do a repayment on behalf of another user, it's interesting to know both the address of the sender and the For instance, an aToken for BPTs that are staked at the Gauge:
At this point, the |
@miguelmtzinf no opposition to having the function, my point is more that it is not a handle of repayment, it is just a hook to do an action post-transferFrom. Basically, the naming doesn't sound correct to me. |
@eboadom any suggestion? We are open to a name change (this function is internal and have never been used yet) Although |
Maybe it is fine to just keep it as is, to not increase the changes. The inconsistency for me is more high-level, as currently, transfer in on minting happens without a "hook" (the mint() itself is the hook), while this requires a hook itself. |
The
AToken.handleRepayment
function is intended to be invoked when a repayment of debt occurs, right after the funds are transferred from the user to the AToken. This function allows to add custom logic so the AToken can utilize the funds it holds by calling other parties (staking the funds on a vault, for instance).The issue is that this function only expects the address that is executing the repayment, and not the address the repayment is being made on behalf of (
onBehalfOf
). Adding this new parameter helps to account for repayments on behalf of another user.The text was updated successfully, but these errors were encountered: