Inspiration

We took inspiration from major Ethereum lending platforms like AAVE or Compound.

What it does

It allows anyone to stake collateral in XDC or USD, then they can leave it there so anyone can borrow it, or they can use it to take an over-collateralized loan backed by that collateral. The loan can also be in XDC or USD. The threshold is set to 70%. If the collateral ratio falls under 70%, anyone can call a function and liquidate that position in order to retrieve funds to lenders.

How we built it

We built it using NextJS on the frontend and Solidity in the smart contracts. For testing the solidity code, we used TypeScript.

Challenges we ran into

Big challenge when using signatures was to make sure they are readable and easily verifiable. There are a few signature standards, and they don't work well together. We ended up using ERC712 standard for signing typed data. Another challenge was making the contract gas-efficient even when there's a high volume of transactions. For this, we decided to keep the collateral deposits represented as separate ERC-20 contracts instead of mapping these values like we're doing for debt. This also allows users to trade their position without the need to unstake!

Accomplishments that we're proud of

The biggest challenge was getting off-chain data usable on-chain without an oracle (since XDC chain doesn't have one). We managed to build a signature-based system that effectively verifies that the data is signed by our admin wallet and usable only once, in the next few blocks. This blocks any fraud and serves the price feed to our contract. Thanks to that, we're able to compare the different currencies used in our contract.

What we learned

We learned a lot about ERC712 and the implementation of signed data. Also we learned more about signatures in general.

What's next for Atomizer

AAVE and Compound are using complex algorithms to determine fees paid from borrowers to lenders. Our contract currently doesn't support fees, since we didn't have time to build this algorithm. That's where our next can lead! Also the stablecoin we're currently using is just a placeholder for a real stablecoin. We might build this stablecoin next, so our platform can really work as it should!

Why we are not able to deploy on Mainnet?

It has been a challenging process for my team and I to work on this project, We only began working on it again a few days ago due to a few issues. With this blockchain being a relatively new subject to us, it has been a challenge to learn how to deploy the project, as well as build the necessary wallets for it to be used on the Mainnet. Despite this, we have been putting in the effort and time to understand the ins and outs of XDC blockchain technology in order to get the project up and running for Mainnet. We understand the importance of this project and will continue to work hard to make sure that it is successful. Though we also filled out the form but didn't get the XDC yet once we received it we deploy our project to Mainnet as well.

Built With

Share this project:

Updates