owned this note
owned this note
Published
Linked with GitHub
#### [HackFS-2021](https://showcase.ethglobal.co/hackfs2021) Project User Story
# Filament Finance
In the third decade of the 21^st^ century the global financial system went through a cataclysm. Inflation had gone negative. People had to pay a bank to hold their savings. Money had gone digital. People began storing their cash in their own digital wallets and managing their investments themselves. This is how it worked.
This story has four roles:
1. **The Employer** is a big tech company that pays salaries in cryptocurrency.
2. **The Employee**, Emmy, is a worker, barely scraping by, but has some savings.
3. **The Lender** is a somewhat nefarious service that provides bridge loans.
4. **The DeFi Site** is a nimble startup pushing the envelope of finance.
When Emmy got hired her Employer created a contract. It wasn’t on paper, it was a ‘smart contract’, a software agreement that codifies terms and executes preprogrammed actions. Emmy digitally signed it using her cryptocurrency wallet. Then the contract sent her an NFT. That token acts as an anchor for her incoming salary. Her income streams to the NFT using [Superfluid](https://superfluid.finance/) technology.
## Filament Dapp
Emmy uses the Filament app, which is kinda like Zapper or Zerion but works more like a bank. It provides a view on her main Ethereum address and makes managing cash flows simple.
Emmy has worked for awhile but right now she needs some urgent cash so she goes to the Lender and requests a loan for a few weeks. The Lender says:
> “Ok, you look pretty trustworthy. You have a proven income from an established company so we’re confident that you can pay us back. We’re gonna draw up a contract.”
The Lender needs some sort of collateral. If the Employee has a track record that’s good and makes it a low-risk loan but still, the Employee could end up in financial trouble or get fired and default on the loan. So the Lender says to Emmy:
> “Hey, we need something to guarantee the loan. Ya know, anything could happen. Tomorrow you could get hit by a bus. We gotta have some collateral. Can you give us a Swiss watch or something?”
Emmy says:
> “Well, I don’t have a Swiss watch. But I do have an NFT! It’s the anchor for my incoming salary. What I’ll do is send that NFT to your contract. As long as it’s there, my salary will stream in. When the loan & interest is repaid the contract can send the NFT back to me.”
The Lender figures that’s sort of an advance escrow and feels secure as the risk of the loan is thereby much lower:
> “Ok. We got a deal.”
Using a template, the Lender created the contract and deployed it. When Emmy sent her salary anchor to the contract, the contract made the loan to Emmy.
Time went by. The Lender kept a wary eye on the streaming payments but there were no surprises so no action was required. When the loan got paid off the contract executed the closing clauses, sent the anchor NFT back to Emmy, and gave both parties a Trust Point.
### Payments
Emmy received a notice from the city. It was tax time. As usual, the value of her place had gone up and the tax with it. She grumbled while launching the Filement app. Checking the overview, she saw that last year’s tax payment was still flowing but it would halt next month.
She tapped *New Streamer*, imported the parameters from the tax bill, and checked the end date. When Emmy tapped the *Create* button an alert popped up:
:::info
Are you sure you want to`content:JSON.stringify(metadata)`?
:::
Wtf. Emmy snorted, muttered “Friggin beta version”, and hit *Don’t ask me this again*.
Then the app minted an NFT into her wallet. The new token’s visual asset and metadata were stored on IPFS via [nft.storage](https://nft.storage). That ensured it was both immutable and universally accessible.
Emmy sent the NFT to the city’s address. The token would anchor her streaming payment throughout the next year. She got a discounted rate because the city likes streaming money.
### Finances
In the Filament dashboard Emmy noted that the APY (annual percentage yield – Yield is compounded while Rate is not) on one of her savings deposits had dropped. She decided to move the tranche to another DeFi platform her girlfriend had told her about that offered insane rates. She went to the site, logged in with her wallet, and got a message:
> “Welcome to our service! We just need you to do KYC.”
She sighed and switched to ipfs.id. This was another crypto wallet but instead of holding currencies it stored her identity info. She chose to create a subset record, selected the attributes the DeFi site had requested, encrypted it using the site’s public key, and saved the record on [web3.storage](https://web3.storage). Then she went back to the service and input the record’s URI.
> “Thanks for identifying Emmy! Welcome on board!”
Just to be sure, Emmy went and checked the record. The DeFi site was indeed following best practice, operating under the assumption it would inevitably get hacked and not storing any customer data on its systems. The site had negotiated a Filecoin contract to preserve the record. It now had a TTL (time to live) of 7 years to fulfill the regulatory obligation. Good.
Emmy began paging thru the offerings. She decided to invest her $[DOUGH](https://www.coingecko.com/en/coins/piedao-dough-v2) in the [Metaverse NFT Index](https://www.piedao.org/#/staking/play-dough) and then provide liquidity. The index was loaded with up & coming gaming tokens and its farm had an APR of 151%. That’s, like, pretty damn good.
She made a screenshot, put the image in her collection at [myspace.storage](https://myspace.storage), and shared it with her girlfriend:
![vfat.tools PieDAO stats](https://i.imgur.com/DEzh4Fa.png)
**Woohoo!** :moneybag::grin:
Emmy watched the produce from the farm streaming in. Not bad.
Then she noticed a new token in her Filament app. It was yet another NFT. With the DeFi site logo. Oh, credentials. Nice.
Just to be sure, she inspected the token. Image and metadata on IPFS? Yup. She went to the metadata URI and examined the raw JSON. The key-value pairs contained only hashes. Check. Good going guys.
Emmy wondered if the DeFi site had any openings for her skillset...
*[DeFi]: Decentralized Finance
*[NFT]: Non-Fungible Token
*[IPFS]: InterPlanetary File System
*[APY]: Annual Percentage Yield
*[APR]: Annual Percentage Rate
*[KYC]: Know Your Customer
*[URI]: Uniform Resource Identifier
*[TTL]: Time To Live
*[JSON]: JavaScript Object Notation