{"id":18542763,"url":"https://github.com/coinbase/wrapped-tokens-os","last_synced_at":"2025-10-31T10:48:26.577Z","repository":{"id":66163501,"uuid":"558100033","full_name":"coinbase/wrapped-tokens-os","owner":"coinbase","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-09T07:25:27.000Z","size":2754,"stargazers_count":15,"open_issues_count":2,"forks_count":13,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-24T10:38:49.637Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coinbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-26T22:34:04.000Z","updated_at":"2025-01-28T23:16:28.000Z","dependencies_parsed_at":"2024-11-06T20:10:32.186Z","dependency_job_id":"30db18fc-0b63-4363-92bc-2881dff4734a","html_url":"https://github.com/coinbase/wrapped-tokens-os","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fwrapped-tokens-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fwrapped-tokens-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fwrapped-tokens-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fwrapped-tokens-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinbase","download_url":"https://codeload.github.com/coinbase/wrapped-tokens-os/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248087858,"owners_count":21045602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:10:27.346Z","updated_at":"2025-10-31T10:48:26.568Z","avatar_url":"https://github.com/coinbase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wrapped-tokens\n\nWrapped tokens representing staked and generic assets. cbETH logo assets are in the `cbETH Logo Kit` directory.\n\n## Setup\n\nRequirements:\n\n- Node \u003e= v12\n- Yarn\n\n```\n$ cd wrapped-tokens\n$ npm i -g yarn       # Install yarn if you don't already have it\n$ yarn install        # Install dependencies\n$ yarn setup          # Setup Git hooks\n```\n\n## TypeScript type definition files for the contracts\n\nTo generate type definitions:\n\n```\n$ yarn compile \u0026\u0026 yarn typechain\n```\n\n## Linting and Formatting\n\nTo check code for problems:\n\n```\n$ yarn typecheck      # Type-check TypeScript code\n$ yarn lint           # Check JavaScript and TypeScript code\n$ yarn lint --fix     # Fix problems where possible\n$ yarn solhint        # Check Solidity code\n$ yarn slither        # Run Slither\n```\n\nTo auto-format code:\n\n```\n$ yarn fmt\n```\n\n## Testing\n\nRun all tests:\n\n```\n$ yarn test\n```\n\nTo run tests in a specific file, run:\n\n```\n$ yarn test [path/to/file]\n```\n\nTo run tests and generate test coverage, run:\n\n```\n$ yarn coverage\n```\n\n## Contracts\n\n[High Level Flow](./doc/weth2SmartContractsHighLevel.png)\n\nThe implementation consists of 4 separate contracts, reusing\n[centre-tokens](https://github.com/centrehq/centre-tokens) audited and battle\ntested code whenever possible.\n\n- A\n  [proxy contract](https://github.com/centrehq/centre-tokens/blob/v2.1.0/contracts/v1/FiatTokenProxy.sol)\n  which is an exact duplicate of the proxy contract used be centre-tokens.\n- A token contract which for generic wrapped assets will be an exact duplicate\n  of centre-tokens\n  [fiat token](https://github.com/centrehq/centre-tokens/blob/v2.1.0/contracts/v2/FiatTokenV2_1.sol)\n  or for wrapped staked assets will be a staked token (`StakedTokenV1.sol`)\n  which inherits directly from centre-token's fiat tokens and adds exchange rate\n  functionality.\n- A mint forwarder contract (`MinterForwarder.sol`) which contains rate limited\n  minting functionality for our wrapped tokens.\n- An exchange rate updater contract (`ExchangeRateUpdater.sol`) which will only\n  be used for wrapped staked assets and contains rate limited exchange rate\n  updating functionality.\n\n### ERC20 compatible\n\nAll wrapped tokens implement the ERC20 interface.\n\n### Staked Token Differences from FiatToken\n\nWrapped staked tokens will be used to wrap staked assets. The wrapped staked\ntokens inherit from Centre's fiat token contract and add an oracle role that can\nset an exchangeRate. Both the `oracle` and the `exchangeRate` are stored in\nunstructured storage to maximize forward compatibility with future centre fiat\ntoken upgrades.\n\n### Rate Limited Minting\n\nThe fiat token contract's built in minting has fixed minting allowances that\nwhen depleted require the `masterMinter` cold key to restore the mint allowance.\nWe've introduced a\nminting forwarder contract that'll allow us to continously mint up to N tokens\nover M time, with the mint allowance replenishing programmatically.\n\n### Rate Limited Exchange Rate Updates\n\nWrapped staked tokens will have a floating exchange rate that is set off-chain.\nGiven the high frequency with which we'll have to update wrapped\nstaked tokens exchange rates we'll utilize a seperate rate limited exchange rate\nupdater contract to minimize operational load.\n\n### Ownable\n\nThe contract has an Owner, who can change the `owner`, `pauser`, `blacklister`,\n`masterMinter`, or `oracle` addresses. The `owner` can not change the\n`proxyOwner` address.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase%2Fwrapped-tokens-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinbase%2Fwrapped-tokens-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase%2Fwrapped-tokens-os/lists"}