Inspiration

Our inspiration was Patrick Collins' Chainlink Spring 2022 hackathon staking app tutorial. We have added a few functionalities to Patrick's original app such as withdrawals and Chainlink price feeds.

What it does

The app allows the user to stake the platform's native SAFE token to earn accumulating rewards paid in the native token, claim rewards and withdraw staked tokens. The front-end shows balances in real-time using Chainlink price feeds.

How we built it

We used the Open Zeppelin contract library in the design of the two Solidity smart contracts which are compiled, deployed and verified using Hardhat. The contracts are deployed to the Goerli Ethereum testnet. We designed a Next.js front-end that uses Moralis React hooks to connect to web3.

Challenges we ran into

Our front-end has a small bug where the initial approval from the staking contract fails and needs to be approved again, then staked. The withdrawal process is not smooth through the front-end as the Moralis hooks do not seem to accept the withdrawal call.

Accomplishments that we're proud of

We're really proud of the all the smart contract development skills constantly evolving and great improving, and this shows in this application. The front-end development and keen integration with the contracts were masterful and the collaboration during the race to finish was really enjoyable and something to celebrate.

What we learned

Working on a highly-positive team with great synergy can create an amazing product.

What's next for SafeHarbour Finance

1) Program staking algorithm that reduces reward over time 2) Add liquidity pool and lending functionality 3) Update UI to include price feeds for additional token pairings

Built With

Share this project:

Updates