Digital Euro Stablecoin Protocol 💶

The world's first decentralized EUR pegged stablecoin

Demo Video Live Demo Source Code

Description

DEUR - THE WORLDS FIRST EUR PEGGED STABLECOIN Today we are introducing DEUR, an ERC20 token that lets you earn interest on Dai without requiring it to be locked in the Dai Savings Rate. It can be transferred freely and is always redeemable for an ever growing amount of Dai. Interact with the DEUR contract at digitaleuro. Get ready for DANK, the EURO DE-BANKED... WHAT IS DEUR? With the launch of multi-collateral Dai, Dai holders can earn risk-free interest on their coins using the Dai Savings Contract, also known as the Pot. The interest is funded out of the stability fees paid by CDP users, and is 2% per year at the time of writing. Even though Dai deposited in the savings contract remains instantly redeemable, interest accruing Dai cannot be directly transferred, or used in other dapps. DEUR solves this by essentially "unlocking" your Dai savings balance, making it transferable, fungible, and ready for further DeFi integrations. When you convert your Dai to DEUR, you receive a corresponding balance in the DEUR contract. While your DEUR balance remains constant, its corresponding Dai value grows with the Dai Savings Rate. You can think of it as Dai brewing in the DEUR contract. At any point in time you can redeem your Dai along with additional interest, or continue to use the DEUR token directly. HOW DOES DEUR WORK? Besides the standard ERC20 functions for transferring DEUR, we want to highlight some additional features of the contract. For more information about the DEUR.sol contract, check out the README. Dai deposits and withdrawals A Dai user can convert their Dai into DEUR at any point, by calling join. Likewise, they can convert their DEUR into Dai at any point, by calling exit. Dai-denominated transfers and withdrawals With the amount of Dai redeemable for one DEUR constantly growing, the contract offers a few helper functions that operate on DEUR balances in terms of their underlying Dai value. For example, with the method move(address sender, address receiver, uint value), the sender will transfer just enough DEUR to ensure that the receiver gets an amount of DEUR worth value Dai (the exact amount of DEUR transferred is determined when the transaction is included in a block). Similarly, the draw function lets users withdraw Dai by specify the amount of Dai they wish to redeem. By allowing users to give allowance to arbitrary addresses by signing a permit, we allow abstract gasless operations without committing to a particular way of doing transfer-by-signature, trade-by-signature, or any other token interaction. We achieve full generality by just adding one function to the ERC20 standard. In fact, one of the reasons we felt compelled to write the DEUR contract was because we wanted Savings Dai deposits to have this feature. Note that the interface at digitaleuro.netlify.app does not yet support gasless transfers, but we are working on a something that demonstrates the full power of the permit pattern. Stay tuned for updates! DISCLAIMER Although we believe it to be straightforward enough to not contain any surprises, remember that on the blockchain, you are responsible for your own actions.

How It's Made

ARCHITECTURE The Digital Euro starts with a simple, mintable ERC20 smart contract and can escalate quickly into a monster that requires dozens of additional functions, interfaces and support structures. In our random team of 5 developers we decided already on the first day of the hackathon that we need to set a clear and realistic scope and a deployment to the Kovan Testnet in order to deliver a working Proof of Concept until the 21st October. The Digtial Euro should always keep its 1:1 peg to current price of EUR. Therefore it is mandatory to have a few oracles. We used Chainlink PriceFeed Oracles to determine the target price with DAI/USD and USD/EUR. To keep the scope realistic we set DAI as the first acceptable collateral to mint DEUR. The Manager.sol got the Owner rights for the DigitalEuro.sol, uses the results from the Chainlink Smart Contracts, acts as a constant primary market for DEUR and interacts via web3 with our DApp Front-end. Like all other stablecoins we realized early on that we require a secondary token that acts as a value support reserve and could be extended into governance and other features later on. The Digital Bank (DANK) token is mainly used to support stabilizing the EUR peg for the PoC phase. Stabilizing the peg we rely on the constant primary market that always buys/sells DEUR for the current sport rate of 1:1 EUR. On the secondary markets (like Uniswap) the price will fluctuate of course, providing arbitage opportunities for any participant on the open market. Not fully relying on market economics we planned to run our own stabilizers to screen the markets for price variants and alerting us when the price deviates to levels outside our tolerance (ex. +/- 2%). Automated countermeasures should be executed as follows, but are not implemented yet: a) DEUR price decreases The stabilizer has and adjustable tolerance threshold for DEUR falling below our acceptable limit (ex. 1 DEUR < 0,98EUR). This lower price limit triggers the stabilizer to sell DANK (Reserve/Gov. Tokens) and buy undervalued DEUR from secondary markets, until the price is back within the set threshold limits. Additionally our Protocol can burn the DEUR that it just purchased in order to decrease the total actual supply of DEUR and increase the individual value of every available DEUR. b) DEUR price increases If the price of DEUR increases above our 2% threshold (ex. 1 DEUR > 0,98EUR), the stabilizer buys new DEUR for the primary market for the value for 1 EUR and immediately sells them on the secondary market for the higher prize. The profits are going to be used to buy more DANK as future reserve to stabilize under evaluation. Additionally this increases the overall supply of DEUR and should also help to bring the individual price of each DEUR back to its peg. Liquidity is another key element for every stablecoin, evaluating several options we went with Uniswap to set up 2 liquidity pools with the pairs DEUR/DAI and DANK/DAI. This created the alternive for users to get DEUR not only thorugh our DApp but directly from Uniswap, too. For liquidity providers we have set up UNI-V2 LP staking functions in our DApp, rewarding LPs with daily DANK rewards. Users can stake, increase stake or unstake at any time. The %APY is set higher for DANK/DAI since risk of volatility is higher compared to DEUR/DAI both representing stablecoins. In our front-end DApp users also get an overview of several market parameters like totalSupply, size of Pools, etc. to get a dashboard like information overview. ROADMAP This PoC demonstrates several working core features of a EUR stablecoin. For further development and testing we plan additional functions and security features. Raising seed capital to bootstrap liquidity pools would definitively kickstart the project to gain real market traction before we would launch a live Mainnet version. https://digital-euro.eth.link/

Team

Nino Nomad Ben Ng Charles Steenstra Kuroge Washu iazid proton
← click here to see all projects