Inspiration
The Stock Lending Protocol project was inspired by the need for a more transparent and fair stock lending process. Traditional stock lending is often centralized and controlled by a small number of powerful intermediaries, who take a significant cut of the profits. This can make it difficult for smaller investors to access the stock lending market and earn passive yields on their long-term portfolios.
What it does
The Stock Lending Protocol is a decentralized solution that allows investors to deposit shares into a pool, where other investors can borrow and sell them short. By using smart contracts, we ensure transparency and fairness in the lending process, and eliminate the need for intermediaries. This protocol allows for a democratization of the stock lending process, making it accessible for all investors regardless of their size or location, and giving them more control over their investments.
How we built it
The Stock Lending Protocol was built using smart contracts on the Stellar blockchain. I created a custom struct and a mapping in the smart contract to store information about the shares, and created functions to allow depositors to deposit shares and borrowers to borrow shares. A function was also implemented to determine the borrowing interest rate based on supply and demand and a mechanism for automatically liquidating short investors who lose 60% on their short position.
Challenges we ran into
One of the main challenges was creating a mechanism for keeping track of the ownership and availability of shares in the pool. Another challenge was creating a mechanism for determining the borrowing interest rate based on supply and demand. Additionally, implementing a mechanism for automatically liquidating short investors who lose 60% on their short position was also challenging.
Accomplishments that we're proud of
- Implementing a decentralized stock lending protocol using smart contracts
- Creating a mechanism for keeping track of the ownership and availability of shares in the pool
- Implemented a mechanism for determining the borrowing interest rate based on supply and demand
- Implementing a mechanism for automatically liquidating short investors who lose 60% on their short position
What we learned
- How to keep track of the ownership and availability of shares in the pool
- How to determine the borrowing interest rate based on supply and demand
- How to automatically liquidate short investors who lose 60% on their short position
What's next for Stock Lending Pool
- Add more functionalities to the protocol
- Add more security features
- Integrate with other decentralized exchanges to increase liquidity
- Add more assets to the protocol, such as bonds and options.
Ultimately, I heard about this hackathon a bit late and haven't had the time I would've liked to fully flesh out this prototype, hence the lack of a video with this submission or completely fleshed-out code. Notwithstanding, I wanted to share it with the community and hear any of your thoughts.
There's still a lot of work to be done here, including proper documentation of how contracts interact with the SDEX. I need to perform more research on the specific implementation details.
Log in or sign up for Devpost to join the conversation.