You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Transfer overpayment is time-locked when it doesn’t need to be #336
When someone sends more than the transfer fee on a name transfer, DotnsNameEscrow.chargeTransferFee puts the extra on the time-locked refund ledger (_creditRefund). The payer has to wait out the release cooldown before they can claim it with claimRefund.
This is just money the payer sent by mistake, so there’s no reason to lock it. Registration handles the same case differently: the extra is sent back right away, or credited to _pendingWithdrawals so the payer can claim it immediately with claimWithdrawal.
Transfer overpayment is now the only thing that still writes to the time-locked ledger.
Expected behavior
Transfer overpayment should be claimable right away, the same as registration overpayment. Crediting it to _pendingWithdrawals would do it.
Once that’s done, the time-locked ledger (RefundEntry, claimRefund, claimRefundsBatch, refundEntry and the listing views, RefundCredited) has no users left. It could be removed, but that changes the ABI.
Reproduction
Transfer a name in a way that needs a fee, and send more than the fee.
The extra shows up as a RefundCredited entry with availableAt set to now plus the cooldown.
Calling claimRefund before then reverts.
Additional context
The code is in DotnsNameEscrow.chargeTransferFee (the _creditRefund(params.payer, overpayment, ...) call). For comparison, see the overpayment handling at the end of DotnsRegistrarController.register.
Activity