Skip to content

autoforward: never send to a Kraken address that is about to expire - #7

Merged
sethforprivacy merged 1 commit into
mainfrom
cake/kraken-address-expiry
Oct 23, 2026
Merged

sethforprivacy merged 1 commit into
mainfrom
cake/kraken-address-expiry

Conversation

@sethforprivacy

Copy link
Copy Markdown

Kraken now gives deposit addresses an expiry (expiretm). The LTC ones last about 7 days, and some never expire. A deposit that lands after expiry "may not be possible" to process, or costs a recovery fee.

Kraken hands back its newest unused address until a deposit lands on it. So an address left unused by a failed pass keeps coming back until it expires, and our address code never looked at the expiry.

Change. An address must stay valid for KRAKEN_ADDRESS_MIN_VALIDITY seconds (default 86400) to be used. That covers live passes and the existing address a dry run reuses. When Kraken offers only addresses expiring sooner, that coin's pass fails with an error, so Zabbix alerts and nothing is sent.

Checked against Kraken's real lists (read-only): expiretm is a string, "0" for never. 4 BTC and 1 LTC addresses expire within 24h today, and every coin still has a valid address for a dry run.

Tests: a live BTC forward handed an address expiring in an hour raises and broadcasts nothing, while one valid for 7 days still forwards. Ignoring the expiry fails the first test. 16 tests pass.

After merging, cake-tech/ansible re-pins autoforward_version to the merge commit.

🤖 Generated with Claude Code

Kraken now gives deposit addresses an expiry (`expiretm`; the LTC
ones last about 7 days, some never expire). A deposit that lands after
expiry "may not be possible" to process, or costs a recovery fee.

Kraken hands back its newest unused address until a deposit lands on
it. So an address left unused by a failed pass (a fee check, a
broadcast error) keeps coming back until it expires, and the address
code never looked at the expiry.

An address now has to stay valid for KRAKEN_ADDRESS_MIN_VALIDITY
seconds (default 86400). The rule applies to both lists Kraken
returns, and to the existing address a dry run reuses. When Kraken
offers only addresses expiring sooner, the coin's pass fails with an
error naming the margin, so Zabbix alerts and nothing is sent.

Against Kraken's real lists today (read-only): `expiretm` comes as a
string, "0" for never. 4 BTC and 1 LTC addresses expire within 24h,
and every coin still has a valid address for a dry run.

Tests: the Kraken fake can give addresses an expiry. A live BTC forward
handed an address expiring in an hour must raise and broadcast
nothing, and one valid for 7 days still forwards. Ignoring the expiry
fails the first test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sethforprivacy
sethforprivacy merged commit d9fd857 into main Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant