
A Helper Contract to Facilitate Undelegating ZRX
ZRX stakers are encountering problems when preparing their staked ZRX for withdrawal. This issue primarily affects users connecting to the 0x portal via MetaMask with a hardware wallet. A common problem arises from the need to correctly encode two sets of tuple parameters for the moveStake function, which is necessary to undelegate stake and prepare it for withdrawal at the next epoch. Many users, including those using Etherscan or certain hardware wallets, have found this encoding process ch...

A Universal Oracle for DeFi built as a Uniswap v4 Hook
AbstractWe introduce a novel approach to constructing a Proof of Stake (PoS) resistant oracle system by leveraging Uniswap V4 hooks to mitigate price manipulation through automated backrunning of transactions. The proposed mechanism aims to enhance the reliability and integrity of on-chain price oracles in a PoS environment.IntroductionIn the context of decentralized finance (DeFi) on Ethereum and other EVM chains, oracles play a crucial role in providing price information for smart contracts...

2025: DeFi's Oracle Reckoning
How Rigoblock Built Resilience When the Market Broke
A protocol for organizing digital tokens



A Helper Contract to Facilitate Undelegating ZRX
ZRX stakers are encountering problems when preparing their staked ZRX for withdrawal. This issue primarily affects users connecting to the 0x portal via MetaMask with a hardware wallet. A common problem arises from the need to correctly encode two sets of tuple parameters for the moveStake function, which is necessary to undelegate stake and prepare it for withdrawal at the next epoch. Many users, including those using Etherscan or certain hardware wallets, have found this encoding process ch...

A Universal Oracle for DeFi built as a Uniswap v4 Hook
AbstractWe introduce a novel approach to constructing a Proof of Stake (PoS) resistant oracle system by leveraging Uniswap V4 hooks to mitigate price manipulation through automated backrunning of transactions. The proposed mechanism aims to enhance the reliability and integrity of on-chain price oracles in a PoS environment.IntroductionIn the context of decentralized finance (DeFi) on Ethereum and other EVM chains, oracles play a crucial role in providing price information for smart contracts...

2025: DeFi's Oracle Reckoning
How Rigoblock Built Resilience When the Market Broke
A protocol for organizing digital tokens

Subscribe to Rigoblock

Subscribe to Rigoblock
<100 subscribers
<100 subscribers
This pull request introduces the concept of Flash Allowances to Uniswap's Permit2, utilizing Ethereum's new transient storage opcodes (tload and tstore). Flash Allowances provide a mechanism for setting token approvals that are valid only for the duration of the transaction in which they are used. This approach aims to enhance both user experience and gas efficiency while maintaining or improving security.
Transient Storage: The PR uses tload and tstore to set and retrieve temporary allowances. Upon transaction completion, this storage is automatically reset, eliminating the need for explicit approval revocation.
Security Considerations: Although the automatic reset feature reduces potential risks, integrators are encouraged to explicitly reset approvals when no longer needed to guard against potential misuse scenarios, like transactions being manipulated through phishing attacks.
Simplified Approval Process: Users no longer need to separately approve Permit2 (once per expiration period) and then sign the transaction. The approval and transaction are combined into a single step.
Enhanced Safety: Flash allowances inherently expire, reducing the risk of approvals being exploited post-transaction.
Reduced Need for Re-Approvals: Only an initial approval to the Permit2 contract is necessary, with all subsequent allowances handled temporarily.
Smart Wallet Compatibility: This feature naturally aligns with smart wallets and accounts, promoting better integration and usability for users employing such setups.
Backward Compatibility: The new system is designed to work alongside the existing Permit2 functionalities, allowing for a smooth transition for existing integrators.
Gas Savings with Transient Storage: By not permanently storing allowance data, significant gas costs associated with storage operations are avoided.
Reduced Overhead Compared to Signed Approvals: Unlike EIP-712 signed approvals, flash allowances do not incur the cost of signature verification.
Potential Reduction in MetaTransaction Usage: This could make traditional meta transactions less necessary, offering a more secure and gas-efficient alternative.
EIP-3074 Compatibility: With the advent of account abstraction, this feature could seamlessly integrate with master contracts, setting flash approvals as part of the transaction flow where needed.
For Developers: Integrators should understand that while this PR provides flash allowances, they might still want to reset transient allowances post-transaction for clarity or security purposes. Documentation will be updated to include best practices for integrating with flash allowances. As this process does not involve modifications of state, if is also very efficient in terms of extra gas savings.
Backward Compatibility: Current Permit2 users can continue with existing features, and upgrade to utilize flash allowances at their convenience.
This feature is proposed to streamline token transfers within the Ethereum ecosystem, making DeFi interactions more user-friendly, secure, and cost-effective.
This pull request introduces the concept of Flash Allowances to Uniswap's Permit2, utilizing Ethereum's new transient storage opcodes (tload and tstore). Flash Allowances provide a mechanism for setting token approvals that are valid only for the duration of the transaction in which they are used. This approach aims to enhance both user experience and gas efficiency while maintaining or improving security.
Transient Storage: The PR uses tload and tstore to set and retrieve temporary allowances. Upon transaction completion, this storage is automatically reset, eliminating the need for explicit approval revocation.
Security Considerations: Although the automatic reset feature reduces potential risks, integrators are encouraged to explicitly reset approvals when no longer needed to guard against potential misuse scenarios, like transactions being manipulated through phishing attacks.
Simplified Approval Process: Users no longer need to separately approve Permit2 (once per expiration period) and then sign the transaction. The approval and transaction are combined into a single step.
Enhanced Safety: Flash allowances inherently expire, reducing the risk of approvals being exploited post-transaction.
Reduced Need for Re-Approvals: Only an initial approval to the Permit2 contract is necessary, with all subsequent allowances handled temporarily.
Smart Wallet Compatibility: This feature naturally aligns with smart wallets and accounts, promoting better integration and usability for users employing such setups.
Backward Compatibility: The new system is designed to work alongside the existing Permit2 functionalities, allowing for a smooth transition for existing integrators.
Gas Savings with Transient Storage: By not permanently storing allowance data, significant gas costs associated with storage operations are avoided.
Reduced Overhead Compared to Signed Approvals: Unlike EIP-712 signed approvals, flash allowances do not incur the cost of signature verification.
Potential Reduction in MetaTransaction Usage: This could make traditional meta transactions less necessary, offering a more secure and gas-efficient alternative.
EIP-3074 Compatibility: With the advent of account abstraction, this feature could seamlessly integrate with master contracts, setting flash approvals as part of the transaction flow where needed.
For Developers: Integrators should understand that while this PR provides flash allowances, they might still want to reset transient allowances post-transaction for clarity or security purposes. Documentation will be updated to include best practices for integrating with flash allowances. As this process does not involve modifications of state, if is also very efficient in terms of extra gas savings.
Backward Compatibility: Current Permit2 users can continue with existing features, and upgrade to utilize flash allowances at their convenience.
This feature is proposed to streamline token transfers within the Ethereum ecosystem, making DeFi interactions more user-friendly, secure, and cost-effective.
Share Dialog
Share Dialog
No activity yet