World’s first zero slippage stablecoin swap with unique swap mining feature
Just like how an hourglass works --- no matter how many times you tip it over, you always end up with the same amount of sand on the other end of the glass, Hourglass Finance offers the same type of service for stablecoin users. Hourglass is an experimental protocol on Polygon that introduces to DeFi, for the very first time, a zero-slippage stablecoin AMM. Swapping stables on Hourglass is always at 1:1 ratio. The protocol is able to achieve this by introducing the new x + y = k invariant in the swapping mechanism. There are 2 important features in the design of Hourglass Finance that allow the project to offer zero-slippage swapping while ensuring its feasibility: - Hourglass Pool Hourglass Pool is the heart of the project. It is a stablecoin liquidity pool that allows users to swap between its different underlyings with no friction and zero slippage. - Swap Mining Swap mining, on the other hand, give users incentives to help maintain the balance ratio of all the underlying stablecoins in the Hourglass Pool. Every time users trade in favor of balancing the ratio of the stablecoin pool, users will be rewarded with Hourglass' native token, HOUR. Meanwhile, there are 3 important roles in the Hourglass ecosystem on the users' end: - Stable Liquidity Providers (Stable LPs) Stable LPs deposit stablecoins in Hourglass Finance's Hourglass Pool (eg. USDC or USDT) to provide stablecoin liquidity for the protocol. In return, the protocol mints hourUSD. hourUSD is a LP token, and hourUSD stakers will receive part of the protocol's transactions fees as staking rewards. hourUSD is pegged to the same value as its underlying (therefore it is also a stablecoin). LPs can redeem hourUSD for its underlyings at any time at a 1:1 ratio. - Swap Users Users can swap between the underlyings of Hourglass Pool with zero slippage. - Pool Balancers As users swap between underlyings, the balance of the pool might become one-sided (much like a hourglass). Balancers are then incentivized through swap mining to restore the balance of the pool through the form of swapping in the opposite direction. Governance: -Vault When users claimed their HOUR token rewards from swap mining, instead of going to their wallets, their reward tokens go to the vault. By depositing HOUR tokens in the vault, users earn share in the vault which can be use for voting and exercising their governance right.
How it's made
Components: - Contracts - Frontend App Contracts: - Contracts are written in Solidity. Development, testing and deployment are done using Truffle. App: - App is written in Vue.js. Web3JS is used to contract interactions. Our innovation lays in our contracts, especially our swap mining pool contract, of which we believe will start a new type of mining frenzy within the DEX space.Technologies used