Resource Locking and Intents
In the context of Rhinestone Intents, resource locks are decoupled from the underlying bridge and moved closer to the user account – account-native resource locks. This innovation delivers two core improvements to crosschain transactions: speed and cost efficiency. Specifically, account-native resource locks eliminate the need to wait for origin chain finality, allowing for optimistic execution of intents on the destination chain before processing claim requests on the origin chain against the user account. The fact that claim transactions are delayed also allows for batched claims and improved routing, leading to gas and price optimizations at scale.Speed: Near-Instant Execution
Traditional cross-chain bridges require waiting for origin chain finality. Account-native resource locks eliminate this wait by providing onchain guarantees that a user cannot double-spend the same tokens once committed to an intent.
Efficiency: Gas and Route Optimization
Resource Locks enable transaction batching and optimal routing decisions that significantly reduce the total cost of crosschain operations for both users and applications.
Types of Resource Locks
There are two types of resource locks:- Offchain resource locks: Locks are implemented entirely offchain via a co-signer directly integrated into the smart account as a root validator.
- Onchain resource locks: Locks are implemented onchain through a contract that stores resource locked funds and coordinates intent resolution between committed parties.