-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
140 additions
and
13 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,20 @@ | ||
:root { | ||
--vp-c-indigo-1: #0079c1; | ||
--vp-c-indigo-2: #0079c1; | ||
--vp-c-indigo-3: #00598d; | ||
--vp-c-indigo-soft: #00457c; | ||
} | ||
|
||
.dark { | ||
--vp-c-indigo-1: #81b8d9; | ||
--vp-c-indigo-2: #0079c1; | ||
--vp-c-indigo-3: #00457c; | ||
--vp-c-indigo-soft: #00457c; | ||
} | ||
|
||
:root { | ||
--vp-c-brand-1: var(--vp-c-indigo-1); | ||
--vp-c-brand-2: var(--vp-c-indigo-2); | ||
--vp-c-brand-3: var(--vp-c-indigo-3); | ||
--vp-c-brand-soft: var(--vp-c-indigo-soft); | ||
} |
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,4 @@ | ||
import DefaultTheme from "vitepress/theme"; | ||
import "./custom.css"; | ||
|
||
export default DefaultTheme; |
Empty file.
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,21 @@ | ||
# Welcome to _Build with PYUSD_ | ||
|
||
We're excited to have you here! We've built this site as a community resource for builders using [PYUSD](https://www.paypal.com/us/digital-wallet/manage-money/crypto/pyusd). Here you'll find guides, sample projects, and resources to help you get started building with PYUSD. | ||
|
||
## 🍜 Soup to nuts | ||
|
||
We've created some real world projects that use PYUSD, and these guides will walk you through building them yourself. | ||
|
||
The projects we've featured here are examples of what you can build with PYUSD. We've provided working sample projects and deployments to get you started. Feel free to remix, reuse, or contribute back to the community. | ||
|
||
- [Smart contract guide](/smart-contract/) + [solidity project](https://github.com/mono-koto/build-with-pyusd/tree/main/contracts) | ||
- [Frontend guide](/react-frontend/) + [react project](https://github.com/mono-koto/build-with-pyusd/tree/main/frontend) | ||
- [Source for these docs](https://github.com/mono-koto/build-with-pyusd/tree/main/docs) | ||
|
||
## 🧰 For developers | ||
|
||
These guides are intended for a mix of developers, builders, and hackers who are interested in building with PYUSD. We'll cover everything from setting up your development environment to deploying your first smart contract and frontend. | ||
|
||
## 📚 Extensible | ||
|
||
All content and projects are MIT licensed. Remix, reuse, or contribute back to the community. We're excited to see what you build! |
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,54 @@ | ||
# PYUSD | ||
|
||
[PayPal's PYUSD](https://www.paypal.com/us/digital-wallet/manage-money/crypto/pyusd) is an ERC-20 token available on the Ethereum blockchain that is pegged to the value of the US dollar. PayPal users can buy, hold, and sell PYUSD via their PayPal accounts, and can transfer PYUSD to and from other Ethereum wallets. | ||
|
||
## Addresses | ||
|
||
| Network | Address | | ||
| ------- | --------------------------------------------------------------------------------------------------------------------- | | ||
| Mainnet | [0x6c3ea9036406852006290770bedfcaba0e23a0e8](https://etherscan.io/address/0x6c3ea9036406852006290770bedfcaba0e23a0e8) | | ||
| Sepolia | [0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9](https://etherscan.io/address/0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9) | | ||
|
||
## Testnet Faucet | ||
|
||
PYUSD is available on the Sepolia testnet. You can get PYUSD from the [Paxos Sepolia faucet](https://faucet.paxos.com/). | ||
|
||
## Design | ||
|
||
PYUSD is an upgradeable ERC-20 token managed by [Paxos](https://www.paxos.com/). The token contract is written in an older version of Solidity (0.4.24), with a design that is very similar to [USDP](https://etherscan.io/token/0x8e870d67f660d95d5be530380d0ec0bd388289e1), which is also managed by Paxos. | ||
|
||
## Audits | ||
|
||
In 2023, Trail of Bits conducted an audit of the PYUSD contract. | ||
|
||
- [Trail of Bits Audit Report](https://github.com/paxosglobal/pyusd-contract/blob/master/audit-reports/Trail_of_Bits_Audit_Report.pdf) | ||
|
||
In addition, past audits covered the USDP and PAX contracts on which the PYUSD contract is based: | ||
|
||
- [Trail of Bits Audit Report](https://github.com/paxosglobal/usdp-contracts/blob/master/audit-reports/ChainSecurity_Audit_Report.pdf) | ||
- [Nomic Labs Audit Report](https://github.com/paxosglobal/usdp-contracts/blob/master/audit-reports/Nomic_Labs_Audit_Report.pdf) | ||
- [ChainSecurity Audit Report](https://github.com/paxosglobal/usdp-contracts/blob/master/audit-reports/ChainSecurity_Audit_Report.pdf) | ||
|
||
## Roles | ||
|
||
PYUSD's administration is centralized. It's worth noting the following: | ||
|
||
### Upgrades | ||
|
||
The contract is behind a proxy and is upgradeable, which means that the contract's logic can be updated without changing the contract's address. | ||
|
||
### Owner | ||
|
||
The contract has an `owner` address that can reclaim any PYUSD balance held by the actual PYUSD contract. The owner can also `pause` and `unpause` the contract, which disables all transfers and approvals. | ||
|
||
### Asset protection | ||
|
||
The contract has "freeze" functions – `freeze`, `unfreeze`, `wipeFrozenAddress`, and `isFrozen` – available to a designated `assetProtectionRole` address. These functions allow the `assetProtectionRole` to freeze and unfreeze any address, and to wipe the balance of any frozen address. Currently the owner and asset protection roles are the same address. | ||
|
||
### Supply control | ||
|
||
The contract has `increaseSupply` and `decreaseSupply` functions available to a designated `supplyController` address. These functions allow the `supplyController` to mint and burn PYUSD to itself. | ||
|
||
### Beta delegation | ||
|
||
A `betaDelegateWhitelister` role is able to add and remove beta delegates, who can then transfer PYUSD on behalf of other addresses. This role is currently unassigned. |
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