Skip to content

docs(tips): TIP-1028, Address-Level Receive Policies#3791

Open
0xKitsune wants to merge 62 commits intomainfrom
kit/tip-1028
Open

docs(tips): TIP-1028, Address-Level Receive Policies#3791
0xKitsune wants to merge 62 commits intomainfrom
kit/tip-1028

Conversation

@0xKitsune
Copy link
Copy Markdown
Contributor

Supersedes #3173, rewrites the spec for readability without changing the protocol design.

This PR introduces TIP-1028, which extends TIP-403 with address-level receive policies that let a receiver control which TIP-20 tokens they accept and who can send them. When a transfer or mint is blocked by a receive policy, the funds are sent to escrow instead and can later be claimed by the receiver or a designated recovery contract.

jenpaff and others added 29 commits March 17, 2026 18:52
Updates TIP-1028 to use escrowed handling for blocked TIP-20 inbounds, clarify claim and recovery semantics, and document Tempo-specific integration behavior.

Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-authored-by: malleshpai <5857042+malleshpai@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019dab7c-efa4-7608-9058-7380358fbdb7
Co-authored-by: Amp <amp@ampcode.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com>
Co-authored-by: malleshpai <5857042+malleshpai@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019dab7c-efa4-7608-9058-7380358fbdb7
Co-authored-by: Amp <amp@ampcode.com>
Copy link
Copy Markdown
Contributor

@0xrusowsky 0xrusowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this progressive narrative describing components incrementally works way better, nice

Comment thread tips/tip-1028.md Outdated
Comment thread tips/tip-1028.md

The blocked balance for each TIP-20 token sits in that token's `balances[ESCROW_ADDRESS]` slot.

### Restrictions on `ESCROW_ADDRESS`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also mention that escrow address doesn't accrue tip20 rewards

Copy link
Copy Markdown
Contributor Author

@0xKitsune 0xKitsune May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to explicitly reject this? Would allowing it break any assumptions?

It feels more like a user error that can be reversed, but otherwise expected behavior? This would be the same as a user setting their rewards address as an address they do not have access to. Lmk if I am overlooking something here though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strong opinion. if it's easy enough i would say escrow can't receive rewards, just so that we're minimizing chances of unclaimable rewards floating around?

Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Co-authored-by: malleshpai <mallesh.pai@gmail.com>
Comment thread tips/tip-1028.md Outdated
Comment thread tips/tip-1028.md Outdated
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md Outdated
Comment thread tips/tip-1028.md
- `kind`: `TRANSFER` or `MINT`.
- `memo`: original memo for memo-bearing paths, `bytes32(0)` otherwise.
- `blockedAt`: block timestamp captured at receipt creation.
- `blockedNonce`: monotonically increasing global disambiguator assigned at receipt creation.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a nonce?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suppose the same block has multiple blocked transfers with the same other entries (e.g. same sender, no memo, transfer, etc etc). the nonce ensures uniqueness

Comment thread tips/tip-1028.md Outdated
Comment thread tips/tip-1028.md Outdated
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Comment thread tips/tip-1028.md
Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
0xrusowsky and others added 4 commits May 5, 2026 10:08
review feedback

---------

Co-authored-by: 0xKitsune <0xKitsune@protonmail.com>
Co-authored-by: 0xKitsune <77890308+0xKitsune@users.noreply.github.com>
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.

6 participants