transientoor

Implement transient allowance for token standards

Websitegithub
  • 1,723 Raised
  • 201 Views
  • 1 Judges

Tags

  • DeFi
  • Tooling

Categories

  • Dyson Finance
  • ETHTaipei Community Finalist
  • Optimism

Gallery

Description

Transientoor

Transientoor is a collection of token standards that incorporate the functionality of EIP1153 transient storage opcodes. Specifically, we have modified ERC20 and ERC721 implementations for the purpose of this hackathon. With Transientoor, one can swap tokens without approvals on popular DEXes and lend ERC721 tokens without escrows.

Understanding EIP-1153

EIP-1153 introduced a transient storage mechanism to Ethereum, allowing storage to be utilized only for the duration of a transaction. This EIP facilitates cleaner smart contract designs and allows for more gas optimisations. Essentially, it introduces a new writable location for data that persists only for the duration of a transaction. Since the blockchain has no need to retain transient data post-transaction, nodes will not need to store this data on disk as well, making it much cheaper as compared to regular storage.

Gas Efficiency with Transientoor

Transientoor achieves gas efficiency through the use of tload and tstore operations, each consuming 100 gas, to update the allowance of owner and spender pairs. This is a significant improvement over the conventional sload and store opcodes, which cost 2,100 gas (for setting a storage slot from 0 to non-zero) and 100 gas (for updating a non-zero value), respectively.

Swapping ERC20s without approvals

Since we can temporarily grant users the ability to spend our ERC20s, we can abstract away the "approval" step when dealing with ERC20s, especially with DEXes. We have created a Chrome extension that modifies Uniswap's interface to swap tokens without the need for approval, which can be found at https://transientoor.vercel.app/about. Note that these tokens will need to support the transient opcode feature, an example can be found in our contracts repo.

Loaning ERC721s without escrows

In our ERC721 standard, when you "lend" an NFT, we store the deadline on chain to indicate when you can retrieve the NFT back from the borrower.  We also store your information as the original owner of the NFT for retrieval purposes.

Then, after the deadline, you can retrieve the NFT back immediately from whoever the current owner is, without having to worry about who has "borrowed" / "sold" it away. 

This is currently available on our main site at https://transientoor.vercel.app/.

DeFi with Dyson Finace

Dyson Finance provies Dual Investment which provide investor with more predictable returns, and Dynamic AMM which protects traders from MEV attacks and optimize protocol fee income.By leveraging transient token on Dyson Finance, gas efficiency and investor experience for transactions can be improved significantly. You can simply create pool and swap on Dyson Finance with ONE transaction. We've deployed a transient token pool on Sepolia, try it now!

Bounty Application

We have deployed our contracts to Ethereum Sepolia and Optimism Sepolia as these are the only chains that support the Cancun EVM version as of now. Since EVMs support the common token standards (ERC20, ERC721) we can realistically launch our dApp on these chains as well.


Links

Main site: https://transientoor.vercel.app/

GitHub: https://github.com/marcuspang/transientoor


Attachments