Inspiration
After hearing about Brink and it's ability to create conditional orders we wanted to use stop loss orders to create a liquidation engine. However, we found out that Brink only supports limit BUYS at the moment. Refusing to be defeated we realized that a problem in a hackathon, is a good thing, as that's something to hack!
What it does
So we set out to create Knirb, Brink's opposite which does limit sells instead of buys using the same architecture.
How we built it
We built this using Javascript for the backend , frontend on react and solidity for smart contracts. Using much of Brink's resources as well
Challenges we ran into
Unlike Brink, Knirb has the uniqe necessity of pricing oracles. For a limit buy you simply cannot buy until a certain price, but a sell can happen at any time and validators can keep the difference. So we need to utilize oracles to ensure the order is not being processed when the price is too high (something not a usual problem for buys).
- When using Brink SDK we had problems with react webpack that affected the frontend
- Communicating with Metamask extension, the frontend developer didn't have experience
- Making a backend API, the backend developer didn't have experience with node
Accomplishments that we're proud of
We're proud that we were all able to work on our respective modules and complete them together (backend, frontend, and smart contracts). We got to connect a fully working frontend to metamask, deploy tested Goreli smart contracts, and a live REST API.
What we learned
We learned a lot about proxy contracts on the smart contract side working with Brink's architecture.
What's next for Knirb
Being an example for others who want to add new functionalities to Brink dapp. Also we expect $2 royalties on every tx to go through the Brink protocol once they implement Knirb.
Built With
- brink
- ethers
- hardhat
- javascript
- react
- solidity
Log in or sign up for Devpost to join the conversation.