MIMD 0013 Native SPL support #550
GabrielePicco
started this conversation in
MIMD
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Since ATAs cannot be delegated, using SPL tokens in the ER currently requires a wrapper program that creates pseudo-ATAs, e.g.: ephemeral-rollups-spl.
While this works, it has several disadvantages:
Proposal
Create a default implementation that natively maps to ATAs during cloning in the validator. This would allow:
Proposed Implementation
At a high level, the wrapped program is simple. It contains instructions to:
A pseudo-PDA is derived from
[owner, mint, ephemeral_spl_program]
and contains abalance
field, which represents the token balance.Top-up and withdraw operations add or subtract funds from a global protocol vault (one vault per mint), while respecting and updating the owner’s balance.
Validator Cloning and Mapping
Key points:
Implementation steps:
Once the ATA is recognized, the pseudo-ATA is derived
[owner, mint, ephemeral_spl_program]
and cloned instead. If delegated, it becomes a writable ATA in the ER.Beta Was this translation helpful? Give feedback.
All reactions