Inspiration

We were inspired by the possibilities unlocked by Compound's streaming interest micro-payments and rDAI's ability to redirect interest flows to try to reduce the psychological sting of paying for services out of pocket by directing interest-only micro-payment flows from users' DAI principal to paid content providers. We wanted to apply the tools of cryptoeconomics to help users have their money work harder, further and faster for them in more of the places they actually spend their time.

What it does

Tribute is a web3 UI dashboard that calls the rDAI smart contracts and allows users and paid content publishers to transact using directed rDAI interest. It is designed to enable subscription access to paid content by allocating a portion of a user's rDAI interest to the publisher. The user's rDAI principal balance never goes down, but pays for services and content by foregoing the ability to keep the interest generated by their rDAI (which is tied to the Compound's DAI interest rate - at or above 10% for the past few months). Tribute enabled content publishers could be game or video streaming services, publications, charities or online casinos, among others.

To accept Tribute payments, a publisher specifies its wallet address and sets a meter rate and period to enable access to its content. When a user wishes to access the content, Tribute pulls the current DAI interest rate from Compound, and calculates how much DAI the user would need to allocate to satisfy the publisher's meter rate from interest alone.

For example, a news publication could set its meter rate at 20 DAI per year. At a DAI annual interest rate of 10% on Compound, a user would initially need to direct the interest on 200 DAI to satisfy the meter rate and access the publication. As another example, a platform game publisher could set its meter rate to 0.05 DAI per hour. A user would need to allocate 4,380 DAI as Tribute to play. (Compound divides a year into 2,102,400 blocks or 240 blocks per hour). Were the Compound DAI interest rate to be 7%, a user would need to initially allocate Tributes of ~286 DAI to the publication and ~6,257 DAI to the game to satisfy their meter rates. Tribute then calculates the percentage of the user's principal that this allocation corresponds to and prepares an rDAI contract transaction that specifies the publisher's address and the percentage of the user's interest that should flow to it.

These directed DAI interest flows are known as Allocated Tributes, and they are based on the DAI amount that was initially calculated based on the meter rate and the then-current Compound interest rate. The publisher bears the risk that the interest rate drops on Allocated Tribute, meaning that they receive less rDAI per block than what was initially calculated. Once a user allocates a Tribute to a publisher, the content should remain accessible as long as the user continues to direct the interest from the specified amount of DAI to the Publisher. Users always have the right to de-allocate any of their Tributes to publishers at any time. While Allocated Tributes direct proportional interest to publishers, the remaining user principal, called Unallocated Tribute, also generates interest via rDAI, but that interest flows back to the user, acting as a stealth savings module.

The key to Tribute is that users never see their interest-only payments to publishers leave their wallets because their principal amount never goes down. Users cannot "overspend" because they cannot subscribe to content that requires more Tribute than the remaining Unallocated Tribute. In fact, Tribute is designed so that transactions with publishers do not even feel like normal spending transactions. The rDAI mechanism of directed interest underlying Tribute is abstracted away from users. Publishers who enable Tribute benefit because users are more likely to pay for their content when they don't feel the financial loss as acutely as when paying out of pocket.

WARNING: Tribute is a hackathon proof-of-concept that is built on top of unaudited rDAI contracts, which themselves rely on DeFi contracts that may have additional potential security risks. You should not implement or use Tribute with real money or cryptoassets at stake.

How we built it

We built a user facing widget and dashboard on React that makes calls to the rDAI contract functions and tracks and manages Tribute Allocations.

Challenges we ran into

rDAI is a very new project without comprehensive documentation, so we had to do a fair amount of experimentation with their contracts to get a grasp on how the functions worked. Obtaining Kovan testnet DAI that was compatible with Compound and rDAI contracts proved to be a larger obstacle than we had expected.

We also spent a number of constructive but challenging hours bridging the design gap between the many versions of how Tribute could work and how we concluded it should work. We had to make a number of choices about which rDAI features to enable and emphasize, as well as whether to enable minimum lock up periods, whether to create another ERC20 token to capture and "spend" the accrued interest, and what information to share with users regarding the savings capacity of rDAI versus focusing on enabling apparently "free" content access. We're happy with where we ended up, but it was a long slog to work through these issues.

Accomplishments that we're proud of

We believe that Tribute demonstrates a web3 DeFi framework for an economic abstraction layer that can benefit both users and content publishers by enhancing users' financial potency and by eliminating a large psychological barrier to supporting the content that they value.

What we learned

It is easy to make incorrect assumptions about what smart contract functions do and how they work. You have to get down in the muck with the contract and wrestle it into submission before trying to build on top of it. Also there are too many Kovan DAI contracts.

What's next for Tribute

A deathmatch with MolochDAO.

Contacts

Pat - @pi0neerPat (Twitter, Telegram) Victor - @twoirtter (Twitter) Brian - @breakmypotato (Twitter) Ethan - @ejwessel (Twitter)

Built With

Share this project:
×

Updates

posted an update

Wow, featured in the newsletter! We are so honored. We have decided to continue this project beyond the hackathon, and we will be at Devcon in Osaka if you'd like to say hello. Also, join the general rToken / rDAI telegram to meet the community and ask questions t.me/giverdai

Log in or sign up for Devpost to join the conversation.