Skip to content

Instantly share code, notes, and snippets.

Starting Framework For KyberDAO BRR Process

1. BRR (Burn, Reward, Rebate) ratio will be voted on in every epoch.

The BRR proposal process will provide a clear ongoing agenda for stakeholders to tweak the status quo, allowing a constant polling of the community and dynamic governance of the network fee allocation. Custom proposals suggesting major updates can be created as part of the Kyber Improvement Proposal (KIP) process.

2. Starting Framework

As the KyberDAO maintainer, the Kyber team has proposed the starting framework for the BRR:

@mingyeow
mingyeow / DSA-Architecture.md
Last active March 23, 2024 03:16
DSA (DeFi Smart Account) Architecture

DeFi Smart Accounts Architecture

DeFi Smart Accounts (DSA) are contract accounts developed by Instadapp and trustlessly owned by the users. In this guide, we will explain the three key entities in the system: DeFi smart accounts, connectors and authentication modules.

Developers

  • Front end developers, including wallets, can build DeFi and smart wallet capabilities on top of their existing products. As new modules are added to the ecosystem, they can extend their DeFi capabilities and business model without the need for any smart contract or security expertise.
  • DeFi developers can create complex cross protocol transactions like Instadapp’s protocol bridge with only web2 code.
  • Protocol developers can make their systems accessible all DSA users and devs by collaborating with us to build connectors.

For further context about motivation and likely use cases, read the accompanying blog post.

Kyber Team As Current DAO Maintainer

Overview

The KyberDAO is designed for maximum viable transparency, network stability and quick recovery in cases of emergencies. Kyber team will serve as the current maintainer of the KyberDAO, and we believe it is important to be as transparent and clear about this role as possible.

All processes and data will be stored and processed on-chain where feasible - for example, the results of any campaigns to change the network fees and fee allocation ratio will be immediately processed after the voting concludes. Where it is not practical, there will be a set of robust off-chain community and governance processes on multiple channels to ensure maximum debate and understanding.

Given Kyber’s role as a key part of the decentralized infrastructure, network stability is crucial for the hundreds of important dapps and reserves that depend on us. In addition, there are certain operations that could result in suboptimal outcomes, like overpaying for the KNC to be burnt.

@mingyeow
mingyeow / HandshakeOpenSourcePledge.md
Last active July 11, 2020 05:29
Handshake Open Source Pledge

Handshake + Open Source

The collective consciousness known as open source has always been guided by an ethos with several key components, including fundamental inclusiveness, decentralized governance, and the instinctive disdain for monopolies. Underlining all parts of this ethos is the idea of freedom - that the world will be a much better place if software and information iss free to access, modify, and create.

Far from being the kind of soul draining mumbo jumbo that plagues corporations and bureaucracies, this ethos has been the key reason why open source went from being a niche movement to underpinning much of the internet. The people of the world idolize billionaires and titans of industry, but the open source movement has arguably contributed much more to the benefit of the everyday person everywhere in the world, while flying very much under the radar.

Perhaps more importantly than the vast trove of intellectual capital bestowed to the world by open source, has been the manifestation of a new v

@mingyeow
mingyeow / Observable+FeedNextInto
Created August 17, 2016 00:22
FeedNextInto For RxSwift
import RxSwift
import Foundation
extension ObservableType {
func feedNextInto(variable: Variable<E>) -> Observable<E> {
return Observable<E>.create{ observer -> Disposable in
self.subscribe(
onNext: {
variable.value = $0
@mingyeow
mingyeow / objectmapperwrootjson.swift
Created August 14, 2016 06:41
Using ObjectMapper When Json Contains Root
//: Please build the scheme 'ObjectMapperPlayground' first
import XCPlayground
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
import ObjectMapper
let questionsArrayJson = "{\"questions\":[{\"id\":1,\"body\":\"ddd\",\"price_in_cent\":0,\"can_listen\":false,\"asker\":{\"id\":1,\"name\":\"feafeafeafe\",\"title\":null,\"about_me\":null,\"price_in_cent\":100,\"email\":null,\"authentication_token\":\"R3/KBYssIRLtRR30xJoFy7+c3XZ3NLcj1ClanCFyF/8UmlwdnVbWJrAdJyLrbnO+U50xaDK2+VX7/dTVXRmNmw==\",\"has_payment\":false},\"answerer\":{\"id\":2,\"name\":\"feafeafeafe\",\"title\":null,\"about_me\":null,\"price_in_cent\":100}},{\"id\":2,\"body\":\"ddd\",\"price_in_cent\":0,\"can_listen\":false,\"asker\":{\"id\":1,\"name\":\"feafeafeafe\",\"title\":null,\"about_me\":null,\"price_in_cent\":100,\"email\":null,\"authentication_token\":\"R3/KBYssIRLtRR30xJoFy7+c3XZ3NLcj1ClanCFyF/8UmlwdnVbWJrAdJyLrbnO+U50xaDK2+VX7/dTVXRmNmw==\",\"has_payment\":false},\"answerer\":{\"id\":2,\"name\":\"feafeafeafe\",\"title\":null,\"ab
@mingyeow
mingyeow / KeepCalmAndCarryOnExample.swift
Created August 11, 2016 22:43
ObservableType+KeepCalmAndCarryOn.swift
// In RXSWIFT, the flatmap has to handle the error by passing on observable, otherwise future signals will not trigger it. See examples below.
// This means that we often need to bundle the result in an optional or result type, and handle it in the flatmap catcherror
enum AwfulError: ErrorType { case Bad}
func rxFunction(arg:Int) -> Observable<Int>{
let k = Observable<Int>.create({ observer -> Disposable in
observer.onNext(arg * 2)
observer.onError(AwfulError.Bad)
return NopDisposable.instance
@mingyeow
mingyeow / ReactiveKitErrorHandling.swift
Created August 11, 2016 21:45
Comparing ReactiveKit and RxSwift Error Handling
// In ReactiveKit, there is a function to emit an completed and handle the error seperately, allowing the eventual subscriber to only worry about the success cases
import ReactiveKit
func rkFunction(arg:Int) -> Operation<Int, NSError>{
return Operation<Int, NSError> { observer in
observer.next(arg * 2)
observer.failure(NSError(domain: "", code: 1, userInfo: nil))
return NotDisposable
@mingyeow
mingyeow / RxResultHandlerEnum.swift
Last active June 2, 2018 14:45
RxResultHandlerEnum
// DEFINITIONS
enum ResultHandler<T> {
case Success((T) -> Void)
case Empty(() -> Void)
case Failure((T) -> Void)
func run(a:T) {
switch self {
case Success(let completion):