Oiler Nafta → Flash-Owned!

Tomasz Kajetan Stańczak
Oiler Network
Published in
6 min readNov 9, 2021

--

Escapades

While working on the Infrastructure (gas, hashrate) Forwards AMM, the Oiler team had to touch a few side-projects.

First of all, 0xMarcello focused on L1 storage verification with the help of Cairo which will probably result in in a beginning of closer collaboration on the storage verifier code (https://github.com/OilerNetwork/starknet-l1-storage-proof) which we will need to track the long term volatility of parameters and settlements of forwards products. The code is still in its early stages but we are happy to work closer with the StarkWare team and the community on its implementation.

https://en.eipss-eg.org/reality-of-tourism-in-egypt-bet-wttc-and-government/

Hacking

Separately, the Oiler dev team went to ETHLisbon and built the zk-Proof of Membership project together with the Nethermind devs and ended up as one of the winning teams. The team members included @AdamMocarski → our lead front-end dev and design coordinator, @0xMarcello Oiler’s L2 researcher and Solidity dev, @vicnaum1 → our co-CTO, @guiiheise from the Nethermind/Flashbots team and @LiquidityChaser who has recently been working on Oiler Governance (still under construction). You can see them here, on the ETHLisbon winners stage, proudly presenting their Oiler swag.

And here still deep at work…

Nafta

Now, the story of the new supporting product that we are deploying soon (contracts ready, design seems fine and we are just wiring front and V1 of the contracts).

In the last days of October we were discussing the idea of flash-loaning NFTs and it felt for a moment like a fun project — you could flash a punk! This discussion led to the realization that flash-loaned NFTs would behave in many cases exactly like you were the owner of them (you can flash-loan them every single time when you would normally use the NFT) and you don’t need to lock any collateral for that!

So, the mechanism is simple:

  • the owner of an NFT pools it with the Oiler Nafta pool and sets the single loan price
  • the item is flash-loanable
  • whenever you need to flash-loan a punk or Axie, or some LP NFT for a single transaction, you can do that as long as you return the original NFT into the pool at the end of the transaction, together with the loan cost paid to the pool
  • if you do not return the original NFT, the transaction reverts (all very similar to the standard flash-loan mechanism)

Some more research gave us an idea of a long-term NFT borrowing solution:

  • the owner of an NFT pools it with the Oiler Nafta pool and sets the borrowing rate (per block) and the maximum borrowing period (say, 90 days)
  • someone borrows the NFT for 90 days but the ownership is not transferred from the pool to the new owner — instead they only get a flash-ownership:
  • they receive a wrapper NFT representing the borrowed asset (which they can trade, transferring the flash-ownership)
  • they become the only address that is allowed to flash-loan the asset from the pool (even the owner cannot!)
  • in all the active ownership cases the NFT behaves like it was owned by the flash-owner
Ape in Flash!

DeFi Awesome Flash-owned NFTs

Now, this is mildly exciting for the punks or Axies, or your apes (letting you belong to the club for the summer while someone else enjoys the payment on their asset for 90 days) and it becomes really great when you apply it to the NFTs representing DeFi assets.

Imagine, an NFT representing an asset that accrues payments over time (a bond, for example). You can pool it in Nafta for 90 days, with initial zero accrued value. Then a new flash-owner becomes the only address who is capable to claim the accrued value over the next 90 days.

So, think of a bond that pays a fixed coupon every 3 months. You can sell it to someone who will be able to claim the coupon payment. Fixed for fixed is not so exciting but if the bond pays a floating rate which is bound to a rate on some other asset then you can swap your floating cashflow for a fixed payment. After anyone flash-owns the NFT, they receive a wrapper NFT that can be traded with others (it represents a time-limited ownership of the underlying NFT)

One more example — imagine an real estate NFT that accrues rent over time which can be withdrawn actively by the owner. With the Oiler Nafta flash-owned NFTs can provide the rent payments to the borrower while returning to the owner without risk at the end of the term.

Nafta as a primitive for both NFTs and DeFi

Once again, summarize, what makes Nafta such a cool tool?

  • the owner of the NFT is not at risk of losing their asset like it would be in the collateralized lending (nftfi.com, pawn.fi, renft.io)
  • the borrower can use the NFT similarly to owning it:
  • for getting access to events, games, etc
  • for claiming payouts/rewards on temporarily owned digital assets
  • it allows DeFi borrowing without counterparty risk for the assets that accrue value over time

Why in Oiler? It creates for us a great tool for a secondary market for all the Oiler NFT assets that we are working on now. You will be able to flash-loan and flash-own them.

https://prezentacii.org/prezentacii/prezentacii-po-ekonomike/132686-nafta.html

Look also at!

We would like to be the ones and only but we quickly learnt that we are not the only building in the area. Check out what the guys from Rentable have built by following Emiliano at EmilianoBonassi.

Nafta L2

The Oiler team spent quite a lot of time over the last few months exploring various L2 protocols so we want to bring Nafta up there! Here’s the game plan — We are first going to deploy Nafta on Ethereum Mainnet and some time after we will deploy on several other EVM compatible chains. Currently we are looking at StarkNet friendly solutions as we expect StarkNet to become the home for the biggest NFT protocols (think of the Alpha versions in November), xDAI, Polygon, and potentially other chains.

We are excited to see the various Nafta use cases the community comes up with, so feel free to share your ideas with us on Telegram and Discord! Until the next time!

— Oiler Network team

--

--