ark-network / ark

https://arkdev.info
MIT License
41 stars 14 forks source link

Allowing ASPs to borrow liquidity from external sources, like flash loans. #197

Open ben2077 opened 2 weeks ago

ben2077 commented 2 weeks ago

Here’s our vision: We want to create a way for ASPs to borrow liquidity from outside sources. Simply put, ARK’s smart design changes the need for liquidity from a multi-party model, like in traditional Lightning Networks, to a single-party model. This makes things a lot easier for regular users but gives ASPs some trouble with using their capital efficiently.

If we can let ASPs borrow liquidity from external sources and settle everything on a per-round basis with low costs, we could build the most capital-efficient crypto banking system ever. This would solve the capital efficiency problems ASPs face and make the whole system’s liquidity and operations work better.

ben2077 commented 2 weeks ago

Here’s the code. We can discuss how the external liquidity provider should interact and efficiently provide services. https://github.com/ark-network/ark/pull/198

ben2077 commented 2 weeks ago

By establishing the interaction protocol, we can also allow ASPs to borrow liquidity from each other. This would incentivize ASPs to continuously strive to quickly process user transactions, thereby enhancing the overall user experience and capital efficiency of the entire ASP network.

ben2077 commented 2 weeks ago

When an ASP collects a batch of transactions and finds that its liquidity is insufficient, it can send a request for liquidity to external sources. This request can either be directed to a few trusted liquidity providers or broadcasted in a P2P network.

The external providers then respond with their rate quotes and the corresponding UTXOs. When ARK confirms that the rates are acceptable, it constructs the poolTx and ensures that all forfeit transactions are directed to the external providers.

Once the external providers verify the validity of the forfeit transactions and the poolTx, they can send back their signatures for the poolTx, thus completing the liquidity provision for the round. Both the liquidity providers and the ASP, acting as the transaction collector, can earn fees from this process.

This is a win-win solution, and ASPs can also act as liquidity providers.