Skip to content

blackeagle0188/tangelo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How it works

• We lend at the floor price of an NFT collection. By doing this, we can extend loans more widely and create a unified liquidity pool for lending. • There are 4 key events in our contract.

  1. Deposit - lend ether to the vault
  2. Withdraw - withdraw ether plus gains / losses
  3. Take Loan - deposit an NFT and get a loan in return
  4. Repay Loan - repay a loan, with interest.

Open questions

• Currently a vault manager will need to call whitelistCollection to change a parameter like the lending price for an NFT collection. Is the current setup gas inefficient? • What vectors for abuse am I not thinking about? • Can large whale deposits be used to take gains and subsequantly remove liquidity and abuse the system? • Can re-entrancy attacks be used in takeLoan or withdrawFunds?

TODO

• Keep 10% of the vault liquid at all times for withdraws • Clarify when vaultBalance and vaultBalanceAvailable should be adjusted.

Built with 🏗 Scaffold-ETH

everything you need to build on Ethereum! 🚀

🧪 Quickly experiment with Solidity using a frontend that adapts to your smart contract:

image

🏄‍♂️ Quick Start

Prerequisites: Node plus Yarn and Git

clone/fork 🏗 scaffold-eth:

git clone https://github.com/austintgriffith/scaffold-eth.git

install and start your 👷‍ Hardhat chain:

cd scaffold-eth
yarn install
yarn chain

in a second terminal window, start your 📱 frontend:

cd scaffold-eth
yarn start

in a third terminal window, 🛰 deploy your contract:

cd scaffold-eth
yarn deploy

🔏 Edit the smart contract Tangelo.sol in packages/hardhat/contracts 📝 Edit your frontend App.jsx in packages/react-app/src 💼 Edit your deployment scripts in packages/hardhat/deploy 📱 Open http://localhost:3000 to see the app

📚 Documentation

Documentation, tutorials, challenges, and many more resources, visit: docs.scaffoldeth.io

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published