Skip to content

Instantly share code, notes, and snippets.

Anton Bukov k06a

Block or report user

Report or block k06a

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SplitKyber.sol
pragma solidity ^0.5.0;
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol";
interface IKyberReserve {
function trade(
@k06a
k06a / Unipool.sol
Last active Nov 6, 2019
ETH-sETH Staking Pool for SNX reward
View Unipool.sol
pragma solidity ^0.5.0;
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol";
contract Unipool is ERC20, ERC20Detailed("Unipool", "SNX-UNP", 18) {
View Loopring Pool
pragma solidity ^0.5.0;
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
/*
*
* staker1: |===========|
* : :
* staker2: : |===========|
* : : : :
@k06a
k06a / rDAI.sol
Last active Oct 5, 2019
rDAI 2.0 Concept
View rDAI.sol
pragma solidity ^0.5.0;
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Mintable.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol";
contract IFulcrum is IERC20 {
function tokenPrice() external view returns (uint256 price);
function mint(address receiver, uint256 amount) external returns (uint256 minted);
View MovingValue.sol
pragma solidity ^0.5.0;
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol";
library MovingValue {
using SafeMath for uint256;
struct Data {
View gDAI.sol
pragma solidity ^0.5.0;
// TODO: Use latest git version with GSN support => "@openzeppelin/contracts@next"
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/ownership/Ownable.sol";
import "github.com/openzeppelin/openzeppelin-contracts/contracts/GSN/GSNRecipient.sol";
View Minterest.sol
pragma solidity ^0.5.0;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./UniversalERC20.sol";
contract Minterest is ERC20 {
using SafeMath for uint256;
@k06a
k06a / AuRa.cpp
Last active Aug 15, 2019
AuRa Random
View AuRa.cpp
#include <iostream>
#include <vector>
#include <math.h>
#include <numeric>
#include <tuple>
#include <algorithm>
std::tuple<std::vector<int>,int> selectRandom1(std::vector<int> likehoods, int sum, uint m) {
@k06a
k06a / log_2_rand_0_1.sol
Last active Aug 16, 2019
log_2_rand_0_1
View log_2_rand_0_1.sol
/*
* ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting.
* Author: Mikhail Vladimirov <mikhail.vladimirov@gmail.com>
*/
pragma solidity ^0.5.7;
/**
* Modified version of this code:
* https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L366
*
View DeepStakingPool.sol
pragma solidity ^0.5.0;
import "github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "github.com/OpenZeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol";
interface IValidatorSet {
function isValidator(address candidate) external view returns(bool);
}
contract BasePool {
You can’t perform that action at this time.