Description
The vesting wallet's revoke function transfers unvested tokens back to admin. However, if the admin address has changed via transfer_admin before revocation, the tokens go to the new admin, not the original admin who funded the vesting.
Current behavior
let admin = get_admin(&env);
admin.require_auth();
// ...
token::TokenClient::new(&env, &get_token(&env)).transfer(
&env.current_contract_address(),
&admin, // This is the current admin, not the original funder
&unvested,
);
Expected behavior
Consider storing the original funder address separately and returning unvested tokens to them on revocation.
Why this matters
The original funder may expect their tokens back, not the new admin. This could be a legal/compliance issue.
Labels
correctness, hard
Description
The vesting wallet's
revokefunction transfers unvested tokens back to admin. However, if the admin address has changed viatransfer_adminbefore revocation, the tokens go to the new admin, not the original admin who funded the vesting.Current behavior
Expected behavior
Consider storing the original funder address separately and returning unvested tokens to them on revocation.
Why this matters
The original funder may expect their tokens back, not the new admin. This could be a legal/compliance issue.
Labels
correctness, hard