Skip to content

Commit a70fd93

Browse files
authored
Merge pull request #138 from J-Son89/main
Fraction - Lison Scrypto Club
2 parents 861b836 + eebc23a commit a70fd93

38 files changed

+30426
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
.vscode
33
.history
44

5+
# Intellij
6+
.idea
7+
58
# macOS folder attributes
69
.DS_Store
710

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "fond"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v0.6.0" }
8+
scrypto = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v0.6.0" }
9+
strum = "0.24.1"
10+
strum_macros = "0.24.3"
11+
12+
[dev-dependencies]
13+
transaction = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v0.6.0" }
14+
radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v0.6.0" }
15+
scrypto-unit = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v0.6.0" }
16+
17+
[profile.release]
18+
opt-level = 's' # Optimize for size.
19+
lto = true # Enable Link Time Optimization.
20+
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
21+
panic = 'abort' # Abort on panic.
22+
strip = "debuginfo" # Strip debug info.
23+
overflow-checks = true # Panic in the case of an overflow.
24+
25+
[lib]
26+
crate-type = ["cdylib", "lib"]
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Fraction
2+
3+
See our application, deployed here: https://fraction-nft.herokuapp.com/
4+
5+
Fraction is a platform where users can invest in assets, with the help of fractional NFTs. We set the entry barrier for high value items very low and therefore allow a brought investor base to invest in an asset class, that wasn’t accessible for them beforehand.
6+
7+
We research items with a high growth value and propose them on our website. Users can connect with their Radix wallet and buy fractions of the asset. One asset is represented by one NFT, which in turn is composed of multiple other NFTs. Those NFTs will verify the ownership of investors.
8+
9+
Once a funding goal is reached, investors receive an NFT, representing their share and we will buy and store the item. When the asset increases in value according to our goals, we sell it and all holders share the profit.
10+
11+
There is no risk if the funding goal is not reached, as users will get their money back immediately.
12+
13+
## User Journey
14+
15+
### User Connecting
16+
17+
<img src="https://github.com/J-Son89/scrypto-challenges/blob/main/6-nfts-for-financial-applications/fond/app/images/landingPage.png" alt="drawing" width="500"/>
18+
19+
The landing page, shows the user an overview of the website.
20+
21+
Users can connect their wallet using the AlphaNet wallet extension:
22+
https://docs.radixdlt.com/main/scrypto/alphanet/wallet-extension.html
23+
24+
25+
### Once connected
26+
27+
<img src="https://github.com/J-Son89/scrypto-challenges/blob/main/6-nfts-for-financial-applications/fond/app/images/investPage.png" alt="drawing" width="500"/>
28+
29+
A user can then go through the different campaigns of the project available on the 'Invest' tab.
30+
31+
This shows the user the target amount needed to raise for the project.
32+
From there users can contribute any amount they wish.
33+
34+
After investing, users will then receive an NFT showing how much they have invested.
35+
36+
### Getting funds back out
37+
38+
Once the company has fulfilled their target of funds to raise. The company will then buy the item and eventually sell it for profit.
39+
40+
After selling the item, the user can then retrieve their funds by hitting the Retrieve Funds button.
41+
42+
## Smart Contract
43+
The smart contract for this application is in fond/src/lib.js
44+
45+
It splits the roles into two user types Admin & User.
46+
47+
### Admin
48+
Admins can
49+
- see available campaigns data
50+
- create campaigns,
51+
- buy items with completed campaigns
52+
- sell items
53+
54+
#### Calling these methods
55+
To call these methods there are some Transaction Manifests defined in the codebase.
56+
57+
instantiate.rtm is the method needed for an admin to instantiate the component.
58+
59+
create-campaign.rtm is the method need for creating a campaign.
60+
61+
buy.rtm and sell.rtm are both self explanatory.
62+
63+
All of these manifests are using addresses etc on the Alphanet network but some details might need to be adjusted, such as the campaign index etc.
64+
65+
### User
66+
Users can
67+
- see available campaigns data
68+
- invest in campaigns
69+
- retrieve funds from completed campaigns.
70+
## Frontend
71+
The frontend of this application is a basic React App.
72+
73+
Initially install the dependencies with `npm i` and then run `npm start` to run the application.
74+
75+
## What Next??
76+
This project serves as an MVP for Fraction. Going forward Fraction has a wide set of ideas to implement.
77+
78+
### Validation
79+
Given the easy nature of Scrypto smart contracts. We want to simplify the process of creating new admins and having admin protected functionality.
80+
81+
### Dao
82+
Creating a campaign can be difficult when finding high value items with good potential returns. To improve this process, Fraction is considering creating a DAO where approved members can vote and contribute on the future investments.
83+
84+
### Improved User Journey
85+
As the project grows, the requirement for Users to revoke their contribution from an investment will become more of a concern.
86+
Further, if for some reason an investment seems to have lost it's potential, admins will have the functionality to cancel a campaign in which case contributors will be able to retrieve their funds.
87+
88+
## Admin panel
89+
At present, there is no admin panel. Everything is being done by Transaction Manifest in the browser extension.
90+
The intention is to build out a fully formed interactive admin page, where admins can handle all of the neccessary functionality needed.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
Loading
Loading

0 commit comments

Comments
 (0)