Inspiration
The inspiration behind CTrade lies in leveraging my coding skills and the transparent nature of the blockchain to create a platform whereby I can have a smart contract execute crypto trades on my behalf whenever I am currently unable to due to other engagements. After missing out on insane opportunities countless times due to being unavailable to execute trades shared in the Alpha groups I'm in, I started thinking of a solution to automate those executions for me and then came up with the Idea to create CTrade.
What it does
The platform allows a crypto trader to publicly share their trades and allows users to subscribe those trades by depositing some funds into the copy trading contract which automatically executes those trades on their behalf. It also allows users manually copy the traders trade through the click of a single button.
How I built it
The smart contract was written in Solidity, UniswapV3 contracts were imported to create the token swap interface, OpenZeppellin's Ownable contract was used to define function access, Chainlink's Log Trigger Automations was used to listen to swap events from the host trader and automatically recreate the trades on behalf of the subscribers, TheGraph Indexer was used to log events from the host traders account to allow for copy trading and for transparency on the UI. The frontend was built using VueJs and some other helpful libraries.
Challenges we ran into
A lot of time was spent in trying to build the platform on the Goerli testnet as Uniswapv3 did not fully support the Sepolia testnet, I kept running into issues using Chainlink with Goerli has chainlink support for goerli had been deprecated in v2. Eventually I ended up building on the Mumbai testnet.
Accomplishments that I'm proud of
I'm proud of the fact that I was able to achieve this project solo. I could not form a team since I would not have been able to contribute to effectively due to my rigid schedule and IRL job. So I had to do things whenever I was chanced which meant I had to undertake a lot more tasks.
What I learned
I have significantly improved my skill in working with, onchain events, Chainlink functions and overall smart contract development. My UI design skills have gotten have also improved.
What's next for CTrade
Tests, Tests, Tests and more Tests!! Then introducing some contract improvements (currently thinking of redefining a huge part of the system logic using custom made AA wallets), making the UI/UX improvements. Then shipping to mainnet and testing in some of my trading groups before deciding to go mainstream.
Built With
- chainlink
- hardhat
- solidity
- the-graph
- typechain
- typescript
- vue
Log in or sign up for Devpost to join the conversation.