← Back to home

Bazaar.finance

SolidityReactTypeScriptJavaScript

We allow for a more sustainable financing of mission critical open source projects that better aligns depositor's sense of altruism with their profit motives by introducing a new Defi money lego

Screenshots

Bazaar.finance screenshot 1
Bazaar.finance screenshot 2
Bazaar.finance screenshot 3

Problem Statement

Bazaar Finance allows developers to capture value for their work in open-source software though decentralized finance (DeFi) protocols. Thanks to lending protocols, users around the globe now have a new avenue to fund the open-source tools they find valuable. Not by dipping into their wallets, but via interest earned on their savings. Instead of having to actively give lump sums or set up recurring monthly donations, people can allocate a portion of interest they earn, passively and transparently, with the ability to withdraw their principle at any time.Bazaar gives OSS developers a recurring, predictable source of income for their work, and an avenue for depositors to earn yield on their savings after the recipient goals have been met.Depositorspool their contributions towards an OSS project, and the interest earned on the total of deposits gets allocated to the developer that maintains it. This interest is withdrawable by the developer (therecipient) at any time. Any additional interest that is surplus to the recipient's stated desiredsalarygets reallocated to depositors.📖 How it Works (above the hood)An open-source project is added to Bazaar Finance. Therecipientcan decide on thetokenthey want to be paid in, and the goal amount they wish to be paid each month (salary).Individuals who wish to fund the project candeposita specified amount of the project's chosentoken, e.g. DAIThe depositor gets minted the project'sbToken, redeemable for underlying funds when theywithdrawtheir principal (and any additional interest) from theVaultInterest on deposits accrues to the project'sVault. Every 30 days, the accrued interest gets allocated to berecipient, available to be withdrawn.If the interest accrued from the sum of deposited funds exceeds the recipient's desired monthlysalaryfor that month, additional interest earned for the remainder of that month gets allocated to depositors.Recipients canwithdrawa specifiedamountat any time.Depositors canwithdrawtheir principal (and any additional interest) at any time.Example scenario:Alice is working on a popular open-source tool, she hopes to earn 1000 DAI/month for maintaining this project. She creates a project on Bazaar FinanceBob is an avid user of Alice's tool and wants to help fund its maintenance. He deposits 100 DAI to Alice's projectBob receives 100 bTokens* for his depositMore users and supporters of Alice's tool deposit their funds, inflating the supply of Alice's project's bTokenIf the interest accrued from the sum of deposited funds exceeds Alice's goal of 1000 DAI, additional interest gets allocated to Bob and other depositorsAlice can withdraw a specifiedamountof her funds, earned through interest accrual of deposited funds, at any time.Bob can withdraw his principle of 100 DAI at any time. If Alice's salary goal has been reached, he will also receive his share of the interest that has been reallocated to depositors. This process burns Bob's balance of bTokens.* The 1-1 exchange rate only applies to the initial deposit into theVault. The exchange rate for a project's bToken is dynamic depending on how much has already been deposited into itsVault, which is why each project necessarily has its ownbTokenin addition to its ownVault. See thebTokenExchangeRatesection for more info.🎒 FeaturesInterests accrued in real-time.Interests earned on Depositors funds are proportional to the amount of deposits they have.Depositors can deposit and withdraw the principal without a lock-up period 🔒Recipient earns salary on a monthly basis.Recipient can withdraw the salary at any point in timeRecipient's salary is accrued on a rolling basis and can be rolled over to the next month 📅The contract runs autonomously without any operations required.Supports contract upgrades via Proxy Pattern

Solution

🛠 TechnologyThe smart contract was built on Ethereum usingHardhat Framework,Open Zeppelin,SolidityandTypeScriptThe client application was built withReact JS, usingweb3-react,create-eth-app,EthersJSand JavaScript (ES6)Deposited funds accrue interest through theAAVE Liquidity ProtocolbTokens deployed for each recipient project adhere to theERC20 Token Standard📖 How it Works (under the hood)An open-source project is added to Bazaar Finance through the deployment of a newVaultand its associatedbTokencontract. For the MVP, this is done by callingcreateVaultandcreateBTokenin theVaultFactorycontract.The project'sbTokenis deployed first, and then itsVaultis deployed with the following parametersrecipientaddresssalarydesired amount the recipient wants to earn each month for working on the projecttokenaddress of the ERC20 the recipient wishes to be paid in (e.g. DAI)aTokenaddress the interest-accruing version of thetoken, issued through AavebTokenaddress of the project's bToken, created throughcreateBTokenIndividuals who wish to contribute the interest on their savings to fund the project candeposita specifiedamountof the projectstokeninto itsVault.The deposit gets automatically swapped to the interest-accruing equivalent on Aave, and is stored in theVault.The depositor gets minted the project'sbToken, redeemable for underlying funds when theywithdrawtheir principal (and any additional interest) from theVaultInterest on deposits accrues to the project'sVault. Every 30 days, the accrued interest gets allocated to berecipient, available to be withdrawn.If the interest accrued from the sum of deposited funds exceeds the recipient's desired monthlysalaryfor that month, additional interest earned for the remainder of that month gets allocated to depositors.Recipients canwithdrawa specifiedamountat any time.Depositors canwithdrawtheir principal (and any additional interest) at any time.

Hackathon

MarketMake

2024

Contributors