FAQ
Last updated
Last updated
CU, short for Computing Unit, is a key parameter in Swan Chain. It is a virtual unit used to measure the computing resource contributions of Computing Providers (CPs). CU plays a crucial role in determining the collateral requirements for CPs.
The primary function of CU is to help calculate the collateral requirements for CPs. This ensures that CPs have sufficient staking to qualify for UBI rewards and task allocations on Swan Chain. Each CP’s CU value can be checked via the Provider Dashboard.
The required collateral is calculated using the following formula:
Currently, the Base Collateral is set at 3,533.
Example Calculation
If a CP has a CU of 100, the collateral requirement would be:
To change the owner address
of your CP account, use the following command:
Note: The YOUR_NEW_OWNER_ADDRESS
does not need to be on the CP machine, but the owner’s private key is required for this operation.
To change the worker address
, run:
Note: The YOUR_NEW_WORKER_ADDRESS
must be stored on the CP machine for two essential purposes:
Verification of bidirectional signatures by the UBI engine when receiving UBI tasks. Tasks will not be accepted if verification fails.
Proof submission to the chain. While this direct submission method provides faster confirmation, it requires the worker wallet to maintain an ETH balance for gas fees. Alternatively, using the sequencer method for submission can help reduce gas costs
Update the beneficiary address
with:
Note: The beneficiary address is for receiving rewards, and no private key is required on the CP machine.
For CP maintenance personnel, this separation enhances security as they can manage the CP without direct access to the beneficiary wallet. Additionally, all CP rewards (including UBI rewards, application deployment rewards, etc.) are distributed to this address.
CP currently supports five task types, each corresponding to different workloads and associated rewards. The more task types you set, the more diverse tasks your CP can accept.
There are two CP roles: FCP and ECP.
For FCP: The default task types are 3 and 4. To accept more tasks, additional configurations are needed, such as enabling NodePort.
For ECP: The default task types are 1 and 2. To accept more tasks, additional configurations are needed, such as enabling Inference.
You can set the task types using the following command:
Note: Separate task types with commas. The full list of task types can be found in the Swan Chain documentation here.
Task Types:
Fil-C2: Time-space proof tasks for Filecoin.
Mining: Mining-related tasks.
AI: AI and web service tasks.
Inference: Large model inference API tasks.
NodePort: VM-like services or multi-port services.
MultiAddress defines how your CP is accessible on the network.
Update network configuration:
For cloud providers: Configure in provider console
For private datacenters: Configure on network egress devices
To update the public IP or internal port mapping, modify the config.toml
file:
Then run the update command:
Finally, verify the update:
The first step in setting up an ECP is initializing the repository. This creates a config.toml
file containing essential configuration settings and defines data storage parameters.
In the Swan network, each CP exists as a contract address. The CP account serves as your unique identifier for all operations, including task distribution, reward collection, and collateral management. It represents your primary token of identity within the Swan network.
To participate in the Swan network and receive tasks, ECPs must stake SWAN tokens as collateral. This stake serves as a security mechanism - if service availability falls below acceptable levels, penalties may be applied against this collateral.
check details about collateral here.
There are two methods for withdrawing collateral, each with different processing times:
Direct Withdrawal from Collateral Balance
Note: Funds are transferred immediately to the owner address.
Withdrawal from Escrow Balance
This process requires a waiting period and multiple steps:
Note: After submitting the withdrawal request, there is a mandatory 7-day waiting period before confirmation can be processed. Use the command withdraw-view
to monitor the withdrawal status.
Adding Funds to Sequencer
Withdrawing from Sequencer
The first step in setting up an FCP is initializing the repository. This creates a config.toml
file that contains essential configuration settings and defines data storage parameters.
In the Swan network, each CP exists as a contract address, with the CP account serving as the unique identifier for all operations. This account handles task distribution, reward collection, and collateral management. It's your primary token of identity within the Swan network.
To participate in the Swan network and receive tasks, FCPs must stake SWAN tokens as collateral. This stake serves as a security mechanism - if service availability falls below acceptable levels, penalties may be applied against this collateral.
check details about collateral here.
There are two methods for withdrawing collateral, each with different processing times:
Direct Withdrawal from Collateral Balance
Note: Funds are transferred immediately to the owner address.
Withdrawal from Escrow Balance
This process requires a waiting period and multiple steps:
Note: After submitting the withdrawal request, there is a mandatory 7-day waiting period before confirmation can be processed. Use the view command to monitor the withdrawal status.
FCP:
For applications deployed with Kubernetes or large model inference API services. Users can directly offer services via a running URL. Kubernetes deployment and maintenance are technically more challenging but provide higher rewards.
Configuration Requirements:
A public IP
A wildcard domain (e.g., *.example.com
)
An SSL certificate, primarily for Kubernetes Ingress reverse proxy
At least 1 GPU
At least 8 vCPUs
At least 100 GB SSD storage
At least 64 GB RAM
At least 50 MB bandwidth
ECP:
For applications deployed with Docker or Mining-type services. Easier to deploy with scripts available for quick setup.
Configuration Requirements:
A public IP
At least 1 GPU
At least 4 vCPUs
At least 300 GB HDD storage
At least 32 GB RAM
At least 20 MB bandwidth
Owner
, Worker
, and Beneficiary
addresses represent, and what are the differences?ownerAddress: The owner of the cpAccount
. Only the owner has permission to change account details, such as multi-address
, worker address
, beneficiary address
, etc. The owner's private key should not appear on the server under normal circumstances.
workerAddress: The working address, used for submitting messages (e.g., submitProof
). A certain amount of sETH is required for gas fees.
beneficiaryAddress: The beneficiary address where earnings from the cpAccount
are paid. This address is only used to receive funds, so its private key should not be stored on the server for security reasons. The purpose of these three address types is to ensure the security of the cpAccount
. Typically, the server should only need to maintain the private key for the worker address, not the owner or beneficiary addresses.
Follow the instructions in the CP Common Account Operations section to change the multiAddress
.
Collateral Calculation:
First, visit the Provider Dashboard to query your cpAccount
and find the CU value.
The collateral formula is: cu * base_collateral
. Currently, base_collateral = 3533
. It’s recommended to add 10% extra for safety.
You can check your collateral status via the CP Dashboard:
Sufficient collateral (Example):
Insufficient collateral (Example):
When you deploy an application to CP, the CP runs the service, and the SWAN monitoring system will penalize the CP if the service's availability is deemed poor. For more details, refer to the Slashing Mechanism.
Step 1: Check Collateral:
Ensure that the sum of Collateral
and Escrow
under the FCP Balance
is greater than the calculated collateral amount for proper staking.
Step 2: Check Versions:
CP Version:
Verify the CP version by checking the commit number in the official go-computing-provider repository to confirm if your version is up-to-date or the recommended stable version.
Resource-Exporter Version:
Verify the version of resource-exporter
by checking the required version in the official repository.
Step 3: Check Resource Endpoint:
Note: Replace
<cp-ip>
and<port>
with the corresponding information from yourCP_REPO
configuration file, whereMultiAddress = "/ip4/<ip>/tcp/<port>"
.
Step 4: Self-check by submitting a job:
Step 1: Check Collateral:
Ensure that the sum of Collateral
and Escrow
under the ECP Balance
is greater than the calculated collateral amount for proper staking.
Step 2:Check Versions:
CP Version:
Verify the CP version by checking the commit number in the official go-computing-provider repository to confirm if your version is up-to-date or the recommended stable version.
Resource-Exporter Version:
Verify the version of resource-exporter
by checking the required version in the official repository.
Step 3: Check Resource Endpoint:
Note: Replace
<cp-ip>
and<port>
with the corresponding information from yourCP_REPO
configuration file, whereMultiAddress = "/ip4/<ip>/tcp/<port>"
.
Step 4: Self-check by submitting a job:
Step 5: Dashboard Status Check: In the Provider Dashboard, locate your CP using the cpAccount
. Check that the status is Online
, and ensure collateral is sufficient (as shown in the example). If so, your CP is running properly.
Dashboard Status Check: In the Provider Dashboard, locate your CP using the cpAccount
. Check that the status is Online
, and ensure collateral is sufficient (as shown in the example). If so, your CP is running properly.