Delweng
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # The design of Circle USDC ## Overview - Deployed in 16 blockchains, https://www.circle.com/en/multi-chain-usdc - Ethereum mainnet deployed on 2018-08-03, https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 (USDT 2017-11-28) - EVM contract code: https://github.com/circlefin/stablecoin-evm ## Contracts ### USDC USDC: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 USDC is following [OpenZeppelin standards](https://docs.openzeppelin.com/contracts/2.x/): - [Upgradeable](https://docs.openzeppelin.com/contracts/5.x/api/proxy): use `org.zeppelinos.proxy.implementation` Proxy - [Ownable](https://docs.openzeppelin.com/contracts/2.x/api/ownership#Ownable) - [Pausable](https://docs.openzeppelin.com/contracts/4.x/api/security#Pausable) And USDC is also [Blacklistable](https://github.com/centrehq/centre-tokens/blob/master/contracts/v1/Blacklistable.sol), when an address was blacklisted, it can't do any asset related operations: - `mint`: msg.sender, to - `burn`: msg.sender - `transfer{From}``: msg.sender, from, to - `approve`: msg.sender, spender #### Roles - admin: swap between 0x807a96288A1A408dBC13DE2b1d087d10356395d2(EOA) and UpgradeContract - upgrade contract - owner: 0xfcb19e6a322b27c06842a71e8c725399f049ae3a(EOA) - change blacklister - change pauser - change masterMinter - pauser: 0x4914f61d25e5c567143774b76edbf4d5109a8566(EOA) - pause/unpause - blacklister: 0x10df6b6fe66dd319b1f82bab2d054cbb61cdad2e(EOA) - blacklist/unblacklist - masterMinter: 0xe982615d461dd5cd06575bbea87624fda4e3de17(Contract) - addMinter/removeMinter - configure minter minting allowance ### Upgrade Upgraded(address) '0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b' upgrade process: 1. [Circle Deployer](https://etherscan.io/address/0x95Ba4cF87D6723ad9C0Db21737D862bE80e93911) create a new Upgrader contract; 2. [USDC Admin](https://etherscan.io/address/0x807a96288A1A408dBC13DE2b1d087d10356395d2) call `changeAdmin` on USDC to change the admin from self to the new Upgrader contract; 3. [Circle Deployer](https://etherscan.io/address/0x95Ba4cF87D6723ad9C0Db21737D862bE80e93911) call `upgrade` on the Upgrader contract to upgrade the USDC contract, in the meanwhile, the admin of USDC will be changed back to the EOA address eg: 1. 18921600 https://etherscan.io/tx/0x7f6268ff5bd05d1b61c19889a46eb9a38563accce441dcfcf0c7515b1733503e create the upgrade contract 2. 18963710 https://etherscan.io/tx/0x4441f5f0d30b59f9db3083034605e5cfb35e3606a30e12f075feef3b1df81a15 change admin to the upgrade contract 3. 18963716 https://etherscan.io/tx/0xae3ad89e569f27d47a8a02999a6d937c12aaa6bc50e66650e7cbd3244bde9951 upgrading ### USDC Master Minter The Master Minter contract manages minters for a contract, It lets the owner designate certain addresses as controllers, and these controllers then manage the minters by adding and removing minters, as well as modifying their minting allowance. **A controller may manage exactly one minter, but the same minter address may be managed by multiple controllers.** USDC Master Minter: 0xe982615d461dd5cd06575bbea87624fda4e3de17 - owner: 0xc1d9fe41d19dd52cb3ae5d1d3b0030b5d498c704(EOA) - mintManager: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48(USDC Token) #### workflow eg: increase minter's allowance 1. owner.register (controller + minter): `configureController(address _controller, address _worker) public onlyOwner` 2. controller.increase minter allowance: `incrementMinterAllowance(uint256 _allowanceIncrement) public onlyController` 2.1. get minter with controller's address 2.2. set `_newAllowance = _allowanceIncrement + minterManager.minterAllowance(minter)` 2.2. call `minterManager.configureMinter(_minter, _newAllowance)` ## Data 1. All USDC events(2018 -- 2024.10.24) ```sql +-----------------------+-----------+---------------------+---------------------+ | event | count | min_blktime | max_blktime | |-----------------------+-----------+---------------------+---------------------| | Transfer | 103119655 | 2018-09-10 18:26:41 | 2024-10-24 07:38:47 | | Approval | 10490124 | 2018-09-28 18:57:11 | 2024-10-24 07:38:47 | | Burn | 300281 | 2018-09-25 13:12:07 | 2024-10-24 07:33:47 | | Mint | 224608 | 2018-09-10 18:26:41 | 2024-10-24 07:38:23 | | AuthorizationUsed | 8779 | 2020-09-27 07:22:27 | 2024-10-24 06:40:59 | | MinterConfigured | 1098 | 2018-08-17 14:53:44 | 2024-10-21 14:34:35 | | Blacklisted | 254 | 2020-06-16 04:39:08 | 2024-10-08 01:57:23 | | AdminChanged | 8 | 2018-08-03 19:30:30 | 2024-01-08 17:16:35 | | UnBlacklisted | 7 | 2021-12-23 23:35:00 | 2024-10-01 04:42:47 | | MinterRemoved | 4 | 2018-09-06 19:18:06 | 2021-04-06 17:40:45 | | Upgraded | 3 | 2020-08-27 15:32:54 | 2024-01-08 17:16:35 | | PauserChanged | 3 | 2018-09-06 13:06:02 | 2023-08-21 20:36:35 | | AuthorizationCanceled | 3 | 2021-04-02 02:08:09 | 2024-01-08 17:29:47 | | MasterMinterChanged | 2 | 2018-09-06 13:43:40 | 2019-06-12 15:03:34 | | BlacklisterChanged | 2 | 2019-06-27 19:42:27 | 2023-08-21 20:36:11 | | OwnershipTransferred | 1 | 2018-09-06 14:00:31 | 2018-09-06 14:00:31 | +-----------------------+-----------+---------------------+---------------------+ ``` 2. USDC Upgrade history ```csv date,txhash,implementation 2024-01-08,0xae3ad89e569f27d47a8a02999a6d937c12aaa6bc50e66650e7cbd3244bde9951,0x43506849d7c04f9138d1a2050bbf3a0c054402dd 2021-04-26,0xe2e40640ffd5f76538cd23660cf56f00bfebd5fe925ebad6b8067c4cee18a2c3,0xa2327a938febf5fec13bacfb16ae10ecbc4cbdcf 2020-08-27,0xe6f0f754398d89583da8e4229c5d7aaa00739a3ae334ecfc2839ac396b4836e3,0xb7277a6e95992041568d9391d09d0122023778a2 ``` Reference: - https://github.com/bhemen/usdc/blob/main/README.md#v22-upgrade-january-2024 - https://github.com/bhemen/usdc/blob/main/README.md#v21-upgrade - https://github.com/bhemen/usdc/blob/main/README.md#v2-upgrade-december-2020 3. USDC Minters ```csv minter,is_contract,allowance 0x5b6122c109b78c6755486966148c1d70a50a47d7,false,2648313326 0xc4922d64a24675e16e1586e3e3aa56c06fabe907,true,27392554 0x19a932fc5a8320939c3575302a8705147a7f27d8,false,24198 0x55fe002aeff02f77364de339a1292923a15844b8,false,0 0x24bdd8771b08c2ea6fe0e898126e65bd49021be3,false,0 0x3005a4c0efe7e66f3f60ef8704983247a5c6ca61,false,0 0x8967a7ce20043f876e42f8ad696b06bb632f0ca7,false,0 0x895f07957b863f4ab6086035a6990d8366bc3266,false,0 ``` 4. USDC Master Minter Controllers `event ControllerConfigured(address indexed _controller, address indexed _worker)` '0xa56687ff5096e83f6e2c673cda0b677f56bbfcdf5fe0555d5830c407ede193cb' ```csv minter,controller 0x5b6122c109b78c6755486966148c1d70a50a47d7,0x9d5c50ae9dc377b1fde6786bcfe8a70854fac5e4 0x5b6122c109b78c6755486966148c1d70a50a47d7,0x79e0946e1c186e745f1352d7c21ab04700c99f71 0xc4922d64a24675e16e1586e3e3aa56c06fabe907,0x0f493479be830657aca110199a70e826506a54d3 0x19a932fc5a8320939c3575302a8705147a7f27d8,0x4024071fe3fad805f922a9098630d09a2ec0f82c 0x19a932fc5a8320939c3575302a8705147a7f27d8,0xb0c9f95c1f0e686249ae0461e5e7657545379017 0xe7ab0dd2a069fa115c0d7878af6fd95ba0f9100a,0x33c1b799978d3f7830a24c6eddd169caa4b92b61 0xd4c1315948125cd20c11c5e9565a3632c1710055,0xfc48855a426c59d3cc9efd95ec3de1fcf6b2790e 0x8967a7ce20043f876e42f8ad696b06bb632f0ca7,0x14b1bc91cb99aad649b36341d5abeb50df775a3e 0x8967a7ce20043f876e42f8ad696b06bb632f0ca7,0xeb10024c7761e78cbbe78773ac6f6e98f3ed8314 0x895f07957b863f4ab6086035a6990d8366bc3266,0x08c71ca483e6c454a35d2ed56073a0297f0a2ec3 0x55fe002aeff02f77364de339a1292923a15844b8,0x14b1bc91cb99aad649b36341d5abeb50df775a3e 0x3005a4c0efe7e66f3f60ef8704983247a5c6ca61,0x08c71ca483e6c454a35d2ed56073a0297f0a2ec3 0x3005a4c0efe7e66f3f60ef8704983247a5c6ca61,0x7b3d54052df209679fce721516cc1b566ef1c6ab 0x24bdd8771b08c2ea6fe0e898126e65bd49021be3,0x39a372b4cc3fc91ba93238c9121cb4f98d057fb5 0x24bdd8771b08c2ea6fe0e898126e65bd49021be3,0x38d51f44b586b154159932f3681a30c54a6d25a9 ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully