Inspiration

A stablecoin lets you cash out at any hour. The Treasury bills backing it can only be turned into cash during business hours on weekdays. So if a lot of people want their money back on a Saturday night, the stablecoin is stuck. It can make them wait until Monday, or it can sell its bills to whoever is around, usually at a bad price. We wanted to give it a third option.

What it does

Stop-Out is a lending market on Arc that never closes. Lenders offer USDC and say the lowest interest rate they will take. Borrowers put up Treasury bills and say the highest rate they will pay. An auction matches them, and everyone pays or earns the same rate. A stablecoin can use it to borrow against its bills instead of selling them. We put two stablecoins through the same bank run to show the difference. Both paid every customer in full, but the one that borrowed on Stop-Out still had 99.99 cents behind each remaining coin, and the one that had to sell had 68.64 cents.

How we built it

We wrote the contracts in Solidity and deployed them on Arc testnet, where USDC is both the money being lent and the gas. The site is built with Next.js and reads everything straight from the chain. Bill prices come from the US Treasury and the overnight bank rate from the New York Fed. We also use Gemini's prediction market for the next Fed decision. If traders think a rate hike is likely, a loan that runs past the decision should cost more, so we read the odds, work out what that loan should cost, and show it next to what borrowers actually paid.

Challenges we ran into

The hardest part was the auction math. A difference of three millionths of a dollar was once enough to change the rate everyone paid, so every rounding choice had to be exact. One of our data feeds also went down for maintenance in the middle of the build, so we had to make the site fall back to a saved copy and say so. And explaining the project was harder than building it. We rebuilt the site twice before it made sense to someone seeing it for the first time.

Accomplishments that we're proud of

The bank run on the site is not a mockup. Every step is a real transaction on Arc testnet, and each one links to the block explorer. We are also proud that the interest rate rose during the run by itself, from 4.05% to 4.50%, as the cheaper lenders were used up. We did not script that. It is what a market is supposed to do when cash gets scarce.

What we learned

We learned that good assets are not enough if the system that moves them is closed. The problem for a stablecoin on a weekend is not what its bills are worth, it is that nobody can buy or lend against them until Monday. We also learned that an auction with one price is easy to describe and hard to get exactly right.

What's next for Stopout

Right now the lenders, the borrower and the customers are all test wallets we control, the bills are test tokens we made, and the stablecoin that sells does so into a small pool we set up, which is why its loss looks so large. Next we want to let anyone lend or borrow from the site with their own wallet, add a waiting line for withdrawals when no lender is offering, and replace our own price feed with an independent one.

Built With

Share this project:

Updates

Submission history