MyGit

terra-money/alliance

Fork: 34 Star: 50 (更新于 2024-11-19 10:01:01)

license: NOASSERTION

Language: Go .

🤝 Alliance chain with x/alliance module

最后发布版本: v0.3.6 ( 2024-03-27 14:37:11)

GitHub网址

🤝 Alliance

Technical Documentation · Integration Guide · Code Audit


Overview

Alliance is an open-source Cosmos SDK module that leverages interchain staking to form economic alliances among blockchains. By boosting the economic activity across Cosmos chains through creating bilateral, mutually beneficial alliances, Alliance aims to give rise to a new wave of innovation, user adoption, and cross-chain collaboration.

Alliance allows blockchains to trade yield with each other- think of it like yield farming for L1s.

Here’s how it works:

  • Two chains integrate the Alliance module and decide through governance which assets can be staked on their chain. These are known as Alliance assets.
  • Each Alliance asset is assigned a Take Rate (the percentage of staked Alliance assets the chain redistributes to native chain stakers) and a Reward Weight (the percentage of native staking rewards the chain distributes to Alliance asset stakers).
  • Users of each chain can then bridge their assets via IBC to the other chain and stake them to earn the Reward Weight.

Tech Specs

The Alliance Docs contain detailed information about Alliance. Familiarize yourself with the following concepts before integrating the Alliance module.

Integrate the x/alliance module

The Alliance module can be added to any compatible Cosmos chain and does not require any changes to consensus or major changes to common core modules. This module wraps around a chain’s native staking module, allowing whitelisted assets to be staked and earn rewards. Alliance assets can be staked with the Alliance module, and the chain's native staking module is used for native stakers.

Chains that want to add x/alliance must enable the following modules:

Compatibility matrix:

Release Branch CosmosSDK
v0.4.0 release/v0.4.x 0.50
v0.3.0 release/v0.3.x 0.47
v0.2.0 release/v0.2.x 0.47
v0.1.0 release/v0.1.x 0.46

For an in-depth guide on integrating x/alliance, visit the Alliance Module Integration Guide.

Development environment

The following sections are for developers working on the x/alliance module.

This project uses Go v1.21.

To build a ready-to-use binary, run the following:

make install

Localnet

The Localnet is a development environment that uses a Docker orchestration to create a local network with 3 Docker containers:

  • make localnet-start : stop the testnet if running, build the terra-money/localnet-alliance image and start the nodes.
  • make localnet-alliance-rmi: remove the previously created terra-money/localnet-alliance image.
  • make localnet-build-env: delete and rebuild the terra-money/localnet-alliance
  • make localnet-build-nodes: using the terra-money/localnet-alliance starts a 3 docker containers testnet.
  • make localnet-stop: stop the testnet if running.

Running the simulation

The simulation app does not run out of the box because the Alliance module owns all the native stake. The x/staking module's operation.go file panics when a delegator does not have a private key.

Use the following command to update the x/staking module directly before compiling the simulation app.

go mod vendor
sed -i '' 's/fmt.Errorf("delegation addr: %s does not exist in simulation accounts", delAddr)/nil/g' vendor/github.com/cosmos/cosmos-sdk/x/staking/simulation/operations.go
go test -benchmem -run=^$ -bench ^BenchmarkSimulation ./app -NumBlocks=200 -BlockSize 50 -Commit=true -Verbose=true -Enabled=true

Warning

Please note that Alliance is still undergoing final testing before its official release. TFL does not give any warranties, whether express or implied, as to the suitability or usability of the software or any of its content.

TFL will not be liable for any loss, whether such loss is direct, indirect, special or consequential, suffered by any party as a result of their use of the software or content.

Should you encounter any bugs, glitches, lack of functionality or other problems on the website, please submit bugs and feature requests through Github Issues.

最近版本更新:(数据更新于 2024-09-11 23:01:52)

2024-03-27 14:37:11 v0.3.6

2024-03-25 16:58:23 v0.3.5-rc.0

2024-03-06 20:39:54 v0.3.5

2024-02-28 15:15:05 v0.4.3

2024-02-28 15:13:25 v0.3.4

2024-02-27 22:51:53 v0.4.2

2024-02-27 15:35:19 v0.4.1

2024-02-23 15:14:21 v0.4.0

2023-11-13 18:36:02 v0.3.3

2023-11-13 18:28:55 v0.1.3

terra-money/alliance同语言 Go最近更新仓库

2024-11-24 13:36:43 SagerNet/sing-box

2024-11-23 10:28:20 ollama/ollama

2024-11-23 05:46:00 dolthub/dolt

2024-11-22 20:14:47 daytonaio/daytona

2024-11-22 08:53:37 AlistGo/alist

2024-11-22 02:54:58 projectdiscovery/nuclei