A neat library that enables marketplace/lending protocol offers to define conditions under which they are valid. Handy for dynamic NFTs 🤙
It's not easy to use dynamic NFTs, which value can be decreased by the owner at any time, as collateral in lending protocols. It is not impossible, but it requires bundling that NFT and waiting for an offer from a lender.
This library aims to solve this issue by implementing additional conditions under which offers are valid. Thanks to that, lenders can create offers that are (1) more flexible, (2) cannot be rugged by the owner, and (3) valid for an original collection.
The project is divided into two libraries:
Users can define more complex logical expressions that can be used to determine if an offer is valid or not. Such offers could be:
The code is concise and quite self-explanatory. Interested files are ExpressionEvaluator.sol and some fork testing in ExpressionEvaluator.fork.t.sol.
Developed with Foundry. I haven't used any sponsor technologies, but it can be used on any EVM chain 😉 haven't seen any such offer flexibility anywhere.
EthGlobal wants me to add more information, but I don't believe judges are going to read all of it. Let's save them some energy and make it short.