Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Celo Overhaul #1782

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/integration/custody.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Generally speaking, custodying CELO, the native token on the Celo network, requi

## Balance Model

As a fork of Ethereum, Celo retains the account model to keep track of users' balances. Celo Dollar and CELO implement the [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md) interface. As mentioned previously, it is common for smart contracts to hold balances on behalf of other addresses. One example is the [`LockedGold`](/what-is-celo/about-celo-l1/protocol/pos/locked-gold) smart contract that holds the "locked portion of a user's `CELO` balance". Another one is the [`ReleaseGold`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol) smart contract that holds `CELO` that is being released to a beneficiary address over time according to some schedule.
As a fork of Ethereum, Celo retains the account model to keep track of users' balances. Celo Dollar and CELO implement the [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md) interface. As mentioned previously, it is common for smart contracts to hold balances on behalf of other addresses. One example is the [LockedGold](https://docs-cel2.netlify.app/protocol/pos/locked-gold) smart contract that holds the "locked portion of a user's CELO balance". Another one is the [ReleaseGold](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol) smart contract that holds CELO that is being released to a beneficiary address over time according to some schedule.

:::warning

Expand All @@ -38,7 +38,7 @@ CELO and Celo Dollars implement the ERC20 interface, as will any future core sta

## CELO State Machine

CELO as described previously can also exist in various states that represent a specific user behavior. For example, if a user wants to lock CELO to either participate in consensus directly or vote, that CELO will be sent to the `LockedGold` smart contract. To understand the high level flow, please read [this description of the various states CELO can exist in](/what-is-celo/about-celo-l1/protocol/pos/locked-gold#locking-and-voting-flow).
CELO as described previously can also exist in various states that represent a specific user behavior. For example, if a user wants to lock CELO to either participate in consensus directly or vote, that CELO will be sent to the LockedGold smart contract. To understand the high level flow, please read [this description of the various states CELO can exist in](https://docs-cel2.netlify.app/protocol/pos/locked-gold#locking-and-voting-flow).

## Smart Contracts

Expand Down
77 changes: 77 additions & 0 deletions docs/integration/guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Celo Protocol Integration Guide
description: A comprehensive guide for applications building and integrating on Celo.
---

# Celo Protocol Integration Guide

A comprehensive guide for applications building and integrating on Celo.

---

## General Guidelines

## Address Handling

Celo addresses are identical to Ethereum addresses. When displaying and requesting user-inputted addresses, ensure to use and validate address checksums following the [EIP55 standard](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md) to detect typos.

For core smart contracts, developers are encouraged to use the Registry to reference contracts, allowing for potential repointing via Governance.

## Custodian/Exchange Integration

For detailed information, refer to [Custody](/integration/custody). Below is a summary:

## Transfer Detection

Stable-value currencies, cUSD and cEUR, are represented by `StableToken` and `StableTokenEUR` contracts, accessible via the ERC20 interface. The native asset CELO can be accessed via the `GoldToken` ERC20 interface or natively, similar to ETH on Ethereum.

Contract addresses can be found by querying the [registry](/developer/contractkit/contracts-wrappers-registry) or in the [Listing Guide](/integration/listings).

## Proof of Stake Participation

Users may participate in Celo's Proof of Stake system to help secure the network and earn rewards.

## Authorized Signers

Celo's core smart contracts use the Accounts abstraction, allowing balance-moving keys to be held in cold storage, while other keys can be authorized to vote and held in warm storage or online.

## Release Gold Contract

The ReleaseGold smart contract, which is audited, allows for the scheduled release of CELO to users.


## Wallet Integration

These guidelines apply to any application that manages keys and allows users to interact and transfer value on the Celo platform.

## Key Derivation

Celo wallets should follow [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) for deriving private keys from [BIP39 mnemonics](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). Celo's key derivation path is `m/44'/52752'/0'/0`. The first key is typically the `account key` for balance transfers, while the second key can be derived as the `dataEncryptionKey` for encrypting information.

## Identity Protocol

Celo has a [lightweight identity protocol](/protocol/identity) that allows users to address each other via phone numbers. To protect user privacy, Celo wallets should implement the [Phone Number Privacy protocol](/protocol/identity/odis-use-case-phone-number-privacy) to prevent large-scale harvesting of phone numbers.

## Wallet Address Management

When transferring assets, wallets should check the receiving account's `walletAddress`. Smart contract accounts may have different recovery characteristics but receive funds at a different address. A `walletAddress` of `0x0` indicates that a different mechanism is required to acquire the `walletAddress`.

## Transaction Metadata

cUSD (StableToken) includes an additional method, `transferWithComment`, allowing senders to specify a comment. Celo wallets should support this feature and encrypt comments to the `dataEncryptionKey` when applicable.

## Validator Group Explorers

[Validator Group Explorers](/holder/vote/validator) are essential to Celo's Proof of Stake system. Explorers should consider the following standards to ensure a consistent experience:

## Account Names

All Celo accounts on `Accounts.sol` can claim any name. Explorers should display these names while being aware of potential fraud.

## Identity Claims

Celo accounts can claim existing identities, some of which are verifiable (e.g., Domain Names, Keybase profiles). Explorers should display these identities to reduce impersonation risks.

## Performance Metrics

Validator Groups and their validators may perform differently. Explorers should reflect this to help voters choose an optimal validator set. While uptime (block signatures) affects rewards, explorers should also display [other metrics](https://docs-cel2.netlify.app/holder/vote/validator#choosing-a-validator-group) that impact the Celo ecosystem's success, such as performance in the identity protocol.
86 changes: 78 additions & 8 deletions docs/integration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import PageRef from '@components/PageRef'
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Celo Integrations
# Integrate with Celo

Collection of resources to help integrate Celo with your service.
## Celo Integrations

With its low fees and fast transactions, the Celo blockchain is a great choice for developers looking to deploy or optimize their dApps. Whether you’re transitioning from Web2 or refining an existing Web3 dApp, this guide will walk you through the key steps for deploying on Celo, including setting up your RPC provider, integrating payment and transparency solutions, and ensuring seamless operation on the network. Let’s explore how Celo can enhance your dApp for global adoption.

:::warning
As of block height 31,056,500 (March 26, 2025, 3:00 AM UTC), Celo is no longer a standalone Layer 1 blockchain—it is now an Ethereum Layer 2!
Expand All @@ -20,10 +22,78 @@ For the most up-to-date information, refer to our [Celo L2 documentation](https:

---

Celo provides you with the tools to easily integrate DeFi into your existing mobile application or blockchain service. Integrating with Celo allows you to accept payments, send payouts, and manage all of your DeFi needs using our global financial infrastructure.
## If you are an existing Web3 dApp

## Checklist

- **Deploy on Celo**: Ensure your dApp is deployed on the Celo network.
- **Test with Forno**: Use Forno, a hosted node service, to test your dApp without running your own node.
- **Deployment** : Make sure your RPC provider is on Celo. If not, here is a list of RPC providers:
- Forno
- Ankr
- Infura
- Quicknode
- All that node
- dRPC
- **Indexer**: Set up an indexer to efficiently query blockchain data if your dApp requires it.
- **Gas Fees**: Optimize gas fees by leveraging Celo's low-cost transaction capabilities.
- **Optimizing for Mobile Users**: Celo is designed with mobile-first interactions in mind. Ensure your dApp is optimized for mobile users.
- **Analytics**: Implement analytics to track user behavior and dApp performance.

## What else?

- **Security**: Conduct a security audit and publish the results.
- **User Experience**: Ensure a seamless user experience by integrating with Celo-optimized wallets like Valora and Opera MiniPay.
- **Community Engagement**: Engage with the Celo community for feedback and support.
- **Governance Participation**: Participate in Celo's governance by creating and voting on proposals. Refer to the Celo Governance Guide for detailed steps on how to get involved.
- **Celo Forum**: Join discussions, ask questions, and share your experiences on the Celo Forum. It's a great place to connect with other developers and community members.
- **Celo Discord**: For real-time support and collaboration, join the Celo Discord. Engage with the community, get help from developers, and stay updated on the latest news and events.

## If you are a Web2 dApp

## 2.1 Integrating Payment Solutions

- **Leverage Celo's Stablecoins**: Use Celo's stablecoins (cUSD, cEUR) for fast, low-cost transactions.
- **Step-by-Step Guide**: Integrate payments using smart contracts. Refer to the Celo Integration Guide for detailed steps.

## 2.2 Implementing Transparency Solutionď

- **Introduce Transparency**: Use blockchain to introduce transparency into your app (e.g., audit trails, open data).

## 2.3 Setting Up an Indexer for Your Data

- **Importance of Data Indexing**: Blockchain data indexing is crucial for Web3 transparency and efficiency.
- **Steps to Implement an Indexer**: Choose and implement a suitable indexer for Celo. Refer to the Celo Integration Guide for detailed steps.
2
## 2.4 Enhancing User Experience

- **Mobile Optimization:** Edqnsure your dApp is optimized for mobile devices, leveraging Celo's mobile-first design.
- **User-Friendly Wallets**: Integrate with Celo-optimized wallets like Valora and Opera MiniPay to provide a seamless user experience.

## 2.5 Ensuring Security
- **Smart Contract Audits**: Conduct thorough audits of your smart contracts to ensure security and reliability.
- **Security Best Practices**: Follow best practices for secure coding and deployment.

## 2.6 Engaging with the Community

- **Community Feedback**: Engage with the Celo community to gather feedback and support for your dApp.
- **Developer Support**: Utilize Celo's developer support channels for assistance and collaboration opportunities.

## 2.7 Compliance and Legal Considerations

- **Regulatory Compliance**: Ensure your dApp complies with relevant regulations and legal requirements.
- **Privacy Policies**: Implement and publish privacy policies that comply with GDPR or other applicable privacy laws.

## 2.8 Performance Optimization

- **Scalability**: Optimize your dApp for scalability to handle increased user load and transactions.
- **Performance Monitoring**: Implement monitoring tools to track the performance and health of your dApp.

---

Celo equips you with the tools to seamlessly integrate DeFi into your existing mobile application or blockchain service. By integrating with Celo, you can accept payments, send payouts, and manage all your DeFi needs using our global financial infrastructure.

- [General information](/integration/general)
- [Integration Checklist](/integration/checklist)
- [Custody](/integration/custody)
- [Listings](/integration/listings)
- [Using a Cloud HSM](/integration/cloud-hsm)
- [General Information](/integration)
- Protocol Integration Guide
- Custody Integrations
- Listings Guide
32 changes: 17 additions & 15 deletions docs/integration/listings.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Support for digital asset exchanges or ranking sites that would lik

# Listings

Support for digital asset exchanges or ranking sites that would like to run a Celo node and audit your setup.
Guidance for digital asset exchanges or ranking sites on running a Celo node and auditing your setup.

:::warning
As of block height 31,056,500 (March 26, 2025, 3:00 AM UTC), Celo is no longer a standalone Layer 1 blockchain—it is now an Ethereum Layer 2!
Expand All @@ -18,31 +18,33 @@ For the most up-to-date information, refer to our [Celo L2 documentation](https:

## Support

If you have any questions or need assistance with these instructions, please contact cLabs or ask in the #exchanges channel on [Celo’s Discord server](https://chat.celo.org/). Remember that Discord is a public channel: never disclose recovery phrases (also known as backup keys, or mnemonics), private keys, unsanitized log output, or personal information.
For any questions or assistance with these instructions, please contact cLabs or inquire in [Celo's Discord server](https://chat.celo.org/). Note that Discord is a public channel: never disclose recovery phrases (also known as backup keys or mnemonics), private keys, unsanitized log output, or personal information.

This guide provides comprehensive information on brand assets, integration with Celo, and useful listing information, as well as support resources.


This guide will also help you find all the necessary information about brand assets, how to integrate with Celo and what useful listing information are made available to you as well as any information about looking for support.

## Celo Brand Assets for Listing

If you are listing Celo on your exchange, you will probably need access to the Celo Platform brand assets. They can be found [here](https://celo.org/brand-kit).
If you are listing Celo on your exchange, you will probably need access to the Celo Platform brand assets. Available [here](https://celo.org/brand-kit).

Please ensure your use of the Celo Platform assets provided follows the brand policy found [here](https://celo.org/brand-kit-policy).
Ensure that your use of the Celo Platform assets complies with the brand policy found [here](https://celo.org/brand-kit-policy).

## How To's

### Integrating Celo With Your Infrastructure

There are several ways to integrate the Celo Platform with your infrastructure.

A general overview of integrations that would be relevant to you listing Celo Platform are shown [here](/integration/general).
A general overview of relevant integrations for listing Celo Platform is available [here](/integration/general).

For more specific use-cases for exchanges, please checkout the [Custody and Exchange Integration Guide](/integration/custody) as well.
For specific use-cases for exchanges, please refer to the [Custody and Exchange Integration Guide](/integration/custody).

## Important Information

### Celo Native Asset and Stable Value Currencies

There are key assets on the Celo network, the Celo native asset (CELO) and Celo-powered Stable Value Currencies, such as Celo Dollar (cUSD) and Celo Euro (cEUR). CELO was formerly called Celo Gold (cGLD) when the contract was deployed, so you will often see references to Celo Gold and CGLD in the codebase. To learn more about the two, please read [this](/developer/migrate/from-ethereum#the-celo-native-asset-and-the-celo-dollar) section of the docs.
The Celo network features key assets, including the Celo native asset (CELO) and Celo-powered Stable Value Currencies, such as Celo Dollar (cUSD) and Celo Euro (cEUR). CELO was formerly known as Celo Gold (cGLD) when the contract was deployed, so references to Celo Gold and CGLD may still appear in the codebase. For more information, please read [this](/developer/migrate/from-ethereum#the-celo-native-asset-and-the-celo-dollar) section of the documentation.

You can also view the forum post about the name change [here](https://forum.celo.org/t/proposal-to-rename-celo-gold-to-celo-native-asset/528).

Expand All @@ -57,13 +59,13 @@ You can also view the forum post about the name change [here](https://forum.celo

### Useful API endpoints

The following are useful API endpoints available to you that would help you in your listings of the CELO and cUSD digital assets.
The following API endpoints are useful for listing CELO and cUSD digital assets.

#### CELO and Stable Value Currencies

##### Total CELO supply

For querying the API on total coins in circulation in CELO, which are the total amount of coins in existence right now, the following endpoint will provide you with that:
To query the API for the total coins in circulation in CELO, use the following endpoint:

```sh
$ curl https://thecelo.com/api/v0.1.js?method=ex_totalcoins
Expand All @@ -87,7 +89,7 @@ This endpoint is not yet available.

#### CP-DOTO (Stability Algorithm)

CP-DOTO information can be found [here](/what-is-celo/about-celo-l1/protocol/stability/doto).
Information on CP-DOTO can be found [here](/protocol/stability/doto).

For API endpoints useful for listing that follow [CMC requirements](https://docs.google.com/document/d/1S4urpzUnO2t7DmS_1dc4EL4tgnnbTObPYXvDeBnukCg/edit#)

Expand Down Expand Up @@ -129,7 +131,7 @@ $ curl https://thecelo.com/api/v0.1.js?method=ex_ticker

##### Orderbook

Market depth of a trading pair. One array containing a list of ask prices and another array containing bid prices.
Market depth of a trading pair. One array contains a list of ask prices and another array contains bid prices.

```sh
$ curl https://thecelo.com/api/v0.1.js?method=ex_orderbook
Expand All @@ -151,16 +153,16 @@ $ curl https://thecelo.com/api/v0.1.js?method=ex_celocusd

To learn about the Celo Protocol, please refer to the [whitepaper](https://celo.org/papers).

If you need more information to explore other aspects of the Celo Protocol, there’s a [useful links](/what-is-celo/using-celo/) page.
For more information on other aspects of the Celo Protocol, visit the [useful links](/general/) page.

To learn more about the Stability Mechanism, you can find it over [here](/what-is-celo/about-celo-l1/protocol/stability/doto).
The [Stability Analysis Whitepaper](https://celo.org/papers/Celo_Stability_Analysis.pdf) and [blog post](https://medium.com/celohq/a-look-at-the-celo-stability-analysis-white-paper-part-1-23edd5ef8b5) will provide a lot more information on the stability algorithm.

If you want to find more information about the Celo Reserve, a diversified portfolio of cryptocurrencies supporting the ability of the Celo protocol to expand and contract the supply of Celo stable assets, please visit [https://reserve.mento.org/](https://reserve.mento.org/).
If you want to find more information about the Celo Reserve, a diversified portfolio of cryptocurrencies supporting the ability of the Celo protocol to expand and contract the supply of Celo stable assets, please visit [https://celoreserve.org/](https://celoreserve.org/).

### Github

The Celo Protocol GitHub is located [here.](https://github.com/celo-org/)
The Celo Protocol GitHub repository is located [here.](https://github.com/celo-org/)

### Audits

Expand Down
Loading