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
I'd like to open a discussion on the potential addition of dynamic dispatch capabilities to the Aptos Move language and MoveVM. This proposal stems from the limitations we're encountering when trying to implement advanced DeFi applications, particularly intent-based trading systems, on the Aptos blockchain.
Background
Intent-based trading systems, such as CoWSwap (formerly Gnosis Protocol v2) on Ethereum, rely heavily on the ability to execute arbitrary or semi-arbitrary code paths based on solver-provided solutions. This flexibility is crucial for creating truly universal and efficient DeFi aggregators.
Current Limitations
The static dispatch nature of Move, while excellent for security and performance in many scenarios, presents significant challenges when attempting to implement flexible, extensible DeFi protocols. Specifically:
Limited Interoperability: It's challenging to create systems that can interact with arbitrary contracts or protocols without updating the core contract.
Reduced Adaptability: New DeFi innovations often require contract updates, reducing the system's ability to quickly adapt to market changes.
Constrained Solver Strategies: Off-chain solvers are limited in the complexity of execution strategies they can propose, potentially leading to suboptimal trades.
Comparison with EVM Capabilities
On Ethereum, protocols like CoWSwap leverage dynamic dispatch to:
Allow solvers to propose complex, multi-step execution paths.
Interact with new protocols without core contract updates.
Implement sophisticated cross-protocol strategies for better price execution.
For example, CoWSwap's settlement contract(GPv2Settlement) includes:
function executeInteractions(GPv2Interaction.Data[] calldatainteractions) internal {
for (uint256 i; i < interactions.length; ++i) {
GPv2Interaction.Data calldata interaction = interactions[i];
GPv2Interaction.execute(interaction); // looking at execute(), you'll see a low-level assembly call()
}
}
Potential Benefits
Enhanced DeFi Capabilities: Enabling more complex and adaptable trading protocols.
Increased Protocol Longevity: Reduced need for frequent solver/settlement module updates that supports newer modules as the DeFi landscape evolves.
Ecosystem Growth: Attracting more advanced DeFi projects to the Aptos ecosystem.
Considerations
This proposal has significant implications for the language design and security model of Move. Key points to address include:
Maintaining Move's strong safety guarantees while introducing dynamic elements.
Performance implications of dynamic dispatch in the MoveVM.
Potential new attack vectors and mitigation strategies.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to open a discussion on the potential addition of dynamic dispatch capabilities to the Aptos Move language and MoveVM. This proposal stems from the limitations we're encountering when trying to implement advanced DeFi applications, particularly intent-based trading systems, on the Aptos blockchain.
Background
Intent-based trading systems, such as CoWSwap (formerly Gnosis Protocol v2) on Ethereum, rely heavily on the ability to execute arbitrary or semi-arbitrary code paths based on solver-provided solutions. This flexibility is crucial for creating truly universal and efficient DeFi aggregators.
Current Limitations
The static dispatch nature of Move, while excellent for security and performance in many scenarios, presents significant challenges when attempting to implement flexible, extensible DeFi protocols. Specifically:
Comparison with EVM Capabilities
On Ethereum, protocols like CoWSwap leverage dynamic dispatch to:
For example, CoWSwap's settlement contract(
GPv2Settlement
) includes:Potential Benefits
Considerations
This proposal has significant implications for the language design and security model of Move. Key points to address include:
Beta Was this translation helpful? Give feedback.
All reactions