This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update the docs structure * minor docs tweaking * update design space docs * fix self-hosted mermaid diagram * Rename mermaid item
- Loading branch information
1 parent
63b8a01
commit 38fdaf6
Showing
34 changed files
with
164 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# The Abstract SDK Design Space | ||
|
||
The first step to using a tool is learning its purpose and capabilities. Working with the Abstract SDK is no different. This page will help you understand the design space that the Abstract SDK operates in, which will help you reason about how to use the SDK effectively. | ||
|
||
## Design Space | ||
|
||
The Abstract SDK design space is a superset of the classical smart-contract design space, meaning that any application built with stand-alone smart-contracts can be implemented with the SDK as well. However, Abstract's design space is unique in that it allows for a level of code re-usability that would not be possible with stand-alone smart-contracts. By thinking about on-chain functionality in a functional sense, we created a system where application development can be done in a more conceptual way. | ||
|
||
Additionally the SDK allows for software distribution that is unparalleled in the smart-contract space. With the Abstract SDK you can write your code once, deploy it to any blockchain that supports CosmWasm and let other developers **and users** use it within minutes. This opens up the possibility of creating a marketplace for smart-contracts, where developers can sell their code to other developers and users in a permissionless way. | ||
|
||
This section will give you a high-level overview of the different approaches and how they can be used to build your application. | ||
|
||
### Hosted Applications | ||
|
||
Hosted applications are traditionally applications that are built using stand-alone smart-contracts. Examples of these types of applications are dexes, lending markets, yield aggregators, etc. What makes these applications *hosted* is that they are deployed by the maintainers of the application and often require the user to transfer funds to the application's smart-contract in order to use it. | ||
|
||
```mermaid | ||
flowchart LR | ||
subgraph Developer Team [fas:fa-users-cog Developer Team] | ||
%% subgraph Application | ||
direction BT | ||
A[Application] | ||
%% end | ||
end | ||
User[fa:fa-users Users]==>A | ||
``` | ||
|
||
### Self-Hosted Applications | ||
|
||
By self-hosted applications we mean applications that are **fully** owned by the user. This means that the user does not have to transfer funds to the application's smart-contract in order to use it. Instead the user can deploy the application's smart-contract to their own account and use it from there. This is a novel concept that is only possible with the Abstract SDK. | ||
|
||
```mermaid | ||
flowchart LR | ||
subgraph Developers [fas:fa-users-cog Developers] | ||
direction RL | ||
A[App] | ||
end | ||
subgraph Acc1 [fas:fa-user User's Account] | ||
direction TB | ||
Ap1[App]-->A1[Account] | ||
end | ||
subgraph Acc2 [fas:fa-user User's Account] | ||
direction TB | ||
Ap2[App]-->A2[Account] | ||
end | ||
subgraph Acc3 [fas:fa-user User's Account] | ||
direction TB | ||
Ap3[App]-->A3[Account] | ||
end | ||
Store-.->Ap1 | ||
Store-.->Ap2 | ||
Store-.->Ap3 | ||
A==>Store[fa:fa-store App Store] | ||
``` | ||
|
||
This two main benefits: | ||
|
||
- **Sovereignty:** There are less trust assumptions that the user has to make. The user does not have to trust the application's maintainers to not steal their funds. | ||
- **Customizability:** The user can customize the application to their liking. Applications that take this design in mind can provide novel customization options that would not be possible with hosted applications. |
6 changes: 2 additions & 4 deletions
6
docs/src/get_started/index.md → docs/src/3_get_started/1_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Abstract SDK - Overview | ||
|
||
The Abstract SDK is at the core of the Abstract development platform. It's a modular smart-contract framework designed to simplify and accelerate the development of CosmWasm dApps. It does this by prioritizing re-usability and composability through an account-abstraction oriented architecture. | ||
|
||
From a high-level perspective, smart-contracts built with abstract can use on-chain dependencies (other smart-contracts) to isolate specific functionalities. In this way a smart-contract built with the Abstract SDK can explicitly define its dependencies and use them to perform complex multi-contract interactions with very minimal code. This in turn allows you to focus on the novel functionality of your application without inheriting the complexity of the underlying infrastructure. | ||
|
||
## Visual Example | ||
|
||
Visually this can be represented as an application, for example an `Autocompounder`, that has a dependency on one or multiple other smart-contracts. In this case a `Dex` and `Staking` module. | ||
|
||
```mermaid | ||
flowchart LR | ||
subgraph Autocompounder Application | ||
direction BT | ||
Autocompounder-.->Dex | ||
Autocompounder-.->Staking | ||
Staking-->Account | ||
Autocompounder-->Account | ||
Dex-->Account | ||
end | ||
User[fa:fa-users Users]==>Autocompounder | ||
``` | ||
|
||
Each full arrow signifies execution permissions of the contract on the account. It allows the contract to move funds, interact with other contracts through the account and perform other actions. It does this by sending messages to the account, which then executes them on behalf of the contract. This is the basic idea behind account abstraction and is further elaborated in on the [account abstraction](./3_account_abstraction.md) page. | ||
|
||
Each dotted arrow indicates a dependency between the contracts. These dependencies are explicitly defined in the contract and are asserted at contract instantiation. In this example the autocompounder contract is able to access specific functionality (like swapping or staking assets) from its dependencies (the dex and staking contracts). Through this a major reduction in code complexity and size is achieved as otherwise every dex or yield provider would have to be integrated with the autocompounder contract itself. | ||
|
||
From a developer ecosystem standpoint this encourages collaboration and cross-team code re-use, a practice that has been proven to accelerate development and increase productivity. As the saying goes, a rising tide lifts all boats. | ||
|
||
<!-- ## What Problem Does it Solve? | ||
The Abstract SDK is designed to solve the following problems: | ||
- **Reusability:** CosmWasm development has been a start-from-scratch process up until now. The Abstract SDK allows developers to reuse components across multiple dApps, reducing development time, increasing productivity, iteration speed and shortening the go-to-market of your ideas. | ||
- **Security:** The Abstract SDK is built on top of the CosmWasm smart-contract framework, which is a battle-tested and highly secure platform. Because of its modular design, it's also easier to audit and test. Audited components can be reused across multiple dApps, reducing the risk of bugs and vulnerabilities. | ||
- **Complexity:** The Abstract SDK simplifies the development process by providing a modular framework that allows developers to focus on the core functionality of their dApp. | ||
- **Compatibility:** The Abstract SDK is designed to work seamlessly with popular on-chain services in the Cosmos ecosystem, decentralized exchanges, money markets, oracles, etc. | ||
- **Interoperability:** The Abstract SDK is chain-agnostic, allowing developers to build dApps that can interact with multiple blockchains within the Cosmos ecosystem. | ||
- **Scalability:** The Abstract SDK is designed to scale with the needs of the developer, allowing them to easily deploy to new networks, iterate on their product and achieve product market fit. Through its novel on-chain application store it also allows for personalized dApps that can be customized by the user to meet their specific needs, making the Abstract SDK the first decentralized software distribution platform. | ||
- **Collaboration:** The Abstract SDK enables developers to collaborate on the creation of dApps its composable architecture and the ability to easily publish testing infrastructure for mock environment construction. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.