Address Contract Partially Verified
Address
0xb59926318205e681CC3DABA36e56e68Dd35a87C9
Balance
0 ETH
Nonce
1
Code Size
19434 bytes
Creator
0x74Ef7035...01ED at tx 0x812cbfa2...3af3b4
Indexed Transactions
0
Contract Bytecode
19434 bytes
0x608060405234801561001057600080fd5b50600436106100415760003560e01c80638d52dd8114610046578063d841280514610076578063fc41271d1461007e575b600080fd5b6100746004803603604081101561005c57600080fd5b506001600160a01b03813581169160200135166100a4565b005b610074610a9a565b6100746004803603602081101561009457600080fd5b50356001600160a01b0316610f58565b60003390506000816001600160a01b031663ba83c16f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100e457600080fd5b505afa1580156100f8573d6000803e3d6000fd5b505050506040513d602081101561010e57600080fd5b505160408051639b2ea4bd60e01b8152737b123f53421b1bf8533339bfbdc7c98aa94163db6024820152600481018290526011604482015270627569646c546f6b656e4164647265737360781b606482015290519192506001600160a01b03831691639b2ea4bd916084808201926020929091908290030181600087803b15801561019857600080fd5b505af11580156101ac573d6000803e3d6000fd5b505050506040513d60208110156101c257600080fd5b505060408051639b2ea4bd60e01b81527334612903db071e888a4dadcaa416d3ee263a87b9602482015260048101829052601060448201526f61727465546f6b656e4164647265737360801b606482015290516001600160a01b03831691639b2ea4bd9160848083019260209291908290030181600087803b15801561024757600080fd5b505af115801561025b573d6000803e3d6000fd5b505050506040513d602081101561027157600080fd5b505060408051639b2ea4bd60e01b8152739e78b8274e1d6a76a0dbbf90418894df27cbceb56024820152600481018290526011604482015270756e696669546f6b656e4164647265737360781b606482015290516001600160a01b03831691639b2ea4bd9160848083019260209291908290030181600087803b1580156102f757600080fd5b505af115801561030b573d6000803e3d6000fd5b505050506040513d602081101561032157600080fd5b505060408051639b2ea4bd60e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48602482015260048101829052601060448201526f75534443546f6b656e4164647265737360801b606482015290516001600160a01b03831691639b2ea4bd9160848083019260209291908290030181600087803b1580156103a657600080fd5b505af11580156103ba573d6000803e3d6000fd5b505050506040513d60208110156103d057600080fd5b505060408051639b2ea4bd60e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d6024820152600481018290526016604482015275756e69737761705632526f757465724164647265737360501b606482015290516001600160a01b03831691639b2ea4bd9160848083019260209291908290030181600087803b15801561045b57600080fd5b505af115801561046f573d6000803e3d6000fd5b505050506040513d602081101561048557600080fd5b50506040805163825de8af60e01b815261189c602482015260048101829052600e60448201526d1cddd85c109b1bd8dad31a5b5a5d60921b606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b1580156104f657600080fd5b505af115801561050a573d6000803e3d6000fd5b505050506040513d602081101561052057600080fd5b50506040805163825de8af60e01b8152681043561a8829300000602482015260048101829052601d60448201527f627569646c416d6f756e74546f53776170466f724574686572496e5632000000606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b1580156105a757600080fd5b505af11580156105bb573d6000803e3d6000fd5b505050506040513d60208110156105d157600080fd5b50506040805163825de8af60e01b8152681043561a8829300000602482015260048101829052601c60448201527f627569646c416d6f756e74546f53776170466f7255534443496e563200000000606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b15801561065857600080fd5b505af115801561066c573d6000803e3d6000fd5b505050506040513d602081101561068257600080fd5b50506040805163825de8af60e01b8152680882d00c2da8540000602482015260048101829052601c60448201527f61727465416d6f756e74546f53776170466f724574686572496e563200000000606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b15801561070957600080fd5b505af115801561071d573d6000803e3d6000fd5b505050506040513d602081101561073357600080fd5b50506040805163825de8af60e01b8152680882d00c2da8540000602482015260048101829052601c60448201527f61727465416d6f756e74546f53776170466f72427569646c496e563200000000606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b1580156107ba57600080fd5b505af11580156107ce573d6000803e3d6000fd5b505050506040513d60208110156107e457600080fd5b50506040805163825de8af60e01b8152689218a35d472dbc0000602482015260048101829052601d60448201527f756e696669416d6f756e74546f53776170466f724574686572496e5632000000606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b15801561086b57600080fd5b505af115801561087f573d6000803e3d6000fd5b505050506040513d602081101561089557600080fd5b50506040805163825de8af60e01b8152684fb0591b9b30380000602482015260048101829052601c60448201527f756e696669416d6f756e74546f53776170466f7255534443496e563200000000606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b15801561091c57600080fd5b505af1158015610930573d6000803e3d6000fd5b505050506040513d602081101561094657600080fd5b50506040805163825de8af60e01b81526827d82c8dcd981c0000602482015260048101829052601d60448201527f756e696669416d6f756e74546f53776170466f72427569646c496e5632000000606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b1580156109cd57600080fd5b505af11580156109e1573d6000803e3d6000fd5b505050506040513d60208110156109f757600080fd5b50506040805163825de8af60e01b815262a3c93d602482015260048101829052600d60448201526c6c61737453776170426c6f636b60981b606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b505050506040513d6020811015610a9257600080fd5b505050505050565b60003390506000816001600160a01b031663ba83c16f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ada57600080fd5b505afa158015610aee573d6000803e3d6000fd5b505050506040513d6020811015610b0457600080fd5b505160408051630bb687e360e01b8152602060048201819052600e60248301526d1cddd85c109b1bd8dad31a5b5a5d60921b604483015291519293506001600160a01b03841692630bb687e392606480840193919291829003018186803b158015610b6e57600080fd5b505afa158015610b82573d6000803e3d6000fd5b505050506040513d6020811015610b9857600080fd5b505160408051630bb687e360e01b8152602060048201819052600d60248301526c6c61737453776170426c6f636b60981b604483015291516001600160a01b03851692630bb687e39260648082019391829003018186803b158015610bfc57600080fd5b505afa158015610c10573d6000803e3d6000fd5b505050506040513d6020811015610c2657600080fd5b505101431015610c7d576040805162461bcd60e51b815260206004820152601d60248201527f546f6f206561726c7920746f2073776170206e657720546f6b656e7321000000604482015290519081900360640190fd5b6040805163825de8af60e01b815243602482015260048101829052600d60448201526c6c61737453776170426c6f636b60981b606482015290516001600160a01b0383169163825de8af9160848083019260209291908290030181600087803b158015610ce957600080fd5b505af1158015610cfd573d6000803e3d6000fd5b505050506040513d6020811015610d1357600080fd5b5050604080516331c6903d60e01b815290516000916001600160a01b038516916331c6903d91600480820192602092909190829003018186803b158015610d5957600080fd5b505afa158015610d6d573d6000803e3d6000fd5b505050506040513d6020811015610d8357600080fd5b50516040805163bf40fac160e01b81526020600482018190526011602483015270627569646c546f6b656e4164647265737360781b604483015291519293506000926001600160a01b0386169263bf40fac19260648082019391829003018186803b158015610df157600080fd5b505afa158015610e05573d6000803e3d6000fd5b505050506040513d6020811015610e1b57600080fd5b50516040805163bf40fac160e01b81526020600482018190526016602483015275756e69737761705632526f757465724164647265737360501b604483015291519293506000926001600160a01b0387169263bf40fac19260648082019391829003018186803b158015610e8e57600080fd5b505afa158015610ea2573d6000803e3d6000fd5b505050506040513d6020811015610eb857600080fd5b5051604080516315ab88c960e31b815290519192506000916001600160a01b0384169163ad5c4648916004808301926020929190829003018186803b158015610f0057600080fd5b505afa158015610f14573d6000803e3d6000fd5b505050506040513d6020811015610f2a57600080fd5b50519050610f3c868685858589612bfd565b610f4a868685858589612dcf565b610a92868685858589613039565b6000336001600160a01b031663ba83c16f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9357600080fd5b505afa158015610fa7573d6000803e3d6000fd5b505050506040513d6020811015610fbd57600080fd5b505160408051630b67a81f60e11b8152602060048201526011602482015270627569646c546f6b656e4164647265737360781b604482015290519192506001600160a01b038316916316cf503e9160648082019260009290919082900301818387803b15801561102c57600080fd5b505af1158015611040573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561106957600080fd5b8101908080516040519392919084600160201b82111561108857600080fd5b90830190602082018581111561109d57600080fd5b8251600160201b8111828201881017156110b657600080fd5b82525081516020918201929091019080838360005b838110156110e35781810151838201526020016110cb565b50505050905090810190601f1680156111105780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561113257600080fd5b90830190602082018581111561114757600080fd5b8251600160201b81118282018810171561116057600080fd5b82525081516020918201929091019080838360005b8381101561118d578181015183820152602001611175565b50505050905090810190601f1680156111ba5780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601060248301526f61727465546f6b656e4164647265737360801b6044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561122957600080fd5b505af115801561123d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561126657600080fd5b8101908080516040519392919084600160201b82111561128557600080fd5b90830190602082018581111561129a57600080fd5b8251600160201b8111828201881017156112b357600080fd5b82525081516020918201929091019080838360005b838110156112e05781810151838201526020016112c8565b50505050905090810190601f16801561130d5780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561132f57600080fd5b90830190602082018581111561134457600080fd5b8251600160201b81118282018810171561135d57600080fd5b82525081516020918201929091019080838360005b8381101561138a578181015183820152602001611372565b50505050905090810190601f1680156113b75780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b8252602060048301526011602483015270756e696669546f6b656e4164647265737360781b6044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561142757600080fd5b505af115801561143b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561146457600080fd5b8101908080516040519392919084600160201b82111561148357600080fd5b90830190602082018581111561149857600080fd5b8251600160201b8111828201881017156114b157600080fd5b82525081516020918201929091019080838360005b838110156114de5781810151838201526020016114c6565b50505050905090810190601f16801561150b5780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561152d57600080fd5b90830190602082018581111561154257600080fd5b8251600160201b81118282018810171561155b57600080fd5b82525081516020918201929091019080838360005b83811015611588578181015183820152602001611570565b50505050905090810190601f1680156115b55780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601060248301526f75534443546f6b656e4164647265737360801b6044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561162457600080fd5b505af1158015611638573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561166157600080fd5b8101908080516040519392919084600160201b82111561168057600080fd5b90830190602082018581111561169557600080fd5b8251600160201b8111828201881017156116ae57600080fd5b82525081516020918201929091019080838360005b838110156116db5781810151838201526020016116c3565b50505050905090810190601f1680156117085780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561172a57600080fd5b90830190602082018581111561173f57600080fd5b8251600160201b81118282018810171561175857600080fd5b82525081516020918201929091019080838360005b8381101561178557818101518382015260200161176d565b50505050905090810190601f1680156117b25780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b8252602060048301526016602483015275756e69737761705632526f757465724164647265737360501b6044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561182757600080fd5b505af115801561183b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561186457600080fd5b8101908080516040519392919084600160201b82111561188357600080fd5b90830190602082018581111561189857600080fd5b8251600160201b8111828201881017156118b157600080fd5b82525081516020918201929091019080838360005b838110156118de5781810151838201526020016118c6565b50505050905090810190601f16801561190b5780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561192d57600080fd5b90830190602082018581111561194257600080fd5b8251600160201b81118282018810171561195b57600080fd5b82525081516020918201929091019080838360005b83811015611988578181015183820152602001611970565b50505050905090810190601f1680156119b55780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152600e60248301526d1cddd85c109b1bd8dad31a5b5a5d60921b6044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b158015611a2257600080fd5b505af1158015611a36573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015611a5f57600080fd5b8101908080516040519392919084600160201b821115611a7e57600080fd5b908301906020820185811115611a9357600080fd5b8251600160201b811182820188101715611aac57600080fd5b82525081516020918201929091019080838360005b83811015611ad9578181015183820152602001611ac1565b50505050905090810190601f168015611b065780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b821115611b2857600080fd5b908301906020820185811115611b3d57600080fd5b8251600160201b811182820188101715611b5657600080fd5b82525081516020918201929091019080838360005b83811015611b83578181015183820152602001611b6b565b50505050905090810190601f168015611bb05780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601d60248301527f627569646c416d6f756e74546f53776170466f724574686572496e56320000006044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b158015611c2c57600080fd5b505af1158015611c40573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015611c6957600080fd5b8101908080516040519392919084600160201b821115611c8857600080fd5b908301906020820185811115611c9d57600080fd5b8251600160201b811182820188101715611cb657600080fd5b82525081516020918201929091019080838360005b83811015611ce3578181015183820152602001611ccb565b50505050905090810190601f168015611d105780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b821115611d3257600080fd5b908301906020820185811115611d4757600080fd5b8251600160201b811182820188101715611d6057600080fd5b82525081516020918201929091019080838360005b83811015611d8d578181015183820152602001611d75565b50505050905090810190601f168015611dba5780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601c60248301527f627569646c416d6f756e74546f53776170466f7255534443496e5632000000006044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b158015611e3657600080fd5b505af1158015611e4a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015611e7357600080fd5b8101908080516040519392919084600160201b821115611e9257600080fd5b908301906020820185811115611ea757600080fd5b8251600160201b811182820188101715611ec057600080fd5b82525081516020918201929091019080838360005b83811015611eed578181015183820152602001611ed5565b50505050905090810190601f168015611f1a5780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b821115611f3c57600080fd5b908301906020820185811115611f5157600080fd5b8251600160201b811182820188101715611f6a57600080fd5b82525081516020918201929091019080838360005b83811015611f97578181015183820152602001611f7f565b50505050905090810190601f168015611fc45780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601c60248301527f61727465416d6f756e74546f53776170466f724574686572496e5632000000006044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561204057600080fd5b505af1158015612054573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561207d57600080fd5b8101908080516040519392919084600160201b82111561209c57600080fd5b9083019060208201858111156120b157600080fd5b8251600160201b8111828201881017156120ca57600080fd5b82525081516020918201929091019080838360005b838110156120f75781810151838201526020016120df565b50505050905090810190601f1680156121245780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561214657600080fd5b90830190602082018581111561215b57600080fd5b8251600160201b81118282018810171561217457600080fd5b82525081516020918201929091019080838360005b838110156121a1578181015183820152602001612189565b50505050905090810190601f1680156121ce5780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601c60248301527f61727465416d6f756e74546f53776170466f72427569646c496e5632000000006044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561224a57600080fd5b505af115801561225e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561228757600080fd5b8101908080516040519392919084600160201b8211156122a657600080fd5b9083019060208201858111156122bb57600080fd5b8251600160201b8111828201881017156122d457600080fd5b82525081516020918201929091019080838360005b838110156123015781810151838201526020016122e9565b50505050905090810190601f16801561232e5780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561235057600080fd5b90830190602082018581111561236557600080fd5b8251600160201b81118282018810171561237e57600080fd5b82525081516020918201929091019080838360005b838110156123ab578181015183820152602001612393565b50505050905090810190601f1680156123d85780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601d60248301527f756e696669416d6f756e74546f53776170466f724574686572496e56320000006044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561245457600080fd5b505af1158015612468573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561249157600080fd5b8101908080516040519392919084600160201b8211156124b057600080fd5b9083019060208201858111156124c557600080fd5b8251600160201b8111828201881017156124de57600080fd5b82525081516020918201929091019080838360005b8381101561250b5781810151838201526020016124f3565b50505050905090810190601f1680156125385780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561255a57600080fd5b90830190602082018581111561256f57600080fd5b8251600160201b81118282018810171561258857600080fd5b82525081516020918201929091019080838360005b838110156125b557818101518382015260200161259d565b50505050905090810190601f1680156125e25780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601c60248301527f756e696669416d6f756e74546f53776170466f7255534443496e5632000000006044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561265e57600080fd5b505af1158015612672573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561269b57600080fd5b8101908080516040519392919084600160201b8211156126ba57600080fd5b9083019060208201858111156126cf57600080fd5b8251600160201b8111828201881017156126e857600080fd5b82525081516020918201929091019080838360005b838110156127155781810151838201526020016126fd565b50505050905090810190601f1680156127425780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561276457600080fd5b90830190602082018581111561277957600080fd5b8251600160201b81118282018810171561279257600080fd5b82525081516020918201929091019080838360005b838110156127bf5781810151838201526020016127a7565b50505050905090810190601f1680156127ec5780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152601d60248301527f756e696669416d6f756e74546f53776170466f72427569646c496e56320000006044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b15801561286857600080fd5b505af115801561287c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160409081528110156128a557600080fd5b8101908080516040519392919084600160201b8211156128c457600080fd5b9083019060208201858111156128d957600080fd5b8251600160201b8111828201881017156128f257600080fd5b82525081516020918201929091019080838360005b8381101561291f578181015183820152602001612907565b50505050905090810190601f16801561294c5780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561296e57600080fd5b90830190602082018581111561298357600080fd5b8251600160201b81118282018810171561299c57600080fd5b82525081516020918201929091019080838360005b838110156129c95781810151838201526020016129b1565b50505050905090810190601f1680156129f65780820380516001836020036101000a031916815260200191505b506040818152630b67a81f60e11b825260206004830152600d60248301526c6c61737453776170426c6f636b60981b6044830152516001600160a01b03881696506316cf503e955060648083019550600094509092509082900301818387803b158015612a6257600080fd5b505af1158015612a76573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015612a9f57600080fd5b8101908080516040519392919084600160201b821115612abe57600080fd5b908301906020820185811115612ad357600080fd5b8251600160201b811182820188101715612aec57600080fd5b82525081516020918201929091019080838360005b83811015612b19578181015183820152602001612b01565b50505050905090810190601f168015612b465780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b821115612b6857600080fd5b908301906020820185811115612b7d57600080fd5b8251600160201b811182820188101715612b9657600080fd5b82525081516020918201929091019080838360005b83811015612bc3578181015183820152602001612bab565b50505050905090810190601f168015612bf05780820380516001836020036101000a031916815260200191505b5060405250505050505050565b60408051630bb687e360e01b8152602060048201819052601d60248301527f627569646c416d6f756e74546f53776170466f724574686572496e5632000000604483015291516000926001600160a01b03891692630bb687e39260648083019392829003018186803b158015612c7257600080fd5b505afa158015612c86573d6000803e3d6000fd5b505050506040513d6020811015612c9c57600080fd5b505160408051630bb687e360e01b8152602060048201819052601c60248301527f627569646c416d6f756e74546f53776170466f7255534443496e563200000000604483015291519293506000926001600160a01b038a1692630bb687e39260648082019391829003018186803b158015612d1657600080fd5b505afa158015612d2a573d6000803e3d6000fd5b505050506040513d6020811015612d4057600080fd5b50516040805163dbba0f0160e01b815230600482015284830160248201526001600160a01b0389811660448301529151929350908a169163dbba0f019160648082019260009290919082900301818387803b158015612d9e57600080fd5b505af1158015612db2573d6000803e3d6000fd5b50505050612dc58783838989898961334d565b5050505050505050565b6040805163bf40fac160e01b8152602060048201819052601060248301526f61727465546f6b656e4164647265737360801b604483015291516000926001600160a01b0389169263bf40fac19260648083019392829003018186803b158015612e3757600080fd5b505afa158015612e4b573d6000803e3d6000fd5b505050506040513d6020811015612e6157600080fd5b505160408051630bb687e360e01b8152602060048201819052601c60248301527f61727465416d6f756e74546f53776170466f724574686572496e563200000000604483015291519293506000926001600160a01b038a1692630bb687e39260648082019391829003018186803b158015612edb57600080fd5b505afa158015612eef573d6000803e3d6000fd5b505050506040513d6020811015612f0557600080fd5b505160408051630bb687e360e01b8152602060048201819052601c60248301527f61727465416d6f756e74546f53776170466f72427569646c496e563200000000604483015291519293506000926001600160a01b038b1692630bb687e39260648082019391829003018186803b158015612f7f57600080fd5b505afa158015612f93573d6000803e3d6000fd5b505050506040513d6020811015612fa957600080fd5b50516040805163dbba0f0160e01b815230600482015284830160248201526001600160a01b0386811660448301529151929350908b169163dbba0f019160648082019260009290919082900301818387803b15801561300757600080fd5b505af115801561301b573d6000803e3d6000fd5b5050505061302e828289868a8a8a613b6f565b505050505050505050565b6040805163bf40fac160e01b81526020600482018190526011602483015270756e696669546f6b656e4164647265737360781b604483015291516000926001600160a01b0389169263bf40fac19260648083019392829003018186803b1580156130a257600080fd5b505afa1580156130b6573d6000803e3d6000fd5b505050506040513d60208110156130cc57600080fd5b505160408051630bb687e360e01b8152602060048201819052601d60248301527f756e696669416d6f756e74546f53776170466f724574686572496e5632000000604483015291519293506000926001600160a01b038a1692630bb687e39260648082019391829003018186803b15801561314657600080fd5b505afa15801561315a573d6000803e3d6000fd5b505050506040513d602081101561317057600080fd5b505160408051630bb687e360e01b8152602060048201819052601c60248301527f756e696669416d6f756e74546f53776170466f7255534443496e563200000000604483015291519293506000926001600160a01b038b1692630bb687e39260648082019391829003018186803b1580156131ea57600080fd5b505afa1580156131fe573d6000803e3d6000fd5b505050506040513d602081101561321457600080fd5b505160408051630bb687e360e01b8152602060048201819052601d60248301527f756e696669416d6f756e74546f53776170466f72427569646c496e5632000000604483015291519293506000926001600160a01b038c1692630bb687e39260648082019391829003018186803b15801561328e57600080fd5b505afa1580156132a2573d6000803e3d6000fd5b505050506040513d60208110156132b857600080fd5b50516040805163dbba0f0160e01b8152306004820152858501830160248201526001600160a01b0387811660448301529151929350908c169163dbba0f019160648082019260009290919082900301818387803b15801561331857600080fd5b505af115801561332c573d6000803e3d6000fd5b50505050613341898484848c898d8d8d614075565b50505050505050505050565b85158015613359575084155b1561336357613b66565b60408051636eb1769f60e11b81523060048201526001600160a01b03858116602483015291519186169163dd62ed3e91604480820192602092909190829003018186803b1580156133b357600080fd5b505afa1580156133c7573d6000803e3d6000fd5b505050506040513d60208110156133dd57600080fd5b505161346957836001600160a01b031663095ea7b3846000196040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561343c57600080fd5b505af1158015613450573d6000803e3d6000fd5b505050506040513d602081101561346657600080fd5b50505b6040805160028082526060808301845292602083019080368337019050509050848160008151811061349757fe5b6001600160a01b039092166020928302919091019091015286156137c15782816001815181106134c357fe5b60200260200101906001600160a01b031690816001600160a01b031681525050836001600160a01b03166318cbafe588866001600160a01b031663d06ca61f8b866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015613559578181015183820152602001613541565b50505050905001935050505060006040518083038186803b15801561357d57600080fd5b505afa158015613591573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156135ba57600080fd5b8101908080516040519392919084600160201b8211156135d957600080fd5b9083019060208201858111156135ee57600080fd5b82518660208202830111600160201b8211171561360a57600080fd5b82525081516020918201928201910280838360005b8381101561363757818101518382015260200161361f565b5050505090500160405250505060018151811061365057fe5b60200260200101518486426103e8016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156136cf5781810151838201526020016136b7565b505050509050019650505050505050600060405180830381600087803b1580156136f857600080fd5b505af115801561370c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561373557600080fd5b8101908080516040519392919084600160201b82111561375457600080fd5b90830190602082018581111561376957600080fd5b82518660208202830111600160201b8211171561378557600080fd5b82525081516020918201928201910280838360005b838110156137b257818101518382015260200161379a565b50505050905001604052505050505b8515612dc5576040805163bf40fac160e01b8152602060048201819052601060248301526f75534443546f6b656e4164647265737360801b604483015291516001600160a01b038b169263bf40fac19260648082019391829003018186803b15801561382c57600080fd5b505afa158015613840573d6000803e3d6000fd5b505050506040513d602081101561385657600080fd5b505181518290600190811061386757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050836001600160a01b03166338ed173987866001600160a01b031663d06ca61f8a866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156138fd5781810151838201526020016138e5565b50505050905001935050505060006040518083038186803b15801561392157600080fd5b505afa158015613935573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561395e57600080fd5b8101908080516040519392919084600160201b82111561397d57600080fd5b90830190602082018581111561399257600080fd5b82518660208202830111600160201b821117156139ae57600080fd5b82525081516020918201928201910280838360005b838110156139db5781810151838201526020016139c3565b505050509050016040525050506001815181106139f457fe5b60200260200101518486426103e8016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613a73578181015183820152602001613a5b565b505050509050019650505050505050600060405180830381600087803b158015613a9c57600080fd5b505af1158015613ab0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015613ad957600080fd5b8101908080516040519392919084600160201b821115613af857600080fd5b908301906020820185811115613b0d57600080fd5b82518660208202830111600160201b82111715613b2957600080fd5b82525081516020918201928201910280838360005b83811015613b56578181015183820152602001613b3e565b5050505090500160405250505050505b50505050505050565b86158015613b7b575085155b15613b8557613b66565b60408051636eb1769f60e11b81523060048201526001600160a01b03858116602483015291519186169163dd62ed3e91604480820192602092909190829003018186803b158015613bd557600080fd5b505afa158015613be9573d6000803e3d6000fd5b505050506040513d6020811015613bff57600080fd5b5051613c8b57836001600160a01b031663095ea7b3846000196040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613c5e57600080fd5b505af1158015613c72573d6000803e3d6000fd5b505050506040513d6020811015613c8857600080fd5b50505b60408051600280825260608083018452926020830190803683370190505090508481600081518110613cb957fe5b6001600160a01b03909216602092830291909101909101528715613fe3578281600181518110613ce557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050836001600160a01b03166318cbafe589866001600160a01b031663d06ca61f8c866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015613d7b578181015183820152602001613d63565b50505050905001935050505060006040518083038186803b158015613d9f57600080fd5b505afa158015613db3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015613ddc57600080fd5b8101908080516040519392919084600160201b821115613dfb57600080fd5b908301906020820185811115613e1057600080fd5b82518660208202830111600160201b82111715613e2c57600080fd5b82525081516020918201928201910280838360005b83811015613e59578181015183820152602001613e41565b50505050905001604052505050600181518110613e7257fe5b60200260200101518486426103e8016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613ef1578181015183820152602001613ed9565b505050509050019650505050505050600060405180830381600087803b158015613f1a57600080fd5b505af1158015613f2e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015613f5757600080fd5b8101908080516040519392919084600160201b821115613f7657600080fd5b908301906020820185811115613f8b57600080fd5b82518660208202830111600160201b82111715613fa757600080fd5b82525081516020918201928201910280838360005b83811015613fd4578181015183820152602001613fbc565b50505050905001604052505050505b8615612dc5578581600181518110613ff757fe5b6001600160a01b039283166020918202929092018101919091526040805163d06ca61f60e01b8152600481018b815260248201928352855160448301528551948916946338ed1739948d94879463d06ca61f9487948b94919392606401918581019102808383600083156138fd5781810151838201526020016138e5565b87158015614081575086155b801561408b575085155b156140955761302e565b60408051636eb1769f60e11b81523060048201526001600160a01b03858116602483015291519186169163dd62ed3e91604480820192602092909190829003018186803b1580156140e557600080fd5b505afa1580156140f9573d6000803e3d6000fd5b505050506040513d602081101561410f57600080fd5b505161419b57836001600160a01b031663095ea7b3846000196040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561416e57600080fd5b505af1158015614182573d6000803e3d6000fd5b505050506040513d602081101561419857600080fd5b50505b604080516002808252606080830184529260208301908036833701905050905084816000815181106141c957fe5b6001600160a01b039092166020928302919091019091015288156144f35782816001815181106141f557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050836001600160a01b03166318cbafe58a866001600160a01b031663d06ca61f8d866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561428b578181015183820152602001614273565b50505050905001935050505060006040518083038186803b1580156142af57600080fd5b505afa1580156142c3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156142ec57600080fd5b8101908080516040519392919084600160201b82111561430b57600080fd5b90830190602082018581111561432057600080fd5b82518660208202830111600160201b8211171561433c57600080fd5b82525081516020918201928201910280838360005b83811015614369578181015183820152602001614351565b5050505090500160405250505060018151811061438257fe5b60200260200101518486426103e8016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156144015781810151838201526020016143e9565b505050509050019650505050505050600060405180830381600087803b15801561442a57600080fd5b505af115801561443e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561446757600080fd5b8101908080516040519392919084600160201b82111561448657600080fd5b90830190602082018581111561449b57600080fd5b82518660208202830111600160201b821117156144b757600080fd5b82525081516020918201928201910280838360005b838110156144e45781810151838201526020016144cc565b50505050905001604052505050505b8715614897576040805163bf40fac160e01b8152602060048201819052601060248301526f75534443546f6b656e4164647265737360801b604483015291516001600160a01b038d169263bf40fac19260648082019391829003018186803b15801561455e57600080fd5b505afa158015614572573d6000803e3d6000fd5b505050506040513d602081101561458857600080fd5b505181518290600190811061459957fe5b60200260200101906001600160a01b031690816001600160a01b031681525050836001600160a01b03166338ed173989866001600160a01b031663d06ca61f8c866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561462f578181015183820152602001614617565b50505050905001935050505060006040518083038186803b15801561465357600080fd5b505afa158015614667573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561469057600080fd5b8101908080516040519392919084600160201b8211156146af57600080fd5b9083019060208201858111156146c457600080fd5b82518660208202830111600160201b821117156146e057600080fd5b82525081516020918201928201910280838360005b8381101561470d5781810151838201526020016146f5565b5050505090500160405250505060018151811061472657fe5b60200260200101518486426103e8016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156147a557818101518382015260200161478d565b505050509050019650505050505050600060405180830381600087803b1580156147ce57600080fd5b505af11580156147e2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561480b57600080fd5b8101908080516040519392919084600160201b82111561482a57600080fd5b90830190602082018581111561483f57600080fd5b82518660208202830111600160201b8211171561485b57600080fd5b82525081516020918201928201910280838360005b83811015614888578181015183820152602001614870565b50505050905001604052505050505b86156133415785816001815181106148ab57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050836001600160a01b03166338ed173988866001600160a01b031663d06ca61f8b866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015614941578181015183820152602001614929565b50505050905001935050505060006040518083038186803b15801561496557600080fd5b505afa158015614979573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156149a257600080fd5b8101908080516040519392919084600160201b8211156149c157600080fd5b9083019060208201858111156149d657600080fd5b82518660208202830111600160201b821117156149f257600080fd5b82525081516020918201928201910280838360005b83811015614a1f578181015183820152602001614a07565b50505050905001604052505050600181518110614a3857fe5b60200260200101518486426103e8016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614ab7578181015183820152602001614a9f565b505050509050019650505050505050600060405180830381600087803b158015614ae057600080fd5b505af1158015614af4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015614b1d57600080fd5b8101908080516040519392919084600160201b821115614b3c57600080fd5b908301906020820185811115614b5157600080fd5b82518660208202830111600160201b82111715614b6d57600080fd5b82525081516020918201928201910280838360005b83811015614b9a578181015183820152602001614b82565b50505050905001604052505050505050505050505050505056fea2646970667358221220b083d59094493ea579b96fd699c2c2b8cbba499c91c66f6fcd3dde1ba120e1e664736f6c63430007000033
Verified Source Code Partial Match
Compiler: v0.7.0+commit.9e61f92b
EVM: istanbul
Optimization: Yes (200 runs)
NERVFairInflationV2.sol 459 lines
/* Discussion:
* https://github.com/b-u-i-d-l/fair-inflation-v2
*/
/* Description:
* A more sustainable economic model for DFO-based Startups to maintain value and funds operations
* AleToschi.eth | Vasapower.eth | CD
*
* White Paper: https://docs.google.com/document/d/1-foU-XTlXS0WgH97IOVC1i-O_WsKeqc-FVL5x9RR7WY/edit?usp=sharing
*
* Document Purpose:
* This document is an update of “A sustainable economic model for DFO-based Startups to maintain value and funds operations” https://drive.google.com/file/d/1_QZr5CjNsQKGxoJ5WkI9iPJGs4PdKWol/ We successfully renamed this mechanism “Fair Inflation V1” (FI V1). During the experimentation of the Fair Inflation V1, the DFOhub Team Researched and Developed a better and more resilient version of the “Fair Inflation V1” called “Fair Inflation V2” (FI V2).
*
* Fair Inflation V1 - White Paper
* FI V1 - Abstract:
* Voting Tokens of Decentralized Flexible Organizations are real programmable equities of a protocol because the funds locked into a DFO wallet are actually funds in the hand of token holders. DFO funds can be transferred or used only by voting, this opens new and very interesting correlations between Private Equity and Tokens.
*
* The core experiment of this paper is to explore how adding new on-chain valuable assets into a DFO wallet can sustain the price of its voting tokens.
*
* In a traditional company, if new assets are added to the Company funds (without any increase of debts) the evaluation of its equities is backed by the value of these assets. This is because equities holders have the power to manage these assets.
*
* This basic rule can be applied to Decentralized Flexible Organizations because if funds are added to a DFO wallet, Token Holders are the only ruler of these funds. This is a basic design decision of The DFO core protocol, because thanks to its Smart contracts, nobody can make actions outside of a public proposal voted by token holders.
*
* FI V1 - The experiment:
* Thanks to the Uniswap math design:
*
* x * y = k. **
*
* **Explained by Decrypt.co In the equation, x and y represent the quantity of ETH and ERC20 tokens available in a liquidity pool and k is a constant value. This equation uses the balance between the ETH and ERC20 tokens–and supply and demand–to determine the price of a particular token. Whenever someone buys Poop Token with ETH, the supply of Poop Token decreases while the supply of ETH increases–the price of Poop Token goes up. As a result, the price of tokens on Uniswap can only change if trades occur. Essentially what Uniswap is doing it balancing out the value of tokens, and the swapping of them based on how much people want to buy and sell them.
*
* A Flexible Organization can sustain its operation by a fixed Circulated Supply inflation using the uniswap protocol, by adding new values into the DFO Wallet:
*
* FI V1 - Example:
* A DFO named “Flexible” with a Voting Token named “FLX”
*
* FLX Total Supply = 1.000.000 FLX Flexible DFO Wallet = 800.000 FLX (80%) FLX Circulating Supply = 200.000 FLX (20%)
*
* With a Smart Contract based proposal, Flexible Token holders decide to step by step inflate the circulating supply for a total of 5% during a period of a year and a half by selling a fixed number of FLX once a week (~ 50.400 Ethereum Blocks @ 12 sec for a block for 80 times)
*
* In this case, the Flexible DFO will sell in total 50.000 FLX on the Uniswap protocol at the ratio of 625 FLX every 50.400 Blocks, increasing the circulating supply by the 0,0625%
*
* (In this experiment technically the FLX backed value is already settled by the 800.000 FLX into the Flexible DFO Wallet, but because the FLX is at the same time the Voting Token, we don’t count its value in this equation.)
*
* Every FLX Inflation event will add new ETH to the Flexible DFO wallet, adding new backed assets.
*
* For example, after the first selling event the new status of the Flexible DFO Wallet will be:
*
* 799375 FLX + Z ETH ***
*
* ***(Z is equal to an amount of ETH depending on the ratio of ETH/FLX into the Uniswap Pool)
*
* Now Z ETH is the minimum backed value of the Flexible DFO Wallet and consequently the FLX Market cap because FLX Token Holders are the only people who can manage these funds, like Equity Holders in a Company.
*
* Every Selling Event the Uniswap Pool reaches very little inflation but at the same time this selling benefits every FLX Holders.
*
* If the DFO Voting Token Holders will use every week an amount < of the 100% of the Z ETH funds reached, the project can pay operations and at the same time accumulate backed value to benefit every token holder.
*
* FI V1 - The DFOhub Experiment:
* We want to do this experiment for three fundamental reasons:
*
* Empiric data about the correlation from Programmable Equities (DFO based Voting Tokens) to Regular Equities that can open an infinite number of questions and business opportunities for the dapps of tomorrow (DFO based) R&D and introduce these standardized Smart Contracts as optional basic functions for every DFO via voting Sustain our operations and at the same time to build a minimum backed valorization for BUIDL holders.
*
* The Economics behind BUIDL is based on the Business Model of the General Purpose Protocol DFO. Every time someone creates a new Decentralized Flexible Organization, a % of the new DFO’s new Voting Tokens is added to the DFOhub Wallet. The DFOhub Wallet is managed only by voting from the BUIDL holders, making assets into the DFOhub wallet the backed value of BUIDL.
*
* FI V1 - DFOhub Experiment in numbers:
* BUIDL Total Supply = 42.000.000 BUIDL DFOhub DFO Wallet = 11.500.000 BUIDL (27.3%) DFOhub Team Operations Wallet = 11.500.000 BUIDL (27.3%) BUIDL Circulating Supply = 2.200.000 BUIDL (5.2%)
*
* With a Smart Contract based proposal, DFOhub will step by step inflate the circulating supply of BUIDL for a total of 0.8% during a period of a year and a half by selling a fixed number of BUIDL once every two weeks (~ 100.800 Ethereum Blocks @ 12 sec for a block for 40 times)
*
* At the same time, the DFOhub Team Operations Wallet will step by step inflate the circulating supply of BUIDL for a total of 0.8% during a period of a year and a half by selling a fixed number of BUIDL once every two weeks (~ 100.800 Ethereum Blocks @ 12 sec for a block for 40 times)
*
* These two Smart Contracts will inflate the circulation supply of a total of 1.6% (672.000 BUIDL) in a year and a half. The funds will be inflated into 3 different Uniswap Pools:
*
* 25% Uniswap V1 ETH/BUIDL | 0.4% (168.000 BUIDL) 25% Uniswap V2 ETH/BUIDL | 0.4% (168.000 BUIDL) 50% Uniswap V2 USDC/BUIDL | 0.8% Inflation (336.000 BUIDL)
*
* During every Selling Event, the Circulating supply of BUIDL will increase by 0.02% (8.400 BUIDL) and will be split into:
*
* 25% Uniswap V1 ETH/BUIDL | 0.005% (2.100 BUIDL) 25% Uniswap V2 ETH/BUIDL | 0.005% (2.100 BUIDL) 50% Uniswap V2 USDC/BUIDL | 0.01% Inflation (4.200 BUIDL)
*
* FI V1 - Conclusion:
* Every Two weeks these funds will create values for BUIDL holders in two different ways:
*
* From the DFOhub Wallet: Z ETH and Z USDC will be automatically added to the DFOhub wallet as a backed value for BUIDL holders. From the DFOhub Team Operations Wallet, these funds will be used to accelerate the R&D into new DFOhub Functionalities, Marketing, and Community Rewards. These Operations will benefit all of the BUIDL holders accelerating the advancement of the protocol and its usage, so more DFO's Voting Tokens into the DFOhub Wallet as a backed value for BUIDL holders.
*
* All of the functionalities related to this R&D will become available for every DFO as Optional Basic Functionalities, to accelerate the exploration of Programmable Equities R&D.
*
* Fair Inflation V2 - White Paper Update:
* FI V2 - Abstract:
* The “Fair Inflation V1” experiment was a success during the first month both in terms of equity between funds for operations and backed funds for BUIDL holders.
*
* You can check the three FI events here:
*
* https://etherscan.io/tx/0x68ef31cc8cff2929295fbd0b84187eb70b59bd1f8efb069f1bd9ed06fe817a15 (DFOhub) https://etherscan.io/tx/0xe31d9eab9527e2a0299b80efc86ee013a0915825aac103246eccfaeddb95d822 (Operation Funds) https://etherscan.io/tx/0xfdc2ab2be2ac2d46f37e520217f6b1ce10c4203ab5d56c512d743878d93f6872 (DFOhub) https://etherscan.io/tx/0xdbf65b725d1d37750f67f6a1801c3cd38121fe676a414576d8ef5c5a19079f46 (Operation Funds)
*
* The “Fair Inflation V1” experiment highlighted three unaddressed points of failure:
*
* Slippage: The Uniswap Slippage is selling 8.400 BUIDL at an untoward price. This can be a problem for DFO-based Startups with less liquidity than BUIDL Dump: The 8400 BUIDL selling created a short dump in the market. This system can be attacked by speculators if they sell BUIDL just before the Fair Inflation event. This kind of attack can harm both BUIDL holders and the team.
*
* FI V2 - The Experiment:
* The “Fair Inflation V2” experiment aims to solve both the Slippage and the Dump problems by transforming weekly inflation events into daily inflation events without changing the quantity of Inflated tokens during the year and a half experiment.
*
* In the “Fair Inflation V1” Every Week the circulating supply of BUIDL is inflated by 8.400 BUIDL for a total of 672.000 BUIDL after 80 weekly events into 3 Uniswap Pools (25% in ETH/BUIDL V1, 25% in ETH/BUIDL V2 and 50% in USDC/BUIDL V2).
*
* In the “Fair Inflation V2” the same amount of BUIDL will be inflated in the same amount of time, but splitted into more inflation events and used to reward liquidity providers to Uniswap pools.
*
* FI V2 - The DFOhub (BUIDL) Experiment:
* DFOhub (https://etherscan.io/tokenHoldings?a=0x5D40c724ba3e7Ffa6a91db223368977C522BdACD) will step by step inflate the circulating supply of BUIDL for a total of 336.000 during a period of a year and a half splitted in 560 daily Inflation Events (6.300 Ethereum Blocks)
*
* This Smart Contract will inflate the circulation supply of a total of 336.000 BUIDL in a year and a half. The funds will be both inflated into 3 different Uniswap Pools and lock them to reward liquidity pool providers :
*
* 30% Uniswap V2 ETH/BUIDL (100.800 BUIDL)
*
* 30% Uniswap V2 USDC/BUIDL (100.800 BUIDL)
*
* 10% Uniswap V2 ARTE/BUIDL (33.600 BUIDL)
*
* 30% Rewards for Liquidity Providers (100.800 BUIDL)
*
* During every Selling Event, the Circulating supply of BUIDL will increase by 600 BUIDL and will be split into:
*
* 30% Uniswap V2 ETH/BUIDL (180 BUIDL)
*
* 30% Uniswap V2 USDC/BUIDL (180 BUIDL)
*
* 10% Uniswap V2 ARTE/BUIDL (60 BUIDL)
*
* 30% Rewards for Liquidity Providers (180 BUIDL)
*
* At the same time, the DFOhub Team Operations DFO Wallet (https://etherscan.io/tokenHoldings?a=0x25756f9C2cCeaCd787260b001F224159aB9fB97A) will step by step inflate the circulating supply of BUIDL for a total of 336.000 BUIDL during a period of a year and a half splitted in 560 daily Inflation Events (6.300 Ethereum Blocks)
*
* This Smart Contract will inflate the circulation supply of a total of 336.000 BUIDL in a year and a half. The funds will be both inflated into 3 different Uniswap Pools:
*
* 50% Uniswap V2 ETH/BUIDL (168.000 BUIDL)
*
* 50% Uniswap V2 USDC/BUIDL (168.000 BUIDL)
*
* During every Selling Event, the Circulating supply of BUIDL will increase by 600 BUIDL and will be split into:
*
* 50% Uniswap V2 ETH/BUIDL (300 BUIDL)
*
* 50% Uniswap V2 USDC/BUIDL (300 BUIDL)
*
* These two Smart Contracts will inflate the circulation supply of a total of 672.000 BUIDL in a year and a half.
*
* The DFOhub FI and the Operation FI will occur at ~ 12 hours apart (3.150 Ethereum Blocks).
*
* FI V2 - The ethart (ARTE) Experiment:
* Ethart Fair Inflation V1
* (https://github.com/b-u-i-d-l/ethArt): A sustainable economic model for DFO-based startups to maintain value and fund operations | ethArt version For the $ARTE experiment, we will inflate the circulating supply by 1.21% (121,000) of the total supply (10,000,000) over one year..
*
* Inflation events will occur once a week (every 50,000 ETH Blocks) across two Uniswap pairs for a total of 2,200 $ARTE each time:
*
* Uniswap V2 $ETH/$ARTE (1,100 $ARTE Every Week) 0.01% Weekly Inflation
* Uniswap V2 $BUIDL/$ARTE (1,100 $ARTE Every Week) 0.01% Weekly Inflation
* For a total of 2,200 $ARTE every week (0.02%)
*
* Ethart Fair Inflation V2:
* From the DFOhub Team Operations DFO Wallet (https://etherscan.io/tokenHoldings?a=0x25756f9C2cCeaCd787260b001F224159aB9fB97A)
*
* Inflation events will occur once a day (every 6,300 ETH Blocks) across two Uniswap pairs for a total of 314 $ARTE each time:
*
* Uniswap V2 $ETH/$ARTE (157 $ARTE Every Day)
*
* Uniswap V2 $BUIDL/$ARTE (157 $ARTE Every Day)
*
* For a total of 314 $ARTE every day
*
* FI V2 - The UniFi (UniFi) Experiment:
* From the DFOhub Team Operations DFO Wallet (https://etherscan.io/tokenHoldings?a=0x25756f9C2cCeaCd787260b001F224159aB9fB97A)
*
* Inflation events will occur once a day (every 6,300 ETH Blocks) across two Uniswap pairs for a total of 4,900 $UniFi each time:
*
* Uniswap V2 $ETH/$UniFi (2,695 $UniFi Every Day)
*
* Uniswap V2 $USDC/$UniFi (1,470 $UniFi Every Day)
*
* Uniswap V2 $BUIDL/$UniFi (735 $UniFi Every Day)
*
* For a total of 4,900 $UniFi every day
*
* All of the functionalities related to this R&D will become available for every DFO as Optional Basic Functionalities, to accelerate the exploration of Programmable Equities R&D.
*/
pragma solidity ^0.7.0;
contract NERVFairInflationV2 {
//Functionality Set-UP
//This mandatory method is called by the proxy just after the proposal finalization.
//It sets-up all the stuff to let this functionality work properly
function onStart(address, address) public {
//The Proxy is the main Contract of the DFO Protocol
IMVDProxy proxy = IMVDProxy(msg.sender);
//StateHolder is the Database of every DFO, so let's store all the above stuff
IStateHolder stateHolder = IStateHolder(proxy.getStateHolderAddress());
//The buidl token address, needed for the swap operations
stateHolder.setAddress("buidlTokenAddress", 0x7b123f53421b1bF8533339BFBdc7C98aA94163db);
//The arte token address, needed for the swap operations
stateHolder.setAddress("arteTokenAddress", 0x34612903Db071e888a4dADcaA416d3EE263a87b9);
//The unifi token address, needed for the swap operations
stateHolder.setAddress("unifiTokenAddress", 0x9E78b8274e1D6a76a0dBbf90418894DF27cBCEb5);
//The well-known USDC Contract Token
stateHolder.setAddress("uSDCTokenAddress", 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
//The Smart Contract Address to locate the Uniswap V2 Exchanges
stateHolder.setAddress("uniswapV2RouterAddress", 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
//When I can call this Function? Every day (expressed in Ethereum Blocks)
stateHolder.setUint256("swapBlockLimit", 6300);
//How many buidl tokens to swap for ETH in UniswapV2 every day? 300
stateHolder.setUint256("buidlAmountToSwapForEtherInV2", 300000000000000000000);
//How many buidl tokens to swap for USDC in UniswapV2 every day? 300
stateHolder.setUint256("buidlAmountToSwapForUSDCInV2", 300000000000000000000);
//How many arte tokens to swap for ETH in UniswapV2 every day? 157
stateHolder.setUint256("arteAmountToSwapForEtherInV2", 157000000000000000000);
//How many arte tokens to swap for buidl in UniswapV2 every day? 157
stateHolder.setUint256("arteAmountToSwapForBuidlInV2", 157000000000000000000);
//How many unifi tokens to swap for ETH in UniswapV2 every day? 2695
stateHolder.setUint256("unifiAmountToSwapForEtherInV2", 2695000000000000000000);
//How many unifi I have to swap for USDC in UniswapV2 every day? 1470
stateHolder.setUint256("unifiAmountToSwapForUSDCInV2", 1470000000000000000000);
//How many unifi I have to swap for buidl in UniswapV2 evey day? 735
stateHolder.setUint256("unifiAmountToSwapForBuidlInV2", 735000000000000000000);
//Do you want to start from a specific swap block?
stateHolder.setUint256("lastSwapBlock", 10733885);
}
//Function Teardown - This mandatory operation is called by the Proxy before disabling the Function (e.g. for a Proposal to update it with a new one)
//In this case, the state holder will be cleaned by useless data to keep the storage clean
function onStop(address) public {
IStateHolder stateHolder = IStateHolder(IMVDProxy(msg.sender).getStateHolderAddress());
stateHolder.clear("buidlTokenAddress");
stateHolder.clear("arteTokenAddress");
stateHolder.clear("unifiTokenAddress");
stateHolder.clear("uSDCTokenAddress");
stateHolder.clear("uniswapV2RouterAddress");
stateHolder.clear("swapBlockLimit");
stateHolder.clear("buidlAmountToSwapForEtherInV2");
stateHolder.clear("buidlAmountToSwapForUSDCInV2");
stateHolder.clear("arteAmountToSwapForEtherInV2");
stateHolder.clear("arteAmountToSwapForBuidlInV2");
stateHolder.clear("unifiAmountToSwapForEtherInV2");
stateHolder.clear("unifiAmountToSwapForUSDCInV2");
stateHolder.clear("unifiAmountToSwapForBuidlInV2");
stateHolder.clear("lastSwapBlock");
}
//The real main inflation function.
//This is a public one, callable from any one (Team members or random guys it's not important)
//All the rules will decide if it can be executed or not
function fairInflation() public {
//Load the Proxy and the State Holder
IMVDProxy proxy = IMVDProxy(msg.sender);
IStateHolder stateHolder = IStateHolder(proxy.getStateHolderAddress());
//Are you calling it after two weeks since last time?
require(block.number >= (stateHolder.getUint256("lastSwapBlock") + stateHolder.getUint256("swapBlockLimit")), "Too early to swap new Tokens!");
//Save the last time you called it
stateHolder.setUint256("lastSwapBlock", block.number);
//Where to store ETH, USDC and buidl?
address dfoWalletAddress = proxy.getMVDWalletAddress();
//Get the buidl Token
IERC20 buidlToken = IERC20(stateHolder.getAddress("buidlTokenAddress"));
IUniswapV2Router uniswapV2Router = IUniswapV2Router(stateHolder.getAddress("uniswapV2RouterAddress"));
address wethTokenAddress = uniswapV2Router.WETH();
_swapBuidl(proxy, stateHolder, buidlToken, uniswapV2Router, wethTokenAddress, dfoWalletAddress);
_swapArte(proxy, stateHolder, buidlToken, uniswapV2Router, wethTokenAddress, dfoWalletAddress);
_swapUnifi(proxy, stateHolder, buidlToken, uniswapV2Router, wethTokenAddress, dfoWalletAddress);
}
function _swapBuidl(IMVDProxy proxy, IStateHolder stateHolder, IERC20 buidlToken, IUniswapV2Router uniswapV2Router, address wethTokenAddress, address dfoWalletAddress) private {
//How many buidl I have to swap for ETH in UniswapV2?
uint256 buidlAmountToSwapForEtherInV2 = stateHolder.getUint256("buidlAmountToSwapForEtherInV2");
//How many buidl I have to swap for USDC in UniswapV2?
uint256 buidlAmountToSwapForUSDCInV2 = stateHolder.getUint256("buidlAmountToSwapForUSDCInV2");
//Send the correct cumulative amount of budil tokens to swap from the DFO to this function, to let it spend them in Uniswap V2
proxy.transfer(address(this), buidlAmountToSwapForEtherInV2 + buidlAmountToSwapForUSDCInV2, address(buidlToken));
//Swap buidl for ETH and USDC in UniswapV2
_uniswapV2Buidl(stateHolder, buidlAmountToSwapForEtherInV2, buidlAmountToSwapForUSDCInV2, buidlToken, uniswapV2Router, wethTokenAddress, dfoWalletAddress);
}
//Swap buidl for ETH and USDC in UniswapV2
function _uniswapV2Buidl(IStateHolder stateHolder, uint256 buidlAmountToSwapForEtherInV2, uint256 buidlAmountToSwapForUSDCInV2, IERC20 buidlToken, IUniswapV2Router uniswapV2Router, address wethTokenAddress, address dfoWalletAddress) private {
//Do I have something to swap in UniswapV2?
if(buidlAmountToSwapForEtherInV2 <= 0 && buidlAmountToSwapForUSDCInV2 <= 0) {
return;
}
//"Unlock" - Enable UniswapV2 to spend my buidl tokens, if necessary
if(buidlToken.allowance(address(this), address(uniswapV2Router)) == 0) {
buidlToken.approve(address(uniswapV2Router), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
}
address[] memory path = new address[](2);
path[0] = address(buidlToken);
//Swap the desired amount of buidl and send gained ETHs to the DFO's Wallet, if any
if(buidlAmountToSwapForEtherInV2 > 0) {
path[1] = wethTokenAddress;
uniswapV2Router.swapExactTokensForETH(buidlAmountToSwapForEtherInV2, uniswapV2Router.getAmountsOut(buidlAmountToSwapForEtherInV2, path)[1], path, dfoWalletAddress, block.timestamp + 1000);
}
//Swap the desired amount of buidl and send gained USDCs to the DFO's Wallet, if any
if(buidlAmountToSwapForUSDCInV2 > 0) {
path[1] = stateHolder.getAddress("uSDCTokenAddress");
uniswapV2Router.swapExactTokensForTokens(buidlAmountToSwapForUSDCInV2, uniswapV2Router.getAmountsOut(buidlAmountToSwapForUSDCInV2, path)[1], path, dfoWalletAddress, block.timestamp + 1000);
}
}
function _swapArte(IMVDProxy proxy, IStateHolder stateHolder, IERC20 buidlToken, IUniswapV2Router uniswapV2Router, address wethTokenAddress, address dfoWalletAddress) private {
//Get the arte Token
IERC20 arteToken = IERC20(stateHolder.getAddress("arteTokenAddress"));
//How many arte I have to swap for ETH in UniswapV2?
uint256 arteAmountToSwapForEtherInV2 = stateHolder.getUint256("arteAmountToSwapForEtherInV2");
//How many arte I have to swap for buidl in UniswapV2?
uint256 arteAmountToSwapForBuidlInV2 = stateHolder.getUint256("arteAmountToSwapForBuidlInV2");
//Send the correct cumulative amount of arte tokens to swap from the DFO to this function, to let it spend them in Uniswap V2
proxy.transfer(address(this), arteAmountToSwapForEtherInV2 + arteAmountToSwapForBuidlInV2, address(arteToken));
//Swap arte for ETH and buidl in UniswapV2
_uniswapV2Arte(arteAmountToSwapForEtherInV2, arteAmountToSwapForBuidlInV2, buidlToken, arteToken, uniswapV2Router, wethTokenAddress, dfoWalletAddress);
}
//Swap arte for ETH and buidl in UniswapV2
function _uniswapV2Arte(uint256 arteAmountToSwapForEtherInV2, uint256 arteAmountToSwapForBuidlInV2, IERC20 buidlToken, IERC20 arteToken, IUniswapV2Router uniswapV2Router, address wethTokenAddress, address dfoWalletAddress) private {
//Do I have something to swap in UniswapV2?
if(arteAmountToSwapForEtherInV2 <= 0 && arteAmountToSwapForBuidlInV2 <= 0) {
return;
}
//"Unlock" - Enable UniswapV2 to spend my arte tokens, if necessary
if(arteToken.allowance(address(this), address(uniswapV2Router)) == 0) {
arteToken.approve(address(uniswapV2Router), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
}
address[] memory path = new address[](2);
path[0] = address(arteToken);
//Swap the desired amount of arte and send gained ETHs to the DFO's Wallet, if any
if(arteAmountToSwapForEtherInV2 > 0) {
path[1] = wethTokenAddress;
uniswapV2Router.swapExactTokensForETH(arteAmountToSwapForEtherInV2, uniswapV2Router.getAmountsOut(arteAmountToSwapForEtherInV2, path)[1], path, dfoWalletAddress, block.timestamp + 1000);
}
//Swap the desired amount of arte and send gained buidls to the DFO's Wallet, if any
if(arteAmountToSwapForBuidlInV2 > 0) {
path[1] = address(buidlToken);
uniswapV2Router.swapExactTokensForTokens(arteAmountToSwapForBuidlInV2, uniswapV2Router.getAmountsOut(arteAmountToSwapForBuidlInV2, path)[1], path, dfoWalletAddress, block.timestamp + 1000);
}
}
function _swapUnifi(IMVDProxy proxy, IStateHolder stateHolder, IERC20 buidlToken, IUniswapV2Router uniswapV2Router, address wethTokenAddress, address dfoWalletAddress) private {
//Get the unifi Token
IERC20 unifiToken = IERC20(stateHolder.getAddress("unifiTokenAddress"));
//How many unifi I have to swap for ETH in UniswapV2?
uint256 unifiAmountToSwapForEtherInV2 = stateHolder.getUint256("unifiAmountToSwapForEtherInV2");
//How many unifi I have to swap for USDC in UniswapV2?
uint256 unifiAmountToSwapForUSDCInV2 = stateHolder.getUint256("unifiAmountToSwapForUSDCInV2");
//How many unifi I have to swap for buidl in UniswapV2?
uint256 unifiAmountToSwapForBuidlInV2 = stateHolder.getUint256("unifiAmountToSwapForBuidlInV2");
//Send the correct cumulative amount of unifi tokens to swap from the DFO to this function, to let it spend them in Uniswap V2
proxy.transfer(address(this), unifiAmountToSwapForEtherInV2 + unifiAmountToSwapForUSDCInV2 + unifiAmountToSwapForBuidlInV2, address(unifiToken));
//Swap unifi for ETH and USDC and buidl in UniswapV2
_uniswapV2Unifi(stateHolder, unifiAmountToSwapForEtherInV2, unifiAmountToSwapForUSDCInV2, unifiAmountToSwapForBuidlInV2, buidlToken, unifiToken, uniswapV2Router, wethTokenAddress, dfoWalletAddress);
}
//Swap unifi for ETH, USDC and buidl in UniswapV2
function _uniswapV2Unifi(IStateHolder stateHolder, uint256 unifiAmountToSwapForEtherInV2, uint256 unifiAmountToSwapForUSDCInV2, uint256 unifiAmountToSwapForBuidlInV2, IERC20 buidlToken, IERC20 unifiToken, IUniswapV2Router uniswapV2Router, address wethTokenAddress, address dfoWalletAddress) private {
//Do I have something to swap in UniswapV2?
if(unifiAmountToSwapForEtherInV2 <= 0 && unifiAmountToSwapForUSDCInV2 <= 0 && unifiAmountToSwapForBuidlInV2 <= 0) {
return;
}
//"Unlock" - Enable UniswapV2 to spend my unifi tokens, if necessary
if(unifiToken.allowance(address(this), address(uniswapV2Router)) == 0) {
unifiToken.approve(address(uniswapV2Router), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
}
address[] memory path = new address[](2);
path[0] = address(unifiToken);
//Swap the desired amount of unifi and send gained ETHs to the DFO's Wallet, if any
if(unifiAmountToSwapForEtherInV2 > 0) {
path[1] = wethTokenAddress;
uniswapV2Router.swapExactTokensForETH(unifiAmountToSwapForEtherInV2, uniswapV2Router.getAmountsOut(unifiAmountToSwapForEtherInV2, path)[1], path, dfoWalletAddress, block.timestamp + 1000);
}
//Swap the desired amount of unifi and send gained USDCs to the DFO's Wallet, if any
if(unifiAmountToSwapForUSDCInV2 > 0) {
path[1] = stateHolder.getAddress("uSDCTokenAddress");
uniswapV2Router.swapExactTokensForTokens(unifiAmountToSwapForUSDCInV2, uniswapV2Router.getAmountsOut(unifiAmountToSwapForUSDCInV2, path)[1], path, dfoWalletAddress, block.timestamp + 1000);
}
//Swap the desired amount of unifi and send gained buidls to the DFO's Wallet, if any
if(unifiAmountToSwapForBuidlInV2 > 0) {
path[1] = address(buidlToken);
uniswapV2Router.swapExactTokensForTokens(unifiAmountToSwapForBuidlInV2, uniswapV2Router.getAmountsOut(unifiAmountToSwapForBuidlInV2, path)[1], path, dfoWalletAddress, block.timestamp + 1000);
}
}
}
interface IUniswapV2Router {
function WETH() external pure returns (address);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);
function swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);
}
interface IMVDProxy {
function getToken() external view returns(address);
function getStateHolderAddress() external view returns(address);
function getMVDWalletAddress() external view returns(address);
function transfer(address receiver, uint256 value, address token) external;
}
interface IStateHolder {
function setUint256(string calldata name, uint256 value) external returns(uint256);
function getUint256(string calldata name) external view returns(uint256);
function getAddress(string calldata name) external view returns(address);
function setAddress(string calldata varName, address val) external returns (address);
function clear(string calldata varName) external returns(string memory oldDataType, bytes memory oldVal);
}
interface IERC20 {
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
}
Write Contract 3 functions
These functions modify contract state and require a wallet transaction to execute.
fairInflation 0xd8412805
No parameters
onStart 0x8d52dd81
address
address
onStop 0xfc41271d
address
Recent Transactions
No transactions found for this address