using dynamic dispatch to implement sui-style Programmable Transaction Blocks (PTBs) #281
MoonShiesty
started this conversation in
General
Replies: 1 comment 1 reply
-
There's already an AIP in progress here @MoonShiesty aptos-foundation/AIPs#448 |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
now that dynamic dispatch is live, we can implement sui-style PTBs in the aptos runtime using dynamic dispatch. while similar functionality can be achieved using move scripts, PTBs can be constructed at runtime without invoking the move compiler. this feature is heavily used in the SUI ecosystem to construct complex, multi-call transactions such as swap aggregation, on-chain arbitrage or aggregating FAs transfer from multiple stores (this is a growing problem in the aptos ecosystem, especially with the coin->fa migration).
what is a sui PTB:
why should aptos implement PTBs:
the aptos roadmap calls for using dynamic dispatch in specific cases where it has benefits to the developer without adding unacceptable security risk. since PTBs can only be used at the entrypoint of a move call, they introduce a far smaller security footprint than generalized dynamic dispatch, while improving the developer experience.
downsides:
the downside to PTBs is that they aren't checked by the move compiler. this adds security risk relative to move scripts, but i think we'll always face this trade-off when adding more ways to use dynamic dispatch
im in the process of writing an AIP for aptos PTBs. i wanted to solicit some feedback here first, curious what you all think!
Beta Was this translation helpful? Give feedback.
All reactions