Skip to content

Instantly share code, notes, and snippets.

@hav-noms
hav-noms / nUSDa-Havven.sol
Created June 27, 2018 00:16
Havven Token Contract
/*
* Havven Token Contract
*
* Havven is a decentralised payment network and stablecoin.
*
* version: nUSDa
* date: 22/6/18
* url: https://github.com/Havven/havven/blob/nUSDa/contracts/Havven.sol
*/
@hav-noms
hav-noms / nUSDa-Havven bytecode
Created June 27, 2018 01:25
The local solc compiled bytecode and bytecode etherscan is looking for
Compiled Bytecode
0x60806040526224ea00601055612a3060185566b1a2bc2ec500006019553480156200002957600080fd5b5060405160a080620039b183398101604081815282516020808501518386015160608701516080909701518587018652600687527f48617676656e0000000000000000000000000000000000000000000000000000848801528551808701909652600386527f484156000000000000000000000000000000000000000000000000000000000093860193909352929590949293909286916a52b7d2dcc80cd2e4000000878785818080600160a060020a0381161515620000e857600080fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600160a060020a03811615156200015757600080fd5b60038054600160a060020a038316610100810261010060a860020a03199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a15060048054600160a060020a038416600160a060020a0319909116811790915560408051918252517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13
@hav-noms
hav-noms / mintr.abi
Last active August 1, 2018 04:52
Nomin Mint, Burn, Collect
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"nominsIssued","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"issuer","type":"address"}],"name":"remainingIssuableNomins","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"issuer","type":"address"}],"name":"maxIssuableNomins","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"issueNomins","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"issueMaxNomins","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"burnNomins","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"functi
/*
* Depot Contract
* date: 27/11/18
* version: v3.0
* source: https://github.com/Havven/havven/blob/11aa8479f71eeaa3d17ffe0a0476043543b68b60/contracts/Depot.sol
*
* The Depot contract allows for users to perform the following exchanges:
* • Ether to Nomins, via a FIFO exchange queue.
* • Ether to Havvens.
* • Nomins to Ether, via a FIFO exchange queue.
/*
* Nomin Contract
*
* The stable exchange token of the Havven stablecoin system.
*
* version: nUSDa.2
* date: 27 Nov 2018
* source: https://github.com/Havven/havven/blob/11aa8479f71eeaa3d17ffe0a0476043543b68b60/contracts/Nomin.sol
*
* MIT License
0x6080604052612a306007553480156200001757600080fd5b50604051620026f6380380620026f683398101604090815281516020830151918301516060840151919390810191018380600160a060020a0381161515620000c057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600160a060020a0381161515620001b757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4f776e6572206d757374206e6f7420626520746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60038054600160a060020a038316610100810261010060a860020a03199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47c
## Currency Keys (Ascii to hex)
ETH 0x455448
SNX 0x534e58
XDR 0x584452
sUSD 0x73555344
sAUD 0x73415544
sEUR 0x73455552
sJPY 0x734a5059
sXAU 0x73584155
## Synthetix MAINNET Token Contracts
╔══════════════════════╤════════════════════════════════════════════╗
║ Proxy.Synthetix(SNX) │ 0xC011A72400E58ecD99Ee497CF89E3775d4bd732F ║
╟──────────────────────┼────────────────────────────────────────────╢
║ Proxy.XDR │ 0x62492F15cF60c5847d3053e482cAde8C5c29af88 ║
╟──────────────────────┼────────────────────────────────────────────╢
║ Proxy.sUSD │ 0x57Ab1E02fEE23774580C119740129eAC7081e9D3 ║
╟──────────────────────┼────────────────────────────────────────────╢
║ Proxy.sEUR │ 0x3EB064766109D150e4362222df80638BcE00e037 ║
[
{
"constant": false,
"inputs": [
{
"name": "_paused",
"type": "bool"
}
],
"name": "setPaused",
Authors Response to smart contract Audit
https://gist.github.com/syncikin/0d027dd8bc9d0263b401290fee00f09e
5.3.1
No action taken
Synthetix Response:
Our plan for upgrading the XDR rate is to introduce a replacement XDR Synth with its own rate, then allow people to exchange between these tokens using existing mechanisms. FeePool would need to handle balances in both for a transition period.
5.3.2 Incorrect Exchange Fee Rate Validation