Store One-Way Swap Contract Code
Purpose
This proposal stores the one_way_swap CosmWasm contract on XION mainnet. It lets holders of USDC.noble swap it for VERONA in one transaction, at a rate the contract admin sets. The contract pays out from its own VERONA balance; if that balance cannot cover a swap, the transaction reverts and the user keeps their USDC.
in_denom (USDC.noble): ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349 (transfer/channel-2, noble-1)
out_denom: uxion (VERONA)
- The rate is kept in line with the USDC and VERONA market prices by an automated updater holding an authz grant limited to
update_rate. It cannot withdraw funds or change the admin.
Source and Build Provenance
- Repository: https://github.com/burnt-labs/verona-swap-contract
- Commit: https://github.com/burnt-labs/verona-swap-contract/commit/82e595cace53b8ffc01be37ec03f075c9f70f194
- Contract path: contracts/one_way_swap (originally added in https://github.com/burnt-labs/contracts/pull/146)
- Reproduced with: cosmwasm/optimizer:0.17.0@sha256:7e0b9229c1a4118d0c9a2af2e7f5d95a91f264c26a2ce5681c779926e74d7f85 on amd64
- Raw WASM size: 281929 bytes
- SHA-256: e6e3e10f2149686763a3b2643a4def44dc1731bb8746922943f057bb6e201df4
Testnet Deployment
The exact bytecode in this proposal is deployed on xion-testnet-2 as code ID 2332.
- Code listing: https://explorer.testnet.burnt.com/verona/cosmwasm/2332/contracts
- Store transaction: https://explorer.testnet.burnt.com/verona/tx/31431D13C7791932AC27C61811370D7DD6F73686EA446F62C37F801CB1AA5391
- Testnet contract:
xion1d92yn4wrqkfpsympux9pycyrjecdeevkur68d8gpl424uarfdvqsl2euuh
- Verified on testnet: a 1 USDC swap paid exactly
floor(1000000 * rate) uxion, and a swap below its min_out reverted with the sender's balance unchanged.
Instantiation Permission and Scope
Instantiation is open to everybody. This proposal stores contract code only; it does not instantiate a mainnet contract. Mainnet will assign a new code ID when the proposal executes.