Inspiration
This projected takes its inspiration from the multitude of lending and borrowing dApps, Token Swaps, and Islamic finance (specifically, cost plus financing). Indeed, we wanted to build a simple and interest-free alternative to lending dApps.
What it does
On Spectrr Finance, you can sell and buy tokens, at a exchange rate and repayment period of your choice. Indeed, it is similar to a token swap platform, but here, you can buy tokens and repay them at later date, after providing some collateral.
- For example, one can create a sale offer where 1 BTC is being sold for 22,500 USDC, with a repayment period of 3 days.
- Likewise, a buy offer where one wants to buy 22,000 USDC in exchange of 1 BTC, with a collateral of BTC and a repayment period of 1 week can also be made.
- For sellers, profit is made by selling tokens at price higher than the market. Meanwhile, for buyers, profit is made by doing profitable activities with the tokens bought (e.g.: buy other tokens, invest in a company).
How we built it
The design of this project can be broken down into the following three components:
- The Solidity Smart Contracts, hold the business logic of this project. They execute function calls, such as creating, canceling, and repaying offers.
- The Web Client, using the ethersjs library and some HTML added with nice CSS, enables users to interact with the Smart Contract in a clean and intuitive way.
- The Subgraph running on The Graph Hosted service, quickly feeds the Web Client with specific data on offers. For instance, info on the latest created offers, or offers posted by a specific address.
Challenges we ran into
- One of the greatest challenge was translating the real world business logic to Solidity code. Indeed, we had to write safe and gas efficient code. Using known and established libraries (open-zeppelin) helped us a lot.
- On Testnet, the smart contract were designed to interact with ERC20 tokens having 18 decimals. However, we had to adapt the smart contract logic to ERC20 tokens on Mainnet not having 18 decimals.
- Finally, quickly getting specific data from the blockchain proved to be quite a challenge before discovering The Graph Hosted Service.
Accomplishments that we're proud of
We are really proud and happy to be the first interest-free lending and borrowing like web3 platform on Fantom. Also, we are proud of building a hopefully useful application for the Fantom blockchain and its users.
What we learned
A major lesson was that web3 development was not only about smart contracts. Indeed, some important and specific knowledge about traditional web development, such as HTML, CSS, JavaScript, and API's was heavily required. In addition, we also discovered that you can host a website using IPFS and ENS, instead of a traditional server and ICANN domain.
What's next for Spectrr Finance
- We want to give traders more customization options when creating offers from the Smart Contracts.
- Provide more detailed documentation on how to use Spectrr Finance.
- Get a proper Smart Contract audit
- Last but not least, involve the community to make Spectrr Finance even better
Built With
- css
- ens
- fleek
- hardhat
- html
- ipfs
- javascript
- parcel
- picocss
- shell
- solidity
- subgraph
- the-graph

Log in or sign up for Devpost to join the conversation.